From 957785ed51b1ef19636393d27a6c80117e8a8dea Mon Sep 17 00:00:00 2001 From: jgkim Date: Thu, 22 Jun 2023 07:22:52 +0000 Subject: [PATCH] =?UTF-8?q?=ED=8F=B0=ED=8A=B8=20=ED=81=AC=EA=B8=B0=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=EB=B0=8F=20UI=20=EC=9C=84=EC=B9=98?= =?UTF-8?q?=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/DotRecast.Recast.Demo/RecastDemo.cs | 3 ++- src/DotRecast.Recast.Demo/UI/RcLogView.cs | 7 ++++--- src/DotRecast.Recast.Demo/UI/RcSettingsView.cs | 2 +- src/DotRecast.Recast.Demo/UI/RcToolsetView.cs | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/DotRecast.Recast.Demo/RecastDemo.cs b/src/DotRecast.Recast.Demo/RecastDemo.cs index 43a9137..75fad26 100644 --- a/src/DotRecast.Recast.Demo/RecastDemo.cs +++ b/src/DotRecast.Recast.Demo/RecastDemo.cs @@ -362,7 +362,8 @@ public class RecastDemo dd.Init(camr); - _imgui = new ImGuiController(_gl, window, _input); + ImGuiFontConfig imGuiFontConfig = new(Path.Combine("resources\\fonts", "DroidSans.ttf"), 24, null); + _imgui = new ImGuiController(_gl, window, _input, imGuiFontConfig); DemoInputGeomProvider geom = LoadInputMesh(Loader.ToBytes("nav_test.obj")); sample = new Sample(geom, ImmutableArray.Empty, null); diff --git a/src/DotRecast.Recast.Demo/UI/RcLogView.cs b/src/DotRecast.Recast.Demo/UI/RcLogView.cs index ca098bf..4b3409b 100644 --- a/src/DotRecast.Recast.Demo/UI/RcLogView.cs +++ b/src/DotRecast.Recast.Demo/UI/RcLogView.cs @@ -63,11 +63,12 @@ public class RcLogView : IRcView public void Draw(double dt) { - int otherWidth = 310; + int otherWidth1 = 350; + int otherWidth2 = 620; int height = 234; - var width = _canvas.Size.X - (otherWidth * 2); + var width = _canvas.Size.X - (otherWidth1 + otherWidth2); //var posX = _canvas.Size.X - width; - ImGui.SetNextWindowPos(new Vector2(otherWidth, _canvas.Size.Y - height)); + ImGui.SetNextWindowPos(new Vector2(otherWidth1, _canvas.Size.Y - height)); ImGui.SetNextWindowSize(new Vector2(width, height)); if (!ImGui.Begin("Log", ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize)) { diff --git a/src/DotRecast.Recast.Demo/UI/RcSettingsView.cs b/src/DotRecast.Recast.Demo/UI/RcSettingsView.cs index e27ebb5..871390a 100644 --- a/src/DotRecast.Recast.Demo/UI/RcSettingsView.cs +++ b/src/DotRecast.Recast.Demo/UI/RcSettingsView.cs @@ -75,7 +75,7 @@ public class RcSettingsView : IRcView { var settings = _sample.GetSettings(); - int width = 310; + int width = 620; var posX = _canvas.Size.X - width; ImGui.SetNextWindowPos(new Vector2(posX, 0)); ImGui.SetNextWindowSize(new Vector2(width, _canvas.Size.Y)); diff --git a/src/DotRecast.Recast.Demo/UI/RcToolsetView.cs b/src/DotRecast.Recast.Demo/UI/RcToolsetView.cs index 77fd4f4..12f14f4 100644 --- a/src/DotRecast.Recast.Demo/UI/RcToolsetView.cs +++ b/src/DotRecast.Recast.Demo/UI/RcToolsetView.cs @@ -55,7 +55,7 @@ public class RcToolsetView : IRcView public void Draw(double dt) { - int width = 310; + int width = 350; ImGui.SetNextWindowPos(new Vector2(0, 0)); ImGui.SetNextWindowSize(new Vector2(width, _canvas.Size.Y)); ImGui.Begin("Tools", ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize);