diff --git a/lib-numberxd/src/main/love/distributedrebirth/numberxd/glyph/BaseGlyphSet.java b/lib-numberxd/src/main/love/distributedrebirth/numberxd/glyph/BaseGlyphSet.java index 92deb508..c6bdbe92 100644 --- a/lib-numberxd/src/main/love/distributedrebirth/numberxd/glyph/BaseGlyphSet.java +++ b/lib-numberxd/src/main/love/distributedrebirth/numberxd/glyph/BaseGlyphSet.java @@ -25,7 +25,7 @@ public enum BaseGlyphSet implements DefaultEnumSetᴶᴹˣ T10PartDecimal.PART_1.BãßVoorElk(x -> v.add(x.BȍőnChinaValue()))).withSeperator(BãßBȍőnConstantsʸᴰ.STR_SPACE), new BaseGlyphSetNumber("1","2","3","A","4","5","6","B","7","8","9","C","*","0","#","D"), - LATIN_BASIC.BȍőnNumber27()), + null), LATIN_TOP( new BaseGlyphSetNumber("⁰","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹"), new BaseGlyphSetNumber("⁰","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹","ᵃ","ᵇ","ᶜ","ᵈ","ᵉ","ᶠ"), @@ -37,7 +37,11 @@ public enum BaseGlyphSet implements DefaultEnumSetᴶᴹˣ T10PartDecimal.PART_1.BãßVoorElk(x -> v.add(x.BȍőnDialTone()))), @@ -99,52 +103,44 @@ public enum BaseGlyphSet implements DefaultEnumSetᴶᴹˣ T10PartDecimal.PART_1.BãßVoorElk(x -> v.add(x.BȍőnChinaKey()))), - LATIN_BASIC.BȍőnNumber16(), + null, null), CHINA_FORMAL_OLD( new BaseGlyphSetNumber("零","壹","貳","參","肆","伍","陸","柒","捌","玖"), - LATIN_BASIC.BȍőnNumber16(), + null, null), JAPAN( CHINA.BȍőnNumber10(), - LATIN_BASIC.BȍőnNumber16(), + null, null), JAPAN_FORMAL( new BaseGlyphSetNumber("零","壱","弐","参","四","五","六","七","八","九"), - LATIN_BASIC.BȍőnNumber16(), + null, null), CYRILLIC( new BaseGlyphSetNumber("Ф","А","В","Г","Д","Є","Ѕ","З","И","Ѳ"), - LATIN_BASIC.BȍőnNumber16(), + new BaseGlyphSetNumber("Ф","А","В","Г","Д","Є","Ѕ","З","И","Ѳ","І","К","Л","М","Н","Ѯ"), new BaseGlyphSetNumber("А","В","Г","Д","Є","Ѕ","З","И","Ѳ","І","К","Л","М","Н","Ѯ","Ѻ","П","Ч","Р","С","Т","Ѵ","Ф","Х","Ѱ","Ѿ","Ц")), ARABIC( new BaseGlyphSetNumber("٠","١","٢","٣","٤","٥","٦","٧","٨","٩"), - LATIN_BASIC.BȍőnNumber16(), + null, new BaseGlyphSetNumber("ا","ب","ج","د","ه","و","ز","ح","ط","ي","ك","ل","م","ن","س","ع","ف","ص","ق","ر","ش","ت","ث","خ","ذ","ض","ظ"), true), HEBREW( new BaseGlyphSetNumber("אֶפֶס","אֶחָד","שְׁתַּיִם","שְׁלֹשָׁה","אַרְבַּע‎","חֲמִשָּׁה‎","שֵׁשׁ‎","שִׁבְעָה","שְׁמוֹנֶה","תִּשְׁעָה‎").withSeperator(BãßBȍőnConstantsʸᴰ.STR_SPACE), - LATIN_BASIC.BȍőnNumber16(), + null, new BaseGlyphSetNumber("א","ב","ג","ד","ה","ו","ז","ח","ט","י","כ","ל","מ","נ","ס","ע","פ","צ","ק","ר","ש","ת","ך","ם","ן","ף","ץ"), true), ; diff --git a/main-gdxapp/src/main/love/distributedrebirth/gdxapp/GDXAppMain.java b/main-gdxapp/src/main/love/distributedrebirth/gdxapp/GDXAppMain.java index f882c4ef..96c501e9 100644 --- a/main-gdxapp/src/main/love/distributedrebirth/gdxapp/GDXAppMain.java +++ b/main-gdxapp/src/main/love/distributedrebirth/gdxapp/GDXAppMain.java @@ -69,7 +69,6 @@ public class GDXAppMain extends Game { private GDXAppScreen desktop2; private GDXAppScreen desktop3; private GDXAppScreen desktop4; - private ImBoolean openWindowFlag = new ImBoolean(true); private ImBoolean showImGuiDemo = new ImBoolean(false); public GDXAppMain(List args, int viewWidth, int viewHeight, NativeFileChooser fileChooser) { @@ -228,19 +227,15 @@ public class GDXAppMain extends Game { } if (appScreen != null && appScreen.getDeskAppScreen().getCurrentDeskApp() != null) { int sizeFlags = ImGuiCond.Always; - ImGui.setNextWindowPos(5, 30, sizeFlags); - ImGui.setNextWindowSize(Gdx.graphics.getWidth() - 10, Gdx.graphics.getHeight() - 35, sizeFlags); - int windowFlags = ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize; - if (ImGui.begin(appScreen.getDeskAppScreen().getCurrentDeskApp().getTitle(), openWindowFlag, windowFlags)) { + ImGui.setNextWindowPos(0, 28, sizeFlags); + ImGui.setNextWindowSize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight() - 28, sizeFlags); + int windowFlags = ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoTitleBar; + if (ImGui.begin(appScreen.getDeskAppScreen().getCurrentDeskApp().getTitle(), windowFlags)) { DeskAppRenderer renderer = appScreen.getDeskAppScreen().getCurrentDeskApp().getContours().getContour(DeskAppContourSection.MAIN); if (renderer != null) { renderer.render(); } } - if (openWindowFlag.get() == false) { - appScreen.getDeskAppScreen().setCurrentDeskApp(null); - openWindowFlag.set(true); - } ImGui.end(); } if (screen != null) { @@ -256,62 +251,8 @@ public class GDXAppMain extends Game { private void renderMenu(GDXAppScreen appScreen) { DeskApp deskApp = appScreen.getDeskAppScreen().getCurrentDeskApp(); ImGui.beginMainMenuBar(); - if (ImGui.beginMenu("File")) { - if (deskApp != null) { - DeskAppRenderer fileNew = deskApp.getContours().getContour(DeskAppContourSection.FILE_NEW); - DeskAppRenderer fileClose = deskApp.getContours().getContour(DeskAppContourSection.FILE_CLOSE); - DeskAppRenderer fileSave = deskApp.getContours().getContour(DeskAppContourSection.FILE_SAVE); - DeskAppRenderer fileOption = deskApp.getContours().getContour(DeskAppContourSection.FILE_OPTION); - DeskAppRenderer filePrint = deskApp.getContours().getContour(DeskAppContourSection.FILE_PRINT); - if (fileNew != null) { - fileNew.render(); - ImGui.separator(); - } - if (fileClose != null) { - fileClose.render(); - ImGui.separator(); - } - if (fileSave != null) { - fileSave.render(); - ImGui.separator(); - } - if (fileOption != null) { - fileOption.render(); - ImGui.separator(); - } - if (filePrint != null) { - filePrint.render(); - ImGui.separator(); - } - } - if (ImGui.menuItem("Minimize", "", fileMinimizeSelected, deskApp != null )) { - if (deskApp != null) { - appScreen.getDeskAppScreen().setCurrentDeskApp(null); - } - } - if (ImGui.menuItem("Exit", "", fileCloseSelected, deskApp != null)) { - if (deskApp != null) { - appScreen.getDeskAppScreen().removeDeskApp(deskApp); - appScreen.getDeskAppScreen().setCurrentDeskApp(null); - } - } - ImGui.endMenu(); - } - if (deskApp != null) { - renderEditMenu(deskApp); - } if (ImGui.beginMenu("vrGEM⁴")) { - if (ImGui.beginMenu("Start")) { - for (GDXAppLauncher launcher: apps) { - if (ImGui.menuItem(launcher.getName())) { - appScreen.getDeskAppScreen().addDeskApp(launcher.getLauncher().get()); - } - } - ImGui.endMenu(); - } - ImGui.separator(); - String infix1 = ""; String infix2 = ""; String infix3 = ""; @@ -381,6 +322,17 @@ public class GDXAppMain extends Game { ImGui.endMenu(); } ImGui.separator(); + if (ImGui.beginMenu("Start App")) { + for (GDXAppLauncher launcher: apps) { + if (ImGui.menuItem(launcher.getName())) { + appScreen.getDeskAppScreen().addDeskApp(launcher.getLauncher().get()); + } + } + ImGui.endMenu(); + } + if (ImGui.menuItem("Run App")) { + } + ImGui.separator(); if (Gdx.graphics.isFullscreen()) { if (ImGui.menuItem("Window Mode")) { Gdx.graphics.setWindowedMode(viewWidth, viewHeight); @@ -407,9 +359,69 @@ public class GDXAppMain extends Game { } ImGui.endMenu(); } + + + if (deskApp != null) { + renderEditMenu(deskApp); + renderFileMenu(deskApp); + } + + if (deskApp != null) { + if (ImGui.beginMenu(deskApp.getTitle())) { + if (ImGui.menuItem("Minimize", "", fileMinimizeSelected, deskApp != null )) { + fileMinimizeSelected.set(false); + if (deskApp != null) { + appScreen.getDeskAppScreen().setCurrentDeskApp(null); + } + } + if (ImGui.menuItem("Exit", "", fileCloseSelected, deskApp != null)) { + fileCloseSelected.set(false); + if (deskApp != null) { + appScreen.getDeskAppScreen().removeDeskApp(deskApp); + appScreen.getDeskAppScreen().setCurrentDeskApp(null); + } + } + ImGui.endMenu(); + } + } + + ImGui.endMainMenuBar(); } + private void renderFileMenu(DeskApp deskApp) { + DeskAppRenderer fileNew = deskApp.getContours().getContour(DeskAppContourSection.FILE_NEW); + DeskAppRenderer fileClose = deskApp.getContours().getContour(DeskAppContourSection.FILE_CLOSE); + DeskAppRenderer fileSave = deskApp.getContours().getContour(DeskAppContourSection.FILE_SAVE); + DeskAppRenderer fileOption = deskApp.getContours().getContour(DeskAppContourSection.FILE_OPTION); + DeskAppRenderer filePrint = deskApp.getContours().getContour(DeskAppContourSection.FILE_PRINT); + if (fileNew == null && fileClose == null && fileSave == null && fileOption == null && filePrint == null) { + return; + } + if (ImGui.beginMenu("File")) { + if (fileNew != null) { + fileNew.render(); + ImGui.separator(); + } + if (fileClose != null) { + fileClose.render(); + ImGui.separator(); + } + if (fileSave != null) { + fileSave.render(); + ImGui.separator(); + } + if (fileOption != null) { + fileOption.render(); + ImGui.separator(); + } + if (filePrint != null) { + filePrint.render(); + } + ImGui.endMenu(); + } + } + private void renderEditMenu(DeskApp deskApp) { DeskAppRenderer editUndo = deskApp.getContours().getContour(DeskAppContourSection.EDIT_UNDO); DeskAppRenderer editCopy = deskApp.getContours().getContour(DeskAppContourSection.EDIT_COPY); diff --git a/main-gdxapp/src/main/love/distributedrebirth/gdxapp/ImGuiSetup.java b/main-gdxapp/src/main/love/distributedrebirth/gdxapp/ImGuiSetup.java index a8dddedc..1c7bf8b9 100644 --- a/main-gdxapp/src/main/love/distributedrebirth/gdxapp/ImGuiSetup.java +++ b/main-gdxapp/src/main/love/distributedrebirth/gdxapp/ImGuiSetup.java @@ -38,7 +38,9 @@ public class ImGuiSetup { private static void initStyle() { ImGui.styleColorsDark(); ImGuiStyle style = ImGui.getStyle(); - style.setWindowRounding(6f); + style.setWindowRounding(0f); + style.setWindowBorderSize(0f); + style.setWindowPadding(6f, 6f); style.setScrollbarSize(22f); } diff --git a/main-gdxapp/src/main/love/distributedrebirth/gdxapp/desktop/apps/SystemBaseGlyphApp.java b/main-gdxapp/src/main/love/distributedrebirth/gdxapp/desktop/apps/SystemBaseGlyphApp.java index 742f747d..0c889514 100644 --- a/main-gdxapp/src/main/love/distributedrebirth/gdxapp/desktop/apps/SystemBaseGlyphApp.java +++ b/main-gdxapp/src/main/love/distributedrebirth/gdxapp/desktop/apps/SystemBaseGlyphApp.java @@ -60,8 +60,7 @@ public class SystemBaseGlyphApp extends DefaultDeskApp { private String print10Numbers(BaseGlyphSet set) { StringBuilder buf = new StringBuilder(); for (int i=0;i<10;i++) { - buf.append(set.BȍőnNumber10().BȍőnCharFor(i)); - buf.append(set.BȍőnNumber10().BȍőnCharSeperator()); + buf.append(set.BȍőnPrintNumber10(i, 9)); buf.append(" "); } return buf.toString(); @@ -69,10 +68,12 @@ public class SystemBaseGlyphApp extends DefaultDeskApp { private String print16Numbers(BaseGlyphSet set) { StringBuilder buf = new StringBuilder(); + if (set.BȍőnNumber16() == null) { + return buf.toString(); + } int x=240; for (int i=0;i<16;i++) { - buf.append(set.BȍőnPrintNumber16(i + x, 99)); - buf.append(set.BȍőnNumber16().BȍőnCharSeperator()); + buf.append(set.BȍőnPrintNumber16(i + x, 16)); // hex; +one buf.append(" "); x = x - 16; } @@ -85,8 +86,7 @@ public class SystemBaseGlyphApp extends DefaultDeskApp { return buf.toString(); } for (int i=0;i<27;i++) { - buf.append(set.BȍőnPrintNumber27(i, 99)); - buf.append(set.BȍőnNumber27().BȍőnCharSeperator()); + buf.append(set.BȍőnPrintNumber27(i, 26)); buf.append(" "); } return buf.toString();