Fixed window offset
This commit is contained in:
parent
efcca76c27
commit
89e95cfe54
|
@ -11,6 +11,7 @@ import love.distributedrebirth.unicode4d.draw.DrawGlyphPath.ImGlyphQuadCurveTo;
|
||||||
public class ImCharacter {
|
public class ImCharacter {
|
||||||
|
|
||||||
public static final float HEIGHT = 26f;
|
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 ImVec2 SIZE = new ImVec2(22f, HEIGHT);
|
||||||
private static final int COLOR = ImColor.intToColor(255, 255, 255, 255);
|
private static final int COLOR = ImColor.intToColor(255, 255, 255, 255);
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ import love.distributedrebirth.gdxapp4d.vrgem4.view.DeskAppSelectionListener;
|
||||||
import love.distributedrebirth.gdxapp4d.vrgem4.view.DeskAppInputProcessor;
|
import love.distributedrebirth.gdxapp4d.vrgem4.view.DeskAppInputProcessor;
|
||||||
import love.distributedrebirth.gdxapp4d.vrgem4.view.DeskTopScreen;
|
import love.distributedrebirth.gdxapp4d.vrgem4.view.DeskTopScreen;
|
||||||
import love.distributedrebirth.gdxapp4d.vrgem4.view.DeskTopScreenMenu;
|
import love.distributedrebirth.gdxapp4d.vrgem4.view.DeskTopScreenMenu;
|
||||||
|
import love.distributedrebirth.unicode4d.draw.ImCharacter;
|
||||||
|
|
||||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||||
public abstract class AbstractScreenDesktop extends ScreenAdapter implements DeskTopScreen {
|
public abstract class AbstractScreenDesktop extends ScreenAdapter implements DeskTopScreen {
|
||||||
|
@ -138,8 +139,9 @@ public abstract class AbstractScreenDesktop extends ScreenAdapter implements Des
|
||||||
screenMenu.renderMenu(appScreen);
|
screenMenu.renderMenu(appScreen);
|
||||||
if (appScreen != null && appScreen.getDeskAppController().getCurrentDeskApp() != null) {
|
if (appScreen != null && appScreen.getDeskAppController().getCurrentDeskApp() != null) {
|
||||||
int sizeFlags = ImGuiCond.Always;
|
int sizeFlags = ImGuiCond.Always;
|
||||||
ImGui.setNextWindowPos(0, 28, sizeFlags);
|
float sizeMenu = ImCharacter.HEIGHT+ImCharacter.MARGIN_MENUBAR;
|
||||||
ImGui.setNextWindowSize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight() - 28, sizeFlags);
|
ImGui.setNextWindowPos(0, sizeMenu, sizeFlags);
|
||||||
|
ImGui.setNextWindowSize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight() - sizeMenu, sizeFlags);
|
||||||
int windowFlags = ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoTitleBar;
|
int windowFlags = ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoTitleBar;
|
||||||
if (ImGui.begin(appScreen.getDeskAppController().getCurrentDeskApp().getContours().getTitle(), windowFlags)) {
|
if (ImGui.begin(appScreen.getDeskAppController().getCurrentDeskApp().getContours().getTitle(), windowFlags)) {
|
||||||
DeskAppRenderer renderer = appScreen.getDeskAppController().getCurrentDeskApp().getContours().getContour(DeskAppContourSection.MAIN);
|
DeskAppRenderer renderer = appScreen.getDeskAppController().getCurrentDeskApp().getContours().getContour(DeskAppContourSection.MAIN);
|
||||||
|
|
|
@ -25,7 +25,7 @@ public class DeskAppInputProcessor implements InputProcessor {
|
||||||
|
|
||||||
private boolean isFilterMenu(int screenY) {
|
private boolean isFilterMenu(int screenY) {
|
||||||
// font + margin top-bottom = 4px
|
// font + margin top-bottom = 4px
|
||||||
if (screenY <= ImCharacter.HEIGHT+4) {
|
if (screenY <= ImCharacter.HEIGHT+ImCharacter.MARGIN_MENUBAR) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue