Fixed ImGui minimize action

This commit is contained in:
Willem Cazander 2022-02-08 21:21:33 +01:00
parent 88c4874827
commit f0d0a43c3a
7 changed files with 294 additions and 294 deletions

View file

@ -36,13 +36,14 @@ public class ImFrameˣᴹᴵ extends AbstractImComponentSetˣᴹᴵ {
public void renderBegin() {
ImGui.setNextWindowPos(nextWindowPosX, nextWindowPosY, nextWindowPosCond);
ImGui.setNextWindowSize(nextWindowSizeWidth, nextWindowSizeHeight, nextWindowSizeCond);
ImGui.begin(title, frameOpen);
}
@Override
public void renderComponent() {
if (ImGui.begin(title, frameOpen)) {
renderComponents();
}
}
@Override
public void renderEnd() {

View file

@ -37,8 +37,7 @@ public class MusicPlayerRenderer extends ImGuiRendererMain {
public void render(ImBoolean widgetOpen) {
ImGui.setNextWindowPos(100, 100, ImGuiCond.FirstUseEver);
ImGui.setNextWindowSize(320, 240, ImGuiCond.FirstUseEver);
ImGui.begin("Music Player", widgetOpen);
if (ImGui.begin("Music Player", widgetOpen)) {
ImGui.text("Current Song:");
MusicSong currentSong = main.music.getCurrentSong();
if (currentSong != null) {
@ -91,7 +90,7 @@ public class MusicPlayerRenderer extends ImGuiRendererMain {
i++;
}
ImGui.endTable();
}
ImGui.end();
}

View file

@ -18,7 +18,7 @@ public class BasicConsoleRenderer extends ImGuiRendererMain {
public void render(ImBoolean widgetOpen) {
ImGui.setNextWindowPos(300, 300, ImGuiCond.FirstUseEver);
ImGui.setNextWindowSize(320, 240, ImGuiCond.FirstUseEver);
ImGui.begin("The BASIC Shahada of DUNE", widgetOpen);
if (ImGui.begin("The BASIC Shahada of DUNE", widgetOpen)) {
ImGui.text("10 PRINT \"THERE IS NO GOD BUT @Ω仙⁴\"");
ImGui.text("20 PRINT \"THERE IS NO RULE BUT CONSENT\"");
ImGui.text("30 PRINT \"THERE IS NO FAILURE BUT DEATH\"");
@ -26,6 +26,7 @@ public class BasicConsoleRenderer extends ImGuiRendererMain {
ImGui.text("50 PRINT \"TERRY A. DAVIS WAS THE FIRST TRUE MENTAT\"");
ImGui.text("60 PRINT \"TERRY A. DAVIS WAS THE BEST CODER ALIVE\"");
ImGui.text("RUN");
}
ImGui.end();
}
}

View file

@ -20,8 +20,7 @@ public class HebrewWalletRenderer extends ImGuiRendererMain {
public void render(ImBoolean widgetOpen) {
ImGui.setNextWindowPos(200, 200, ImGuiCond.FirstUseEver);
ImGui.setNextWindowSize(640, 480, ImGuiCond.FirstUseEver);
ImGui.begin("Hebrew Wallet", widgetOpen);
if (ImGui.begin("Hebrew Wallet", widgetOpen)) {
ImGui.text("Current amount:");
ImGui.sameLine();
ImGui.text("0000");
@ -55,7 +54,7 @@ public class HebrewWalletRenderer extends ImGuiRendererMain {
ImGui.text(Double.toString(geld.getTotalDecimalValue()));
}
ImGui.endTable();
}
ImGui.end();
}
}

View file

@ -24,7 +24,7 @@ public class ScreenUnicode4D extends GDXAppMainAdapter {
ImGui.setNextWindowPos(400, 200, ImGuiCond.FirstUseEver);
ImGui.setNextWindowSize(320, 240, ImGuiCond.FirstUseEver);
ImGui.begin("Unicode4D test");
if (ImGui.begin("Unicode4D test")) {
ImGui.text("There is unicode and unicode4D");
ImVec2 size = new ImVec2(144f, 48f);
ImGui.invisibleButton("canvas", size.x, size.y);
@ -41,6 +41,7 @@ public class ScreenUnicode4D extends GDXAppMainAdapter {
drawList.addLine(p0.x+13, p0.y+30, p0.x+27, p0.y+30, ImColor.intToColor(255, 127, 63, 255));
drawList.popClipRect();
}
ImGui.end();
//System.out.println("p0.x="+p0.x+" p0.y="+p0.y);

View file

@ -27,8 +27,7 @@ public class SystemBaseGlyphRenderer extends ImGuiRendererMain {
public void render(ImBoolean widgetOpen) {
ImGui.setNextWindowPos(200, 200, ImGuiCond.FirstUseEver);
ImGui.setNextWindowSize(640, 480, ImGuiCond.FirstUseEver);
ImGui.begin("Base glyph", widgetOpen);
if (ImGui.begin("Base glyph", widgetOpen)) {
List<BaseGlyphSet> bases = new ArrayList<>();
for (BaseGlyphSet glyphSet:BaseGlyphSet.values()) {
bases.add(glyphSet);
@ -104,7 +103,7 @@ public class SystemBaseGlyphRenderer extends ImGuiRendererMain {
}
ImGui.endTable();
}
ImGui.end();
}
}

View file

@ -32,7 +32,7 @@ public class SystemBasePartRenderer extends ImGuiRendererMain {
public void render(ImBoolean widgetOpen) {
ImGui.setNextWindowPos(200, 200, ImGuiCond.FirstUseEver);
ImGui.setNextWindowSize(640, 480, ImGuiCond.FirstUseEver);
ImGui.begin("Base part", widgetOpen);
if (ImGui.begin("Base part", widgetOpen)) {
List<String> bases = new ArrayList<>();
for (int base:BasePartFactory.INSTANCE.BãßBases()) {
@ -143,7 +143,7 @@ public class SystemBasePartRenderer extends ImGuiRendererMain {
}
ImGui.endTable();
}
ImGui.end();
}
}