From 909b39f5194258d1c7b82c1d31944bafab92649b Mon Sep 17 00:00:00 2001 From: Willem Date: Sat, 26 Mar 2022 13:43:24 +0100 Subject: [PATCH] Fixed hardcoded child frame height + no mouse --- .../app/glyphdemo/apps/DemoUnicodePlaneDeskApp.java | 10 ++++------ .../distributedrebirth/unicode4d/draw/ImCharacter.java | 4 +++- .../distributedrebirth/gdxapp4d/vrgem4/ImGuiSetup.java | 4 +++- .../gdxapp4d/vrgem4/view/DeskAppInputProcessor.java | 5 +++-- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/gdxapp4d-app-glyphdemo/src/main/java/love/distributedrebirth/gdxapp4d/app/glyphdemo/apps/DemoUnicodePlaneDeskApp.java b/gdxapp4d-app-glyphdemo/src/main/java/love/distributedrebirth/gdxapp4d/app/glyphdemo/apps/DemoUnicodePlaneDeskApp.java index 885814fd..4fe26538 100644 --- a/gdxapp4d-app-glyphdemo/src/main/java/love/distributedrebirth/gdxapp4d/app/glyphdemo/apps/DemoUnicodePlaneDeskApp.java +++ b/gdxapp4d-app-glyphdemo/src/main/java/love/distributedrebirth/gdxapp4d/app/glyphdemo/apps/DemoUnicodePlaneDeskApp.java @@ -5,6 +5,7 @@ import java.util.ResourceBundle; import imgui.ImGui; import imgui.flag.ImGuiStyleVar; import imgui.flag.ImGuiTableFlags; +import imgui.flag.ImGuiWindowFlags; import imgui.type.ImBoolean; import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ; import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4Unicode4DService; @@ -61,13 +62,10 @@ public class DemoUnicodePlaneDeskApp extends AbstractDeskApp implements DeskAppR ImGui.text(buf.toString()); } else { ImGui.pushStyleVar(ImGuiStyleVar.ItemSpacing, 0f, 0f); - DrawCharacter drawChar2 = unicode4DService.getCharacterForUnicode(' '); - if (drawChar2 != null) { - ImCharacter.render(drawChar2); - ImGui.sameLine(); // print before beginChild to fix row height of table - } int offset = 33; - ImGui.beginChild("row"+plane.name()); // workaround for error; Too many vertices in ImDrawList using 16-bit indices. + // workaround for error; Too many vertices in ImDrawList using 16-bit indices. + // hard coded height to fix line height and row0 height + no scoll to disable mouse scroll + ImGui.beginChild("row"+plane.name(), 0f, ImCharacter.HEIGHT, false, ImGuiWindowFlags.NoScrollWithMouse); for (int i=plane.getStart()+offset;i