mirror of
https://github.com/4sval/FModel.git
synced 2026-09-26 11:07:39 -05:00
imgui icons + material inspector v.final +/-
This commit is contained in:
@@ -32,6 +32,9 @@ public class ImGuiController : IDisposable
|
||||
private int _windowWidth;
|
||||
private int _windowHeight;
|
||||
|
||||
private ImFontPtr _normal;
|
||||
private ImFontPtr _semiBold;
|
||||
|
||||
private readonly System.Numerics.Vector2 _scaleFactor = System.Numerics.Vector2.One;
|
||||
|
||||
private static bool KHRDebugAvailable = false;
|
||||
@@ -49,8 +52,8 @@ public class ImGuiController : IDisposable
|
||||
IntPtr context = ImGui.CreateContext();
|
||||
ImGui.SetCurrentContext(context);
|
||||
var io = ImGui.GetIO();
|
||||
// io.Fonts.AddFontDefault();
|
||||
io.Fonts.AddFontFromFileTTF("C:\\Windows\\Fonts\\segoeui.ttf", 16);
|
||||
_normal = io.Fonts.AddFontFromFileTTF("C:\\Windows\\Fonts\\segoeui.ttf", 16);
|
||||
_semiBold = io.Fonts.AddFontFromFileTTF("C:\\Windows\\Fonts\\seguisb.ttf", 16);
|
||||
|
||||
io.BackendFlags |= ImGuiBackendFlags.RendererHasVtxOffset;
|
||||
io.ConfigFlags |= ImGuiConfigFlags.NavEnableKeyboard;
|
||||
@@ -66,6 +69,12 @@ public class ImGuiController : IDisposable
|
||||
_frameBegun = true;
|
||||
}
|
||||
|
||||
public void SemiBold() => PushFont(_semiBold);
|
||||
public void Normal() => PushFont(_normal);
|
||||
public void PopFont() => ImGui.PopFont();
|
||||
|
||||
private void PushFont(ImFontPtr ptr) => ImGui.PushFont(ptr);
|
||||
|
||||
public void WindowResized(int width, int height)
|
||||
{
|
||||
_windowWidth = width;
|
||||
|
||||
Reference in New Issue
Block a user