diff --git a/gdxapp4d-lib-unicodezd/src/main/java/love/distributedrebirth/unicode4d/draw/ImCharacter.java b/gdxapp4d-lib-unicodezd/src/main/java/love/distributedrebirth/unicode4d/draw/ImCharacter.java index a2562d1b..7efdefd4 100644 --- a/gdxapp4d-lib-unicodezd/src/main/java/love/distributedrebirth/unicode4d/draw/ImCharacter.java +++ b/gdxapp4d-lib-unicodezd/src/main/java/love/distributedrebirth/unicode4d/draw/ImCharacter.java @@ -11,6 +11,7 @@ import love.distributedrebirth.unicode4d.draw.DrawGlyphPath.ImGlyphQuadCurveTo; public class ImCharacter { public static final float HEIGHT = 26f; + public static final float MARGIN_MENUBAR = 4f; private static final ImVec2 SIZE = new ImVec2(22f, HEIGHT); private static final int COLOR = ImColor.intToColor(255, 255, 255, 255); diff --git a/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/AbstractScreenDesktop.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/AbstractScreenDesktop.java index fe373858..bcc57f60 100644 --- a/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/AbstractScreenDesktop.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/screen/AbstractScreenDesktop.java @@ -32,6 +32,7 @@ import love.distributedrebirth.gdxapp4d.vrgem4.view.DeskAppSelectionListener; import love.distributedrebirth.gdxapp4d.vrgem4.view.DeskAppInputProcessor; import love.distributedrebirth.gdxapp4d.vrgem4.view.DeskTopScreen; import love.distributedrebirth.gdxapp4d.vrgem4.view.DeskTopScreenMenu; +import love.distributedrebirth.unicode4d.draw.ImCharacter; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") public abstract class AbstractScreenDesktop extends ScreenAdapter implements DeskTopScreen { @@ -138,8 +139,9 @@ public abstract class AbstractScreenDesktop extends ScreenAdapter implements Des screenMenu.renderMenu(appScreen); if (appScreen != null && appScreen.getDeskAppController().getCurrentDeskApp() != null) { int sizeFlags = ImGuiCond.Always; - ImGui.setNextWindowPos(0, 28, sizeFlags); - ImGui.setNextWindowSize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight() - 28, sizeFlags); + float sizeMenu = ImCharacter.HEIGHT+ImCharacter.MARGIN_MENUBAR; + ImGui.setNextWindowPos(0, sizeMenu, sizeFlags); + ImGui.setNextWindowSize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight() - sizeMenu, sizeFlags); int windowFlags = ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoTitleBar; if (ImGui.begin(appScreen.getDeskAppController().getCurrentDeskApp().getContours().getTitle(), windowFlags)) { DeskAppRenderer renderer = appScreen.getDeskAppController().getCurrentDeskApp().getContours().getContour(DeskAppContourSection.MAIN); diff --git a/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/view/DeskAppInputProcessor.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/view/DeskAppInputProcessor.java index df42dacc..0fc29fff 100644 --- a/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/view/DeskAppInputProcessor.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/view/DeskAppInputProcessor.java @@ -25,7 +25,7 @@ public class DeskAppInputProcessor implements InputProcessor { private boolean isFilterMenu(int screenY) { // font + margin top-bottom = 4px - if (screenY <= ImCharacter.HEIGHT+4) { + if (screenY <= ImCharacter.HEIGHT+ImCharacter.MARGIN_MENUBAR) { return true; } return false;