Added number matrix viewer and fixed generator

This commit is contained in:
Willem Cazander 2022-10-23 05:22:44 +02:00
parent ce325e4bf9
commit 7c0c7d7df7
14 changed files with 136 additions and 56 deletions

View file

@ -11,6 +11,7 @@ import love.distributedrebirth.gdxapp4d.app.glyphdemo.apps.DemoUnicodePlaneDeskA
import love.distributedrebirth.gdxapp4d.app.glyphdemo.apps.DemoUnitConverterDeskApp;
import love.distributedrebirth.bassboon.clazz.BãßBȍőnAuthor注;
import love.distributedrebirth.gdxapp4d.app.glyphdemo.apps.DemoGlyphSetDeskApp;
import love.distributedrebirth.gdxapp4d.app.glyphdemo.apps.DemoNumberMatrixDeskApp;
import love.distributedrebirth.gdxapp4d.app.glyphdemo.apps.DemoNumberPartDeskApp;
import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxLog;
import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4DeskAppService;
@ -43,12 +44,14 @@ public class GlyphDemoComponent {
private final DeskAppLauncher unicodeLauncher;
private final DeskAppLauncher baseGlyphLauncher;
private final DeskAppLauncher basePartLauncher;
private final DeskAppLauncher numberMatrixLauncher;
private final DeskAppLauncher unitConverterLauncher;
public GlyphDemoComponent() {
unicodeLauncher = new DeskAppLauncher(DeskAppMenuSection.PROGRAMMING, "Unicode Plane", () -> new DemoUnicodePlaneDeskApp(createBundle(), unicode4DService));
baseGlyphLauncher = new DeskAppLauncher(DeskAppMenuSection.PROGRAMMING, "Glyph Set", () -> new DemoGlyphSetDeskApp(createBundle()));
basePartLauncher = new DeskAppLauncher(DeskAppMenuSection.PROGRAMMING, "Number Parts", () -> new DemoNumberPartDeskApp(createBundle()));
basePartLauncher = new DeskAppLauncher(DeskAppMenuSection.EDUCATION, "Number Parts", () -> new DemoNumberPartDeskApp(createBundle()));
numberMatrixLauncher = new DeskAppLauncher(DeskAppMenuSection.EDUCATION, "Number Matrix", () -> new DemoNumberMatrixDeskApp(createBundle()));
unitConverterLauncher = new DeskAppLauncher(DeskAppMenuSection.SCIENCE, "Unitˣᶜ Converter", () -> new DemoUnitConverterDeskApp(unitManager));
}
@ -62,6 +65,7 @@ public class GlyphDemoComponent {
deskAppService.installDeskApp(unicodeLauncher);
deskAppService.installDeskApp(baseGlyphLauncher);
deskAppService.installDeskApp(basePartLauncher);
deskAppService.installDeskApp(numberMatrixLauncher);
deskAppService.installDeskApp(unitConverterLauncher);
}
@ -71,6 +75,7 @@ public class GlyphDemoComponent {
deskAppService.removeDeskApp(unicodeLauncher);
deskAppService.removeDeskApp(baseGlyphLauncher);
deskAppService.removeDeskApp(basePartLauncher);
deskAppService.removeDeskApp(numberMatrixLauncher);
deskAppService.removeDeskApp(unitConverterLauncher);
}
}

View file

@ -0,0 +1,88 @@
package love.distributedrebirth.gdxapp4d.app.glyphdemo.apps;
import java.util.ArrayList;
import java.util.List;
import java.util.ResourceBundle;
import imgui.ImGui;
import imgui.flag.ImGuiTableFlags;
import imgui.type.ImBoolean;
import imgui.type.ImInt;
import love.distributedrebirth.bassboon.clazz.BãßBȍőnAuthor注;
import love.distributedrebirth.bassboon.jpp.lang.number.matrix.BãßBȍőnNumberMatrixʸᴰ;
import love.distributedrebirth.bassboon.jpp.lang.number.matrix.NumberMatrixFactory;
import love.distributedrebirth.bassboon.jpp.lang.number.matrix.NumberMatrixSet;
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.AbstractDeskApp;
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppContourSection;
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppRenderer;
import love.distributedrebirth.numberxd.base2t.Base2PartsFactory;
import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartAlt1ʸᴰ;
import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartAlt2ʸᴰ;
import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartAlt3ʸᴰ;
import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartAlt4ʸᴰ;
import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartʸᴰ;
import love.distributedrebirth.numberxd.unicode.BaseGlyphSet;
@BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
public class DemoNumberMatrixDeskApp extends AbstractDeskApp implements DeskAppRenderer {
private final ResourceBundle bundle;
private ImInt selectedMatrixPart = new ImInt();
public DemoNumberMatrixDeskApp(ResourceBundle bundle) {
this.bundle = bundle;
}
// private String getTxt(String key) {
// return bundle.getString(DemoNumberMatrixDeskApp.class.getSimpleName()+"."+key);
// }
public void create() {
getContours().setTitle("NumberMatrix");
getContours().registrateContour(DeskAppContourSection.MAIN, this);
}
@Override
public void render() {
List<String> bases = new ArrayList<>();
bases.add("2");
bases.add("3");
bases.add("4");
bases.add("5");
bases.add("6");
bases.add("7");
String[] items = new String[bases.size()];
items = bases.toArray(items);
String selectedItem = items[selectedMatrixPart.get()];
Integer baseNumber = Integer.valueOf(selectedItem);
NumberMatrixSet numberMatrix = NumberMatrixFactory.ײاللهזأَكْبَرײ.getFilmRol(baseNumber);
ImGui.combo("selectMatrix", selectedMatrixPart, items);
int columns = 2 + numberMatrix.getDimension();
int flags = ImGuiTableFlags.ScrollX | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersOuter | ImGuiTableFlags.BordersV;
ImGui.beginTable("base-part", columns, flags);
ImGui.tableSetupColumn("rȧñkNaam");
ImGui.tableSetupColumn("rȧñkRingToon");
for (int i=0;i<numberMatrix.getDimension();i++) {
ImGui.tableSetupColumn("col"+i);
}
ImGui.tableHeadersRow();
for (BãßBȍőnNumberMatrixʸᴰ<?> part:numberMatrix.values()) {
ImGui.tableNextRow();
ImGui.tableNextColumn();
ImGui.text(part.rȧñkNaam());
ImGui.tableNextColumn();
ImGui.text(part.rȧñkRingToon());
for (int i=0;i<numberMatrix.getDimension();i++) {
ImGui.tableNextColumn();
ImGui.text(Integer.toString(part.rȧñkNummerBlokWaarde(i)));
}
}
ImGui.endTable();
}
}