Added unicode plane viewer

This commit is contained in:
Willem Cazander 2022-02-21 01:13:39 +01:00
parent acbbaf348a
commit 5a6800d2d3
3 changed files with 63 additions and 4 deletions

View file

@ -16,6 +16,7 @@ import love.distributedrebirth.gdxapp.desktop.apps.HebrewWalletApp;
import love.distributedrebirth.gdxapp.desktop.apps.MusicPlayerApp;
import love.distributedrebirth.gdxapp.desktop.apps.SystemBaseGlyphApp;
import love.distributedrebirth.gdxapp.desktop.apps.SystemBasePartApp;
import love.distributedrebirth.gdxapp.desktop.apps.SystemBaseUnicodePlaneApp;
import love.distributedrebirth.gdxapp.desktop.apps.Unicode4DApp;
import love.distributedrebirth.gdxapp.screen.ScreenCredits;
import love.distributedrebirth.gdxapp.screen.ScreenDesktop1;
@ -44,8 +45,10 @@ public class DeskTopScreenMenu {
apps = new ArrayList<>();
apps.add(new GDXAppLauncher("Basic Console", () -> new BasicConsoleApp()));
apps.add(new GDXAppLauncher("Base Glyphs", () -> new SystemBaseGlyphApp()));
apps.add(new GDXAppLauncher("Base Parts", () -> new SystemBasePartApp()));
apps.add(new GDXAppLauncher("Sys Glyph Set", () -> new SystemBaseGlyphApp()));
apps.add(new GDXAppLauncher("Sys Number Parts", () -> new SystemBasePartApp()));
apps.add(new GDXAppLauncher("Sys Unicode", () -> new SystemBaseUnicodePlaneApp()));
apps.add(new GDXAppLauncher("Hebrew Wallet", () -> new HebrewWalletApp()));
apps.add(new GDXAppLauncher("Unicode4D", () -> new Unicode4DApp()));
apps.add(new GDXAppLauncher("Music Player", () -> new MusicPlayerApp()));

View file

@ -0,0 +1,52 @@
package love.distributedrebirth.gdxapp.desktop.apps;
import java.util.Locale;
import java.util.ResourceBundle;
import imgui.ImGui;
import imgui.flag.ImGuiTableFlags;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
import love.distributedrebirth.gdxapp.desktop.DefaultDeskApp;
import love.distributedrebirth.gdxapp.desktop.DeskAppContourSection;
import love.distributedrebirth.gdxapp.desktop.DeskAppRenderer;
import love.distributedrebirth.unicode4d.UnicodePlaneᶻᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class SystemBaseUnicodePlaneApp extends DefaultDeskApp {
private String getTxt(String key) {
ResourceBundle bundle = ResourceBundle.getBundle("love.distributedrebirth.gdxapp.Main", new Locale("en"));
return bundle.getString("SystemBaseUnicodePlaneApp."+key);
}
public SystemBaseUnicodePlaneApp() {
setTitle(getTxt("title"));
getContours().registrateContour(DeskAppContourSection.MAIN, new DeskAppRenderer() {
@Override
public void render() {
int flags = ImGuiTableFlags.ScrollX | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersOuter | ImGuiTableFlags.BordersV | ImGuiTableFlags.Resizable;
ImGui.beginTable("base-part", 2, flags);
ImGui.tableSetupColumn(getTxt("colPlane"));
ImGui.tableSetupColumn(getTxt("colText"));
ImGui.tableHeadersRow();
for (UnicodePlaneᶻᴰ plane:UnicodePlaneᶻᴰ.values()) {
ImGui.tableNextRow();
ImGui.tableNextColumn();
ImGui.text(plane.name());
ImGui.tableNextColumn();
StringBuilder buf = new StringBuilder();
for (int i=plane.getStart();i<plane.getStart()+33;i++) {
if (i < 65536) {
buf.append((char)i);
}
buf.append(" ");
}
ImGui.text(buf.toString());
}
ImGui.endTable();
}
});
}
}

View file

@ -1,14 +1,18 @@
SystemBaseGlyphApp.title=Base Glyph Set
SystemBaseGlyphApp.title=Sys Glyph Set
SystemBaseGlyphApp.showBase27=Show base27
SystemBaseGlyphApp.colScript=Script
SystemBaseGlyphApp.col10Num=10Numbers
SystemBaseGlyphApp.col16Num=16Numbers
SystemBaseGlyphApp.col27Num=27Numbers
SystemBasePartApp.title=Base Parts
SystemBasePartApp.title=Sys Number Parts
SystemBasePartApp.selectBase=Base
SystemBasePartApp.selectName=Name:
SystemBasePartApp.selectPurpose=Purpose:
SystemBasePartApp.showBase10=Show base10
SystemBasePartApp.showBase16=Show base16
SystemBasePartApp.showBase27=Show base27
SystemBaseUnicodePlaneApp.title=Sys Unicode Plane
SystemBaseUnicodePlaneApp.colPlane=Unicode Plane
SystemBaseUnicodePlaneApp.colText=Example