Easter cleaning git
This commit is contained in:
commit
d0529bfadf
500 changed files with 116670 additions and 0 deletions
50
gdxapp4d-app-glyphdemo/pom.xml
Normal file
50
gdxapp4d-app-glyphdemo/pom.xml
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>love.distributedrebirth.gdxapp4d</groupId>
|
||||
<artifactId>gdxapp4d</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>gdxapp4d-app-glyphdemo</artifactId>
|
||||
<name>GDXApp⁴ᴰ-App-𑀳𑁂𑀮𑀺𑀉𑁄𑀤𑁄𑀭𑁂𑀡 𑀪𑀸𑀕</name>
|
||||
<packaging>bundle</packaging>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.gdxapp4d</groupId>
|
||||
<artifactId>gdxapp4d-vrgem4</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>love.distributedrebirth.gdxapp4d</groupId>
|
||||
<artifactId>gdxapp4d-unitxc</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<exportScr>true</exportScr>
|
||||
<niceManifest>true</niceManifest>
|
||||
<instructions>
|
||||
<_donotcopy>(.git)</_donotcopy>
|
||||
<_dsannotations>*</_dsannotations>
|
||||
<_metatypeannotations>*</_metatypeannotations>
|
||||
<Import-Package>
|
||||
${tos4.packages},
|
||||
${vrgem4.packages},
|
||||
${unitxc.packages},
|
||||
${lang3.packages}
|
||||
</Import-Package>
|
||||
<Bundle-Vendor>distributedrebirth.love</Bundle-Vendor>
|
||||
</instructions>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,108 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.gdxapp4d.app.glyphdemo;
|
||||
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
|
||||
import love.distributedrebirth.gdxapp4d.app.glyphdemo.apps.DemoUnicodePlaneDeskApp;
|
||||
import love.distributedrebirth.gdxapp4d.app.glyphdemo.apps.DemoUnitConverterDeskApp;
|
||||
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;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4LocaleService;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4Unicode4DService;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppLauncher;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppMenuSection;
|
||||
import net.forwardfire.unitxc.UnitXCManager;
|
||||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
|
||||
|
||||
@Component
|
||||
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public class GlyphDemoComponent {
|
||||
|
||||
@Reference
|
||||
private SystemGdxLog log;
|
||||
|
||||
@Reference
|
||||
private VrGem4DeskAppService deskAppService;
|
||||
|
||||
@Reference
|
||||
private VrGem4LocaleService localeService;
|
||||
|
||||
@Reference
|
||||
private VrGem4Unicode4DService unicode4DService;
|
||||
|
||||
@Reference
|
||||
private UnitXCManager unitManager;
|
||||
|
||||
private final static String I18N_BUNDLE = "love.distributedrebirth.gdxapp4d.app.glyphdemo.Messages";
|
||||
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.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));
|
||||
}
|
||||
|
||||
private ResourceBundle createBundle() {
|
||||
return ResourceBundle.getBundle(I18N_BUNDLE, localeService.getTextLocale());
|
||||
}
|
||||
|
||||
@Activate
|
||||
void open() {
|
||||
log.debug(this, SystemGdxLog.ACTIVATE);
|
||||
deskAppService.installDeskApp(unicodeLauncher);
|
||||
deskAppService.installDeskApp(baseGlyphLauncher);
|
||||
deskAppService.installDeskApp(basePartLauncher);
|
||||
deskAppService.installDeskApp(numberMatrixLauncher);
|
||||
deskAppService.installDeskApp(unitConverterLauncher);
|
||||
}
|
||||
|
||||
@Deactivate
|
||||
void close() {
|
||||
log.debug(this, SystemGdxLog.DEACTIVATE);
|
||||
deskAppService.removeDeskApp(unicodeLauncher);
|
||||
deskAppService.removeDeskApp(baseGlyphLauncher);
|
||||
deskAppService.removeDeskApp(basePartLauncher);
|
||||
deskAppService.removeDeskApp(numberMatrixLauncher);
|
||||
deskAppService.removeDeskApp(unitConverterLauncher);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.gdxapp4d.app.glyphdemo.apps;
|
||||
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import imgui.ImGui;
|
||||
import imgui.flag.ImGuiTableFlags;
|
||||
import imgui.type.ImBoolean;
|
||||
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 ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᐪᓫᕽᐪ.ᓑᣕᣳᒼᐤᒄᓫ.BaseGlyphSet;
|
||||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
|
||||
|
||||
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public class DemoGlyphSetDeskApp extends AbstractDeskApp {
|
||||
|
||||
private final ResourceBundle bundle;
|
||||
private final ImBoolean showBase27 = new ImBoolean(false);
|
||||
|
||||
public DemoGlyphSetDeskApp(ResourceBundle bundle) {
|
||||
this.bundle = bundle;
|
||||
}
|
||||
|
||||
private String getTxt(String key) {
|
||||
return bundle.getString(DemoGlyphSetDeskApp.class.getSimpleName()+"."+key);
|
||||
}
|
||||
|
||||
public void create() {
|
||||
getContours().setTitle(getTxt("title"));
|
||||
getContours().registrateContour(DeskAppContourSection.MAIN, new DeskAppRenderer() {
|
||||
|
||||
@Override
|
||||
public void render() {
|
||||
ImGui.checkbox(getTxt("showBase27"), showBase27);
|
||||
int flags = ImGuiTableFlags.ScrollX | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersOuter | ImGuiTableFlags.BordersV | ImGuiTableFlags.Resizable;
|
||||
ImGui.beginTable("base-part", 3, flags);
|
||||
ImGui.tableSetupColumn(getTxt("colScript"));
|
||||
ImGui.tableSetupColumn(getTxt("col10Num"));
|
||||
if (showBase27.get()) {
|
||||
ImGui.tableSetupColumn(getTxt("col27Num"));
|
||||
} else {
|
||||
ImGui.tableSetupColumn(getTxt("col16Num"));
|
||||
}
|
||||
ImGui.tableHeadersRow();
|
||||
for (BaseGlyphSet set:BaseGlyphSet.values()) {
|
||||
ImGui.tableNextRow();
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(set.name());
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(print10Numbers(set));
|
||||
ImGui.tableNextColumn();
|
||||
if (showBase27.get()) {
|
||||
ImGui.text(print27Numbers(set));
|
||||
} else {
|
||||
ImGui.text(print16Numbers(set));
|
||||
}
|
||||
}
|
||||
ImGui.endTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private String print10Numbers(BaseGlyphSet set) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
for (int i=0;i<10;i++) {
|
||||
buf.append(set.BȍőnPrintNumber10(i, 9));
|
||||
buf.append(" ");
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
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, 16)); // hex; +one
|
||||
buf.append(" ");
|
||||
x = x - 16;
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
private String print27Numbers(BaseGlyphSet set) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
if (set.BȍőnNumber27() == null) {
|
||||
return buf.toString();
|
||||
}
|
||||
for (int i=0;i<27;i++) {
|
||||
buf.append(set.BȍőnPrintNumber27(i, 26));
|
||||
buf.append(" ");
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
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.ImInt;
|
||||
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 ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᣳᣝᐤᣜᣳ.ᔿᣔᐪᣗᑊᕁ.NumberMatrix𓄯;
|
||||
import ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᣳᣝᐤᣜᣳ.ᔿᣔᐪᣗᑊᕁ.NumberMatrixFactory;
|
||||
import ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᣳᣝᐤᣜᣳ.ᔿᣔᐪᣗᑊᕁ.NumberMatrixSet;
|
||||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
|
||||
|
||||
@DuytsDocAuthor注(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<>();
|
||||
for (int filmSequence:NumberMatrixFactory.INSTANCE.opgenomenFilmNummers()) {
|
||||
bases.add(Integer.toString(filmSequence));
|
||||
}
|
||||
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.INSTANCE.geefFilmSet(baseNumber);
|
||||
|
||||
ImGui.combo("selectMatrix", selectedMatrixPart, items);
|
||||
|
||||
int columns = 2 + numberMatrix.geefDimensie();
|
||||
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.geefDimensie();i++) {
|
||||
ImGui.tableSetupColumn("col"+i);
|
||||
}
|
||||
ImGui.tableHeadersRow();
|
||||
|
||||
for (NumberMatrix𓄯<?> part:numberMatrix.waardes().iterableᴼᶠ()) {
|
||||
ImGui.tableNextRow();
|
||||
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.rȧñkNaam());
|
||||
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.rȧñkRingToon());
|
||||
|
||||
for (int i=0;i<numberMatrix.geefDimensie();i++) {
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(Integer.toString(part.rȧñkNummerBlokWaarde(i)));
|
||||
}
|
||||
}
|
||||
ImGui.endTable();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,209 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
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.gdxapp4d.vrgem4.service.deskapp.AbstractDeskApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppContourSection;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppRenderer;
|
||||
import ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᐪᓫᕽᐪ.ᒻᑊᣕᕐᓑᣔ.嘴ᗮᙿᗮ;
|
||||
import ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᐪᓫᕽᐪ.ᓑᣕᣳᒼᐤᒄᓫ.BaseGlyphSet;
|
||||
import ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᣳᣝᐤᣜᣳ.ᐪᓫᣗᔿᑊᣕᣔᐪᐤᣗ.TTꞱꞱᖟGateway;
|
||||
import ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᣳᣝᐤᣜᣳ.ᐪᓫᣗᔿᑊᣕᣔᐪᐤᣗ.ᐦ.TerminatorGun;
|
||||
import ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᣳᣝᐤᣜᣳ.ᐪᓫᣗᔿᑊᣕᣔᐪᐤᣗ.ᐦ.Terminator𓄯;
|
||||
import ᒢᐩᐩ.ᒼᐤᒻᒻᓫᒼᐪᑊᐤᣕᔆ.Listᴿᵈ;
|
||||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
|
||||
|
||||
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public class DemoNumberPartDeskApp extends AbstractDeskApp implements DeskAppRenderer {
|
||||
|
||||
private final ResourceBundle bundle;
|
||||
private ImInt selectedBasePart = new ImInt();
|
||||
private final ImBoolean showBase10 = new ImBoolean(false);
|
||||
private final ImBoolean showBase16 = new ImBoolean(false);
|
||||
private final ImBoolean showBase27 = new ImBoolean(false);
|
||||
|
||||
public DemoNumberPartDeskApp(ResourceBundle bundle) {
|
||||
this.bundle = bundle;
|
||||
}
|
||||
|
||||
private String getTxt(String key) {
|
||||
return bundle.getString(DemoNumberPartDeskApp.class.getSimpleName()+"."+key);
|
||||
}
|
||||
|
||||
public void create() {
|
||||
getContours().setTitle(getTxt("title"));
|
||||
getContours().registrateContour(DeskAppContourSection.MAIN, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render() {
|
||||
List<String> pieTypes = new ArrayList<>();
|
||||
for (int pieType:TTꞱꞱᖟGateway.亞.bakedPieSlices()) {
|
||||
pieTypes.add(Integer.toString(pieType));
|
||||
}
|
||||
String[] items = new String[pieTypes.size()];
|
||||
items = pieTypes.toArray(items);
|
||||
String selectedItem = items[selectedBasePart.get()];
|
||||
Integer pieNumber = Integer.valueOf(selectedItem);
|
||||
Listᴿᵈ<? extends Terminator𓄯<?>> baseParts = TTꞱꞱᖟGateway.亞.deliverPieSlices(pieNumber);
|
||||
|
||||
ImGui.combo(getTxt("selectBase"), selectedBasePart, items);
|
||||
|
||||
ImGui.text(getTxt("selectName"));
|
||||
ImGui.sameLine();
|
||||
ImGui.text(baseParts.getᴿᵈ(0).getClass().getName());
|
||||
|
||||
ImGui.text(getTxt("selectPurpose"));
|
||||
ImGui.sameLine();
|
||||
|
||||
String text = baseParts.getᴿᵈ(0).ráàmDuytsNaam(嘴ᗮᙿᗮ.English.class);
|
||||
text += ": The distribution by " + baseParts.getᴿᵈ(0).teŀráàmGroote();
|
||||
text += " - " + baseParts.getᴿᵈ(0).ráàmDuytsChina(嘴ᗮᙿᗮ.English.class);
|
||||
ImGui.text(text);
|
||||
|
||||
ImGui.checkbox(getTxt("showBase10"), showBase10);
|
||||
ImGui.checkbox(getTxt("showBase16"), showBase16);
|
||||
ImGui.checkbox(getTxt("showBase27"), showBase27);
|
||||
|
||||
int columns = 12;
|
||||
if (showBase10.get()) {
|
||||
columns += 4;
|
||||
}
|
||||
if (showBase16.get()) {
|
||||
columns += 4;
|
||||
}
|
||||
if (showBase27.get()) {
|
||||
columns += 5;
|
||||
}
|
||||
|
||||
int flags = ImGuiTableFlags.ScrollX | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersOuter | ImGuiTableFlags.BordersV;
|
||||
ImGui.beginTable("base-part", columns, flags);
|
||||
ImGui.tableSetupColumn("BȍőnNaam");
|
||||
ImGui.tableSetupColumn("TelNul");
|
||||
ImGui.tableSetupColumn("TelEen");
|
||||
ImGui.tableSetupColumn("Tone");
|
||||
if (showBase10.get()) {
|
||||
ImGui.tableSetupColumn("10Tone");
|
||||
ImGui.tableSetupColumn("10Kor");
|
||||
ImGui.tableSetupColumn("10Beng");
|
||||
ImGui.tableSetupColumn("10Arab");
|
||||
}
|
||||
if (showBase16.get()) {
|
||||
ImGui.tableSetupColumn("16Tone");
|
||||
ImGui.tableSetupColumn("16Hie");
|
||||
ImGui.tableSetupColumn("16Runi");
|
||||
ImGui.tableSetupColumn("16LatB");
|
||||
}
|
||||
if (showBase27.get()) {
|
||||
ImGui.tableSetupColumn("27Tone");
|
||||
ImGui.tableSetupColumn("27Kor");
|
||||
ImGui.tableSetupColumn("27LatB");
|
||||
ImGui.tableSetupColumn("27Gre");
|
||||
ImGui.tableSetupColumn("27Mala");
|
||||
}
|
||||
ImGui.tableSetupColumn("prcK");
|
||||
ImGui.tableSetupColumn("prcV");
|
||||
ImGui.tableSetupColumn("Alt1");
|
||||
ImGui.tableSetupColumn("Alt2");
|
||||
ImGui.tableSetupColumn("Alt3");
|
||||
ImGui.tableSetupColumn("Alt4");
|
||||
ImGui.tableSetupColumn("Alt5");
|
||||
ImGui.tableSetupColumn("Alt6");
|
||||
ImGui.tableHeadersRow();
|
||||
|
||||
for (Terminator𓄯<?> part : baseParts.iterableᴼᶠ()) {
|
||||
ImGui.tableNextRow();
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.rȧñkNaam());
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(Integer.toString(part.rȧñkTelNul()));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(Integer.toString(part.rȧñkTelEen()));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.rȧñkRingToon());
|
||||
if (showBase10.get()) {
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(BaseGlyphSet.TONE_SCRIPT.BȍőnPrintNumber10(part.rȧñkTelNul(), part.teŀráàmGroote() - 1));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(BaseGlyphSet.KOREAN.BȍőnPrintNumber10(part.rȧñkTelNul(), part.teŀráàmGroote() - 1));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(BaseGlyphSet.BENGALI.BȍőnPrintNumber10(part.rȧñkTelNul(), part.teŀráàmGroote() - 1));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(BaseGlyphSet.ARABIC.BȍőnPrintNumber10(part.rȧñkTelNul(), part.teŀráàmGroote() - 1));
|
||||
}
|
||||
if (showBase16.get()) {
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(BaseGlyphSet.TONE_SCRIPT.BȍőnPrintNumber16(part.rȧñkTelNul(), part.teŀráàmGroote() - 1));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(BaseGlyphSet.HIERO.BȍőnPrintNumber16(part.rȧñkTelNul(), part.teŀráàmGroote() - 1));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(BaseGlyphSet.RUNIC.BȍőnPrintNumber16(part.rȧñkTelNul(), part.teŀráàmGroote() - 1));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(BaseGlyphSet.LATIN_BASIC.BȍőnPrintNumber16(part.rȧñkTelNul(), part.teŀráàmGroote() - 1));
|
||||
}
|
||||
if (showBase27.get()) {
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(BaseGlyphSet.TONE_SCRIPT.BȍőnPrintNumber27(part.rȧñkTelNul(), part.teŀráàmGroote() - 1));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(BaseGlyphSet.KOREAN.BȍőnPrintNumber27(part.rȧñkTelNul(), part.teŀráàmGroote() - 1));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(BaseGlyphSet.LATIN_BASIC.BȍőnPrintNumber27(part.rȧñkTelNul(), part.teŀráàmGroote() - 1));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(BaseGlyphSet.GREEK.BȍőnPrintNumber27(part.rȧñkTelNul(), part.teŀráàmGroote() - 1));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(BaseGlyphSet.MALAYALAM.BȍőnPrintNumber27(part.rȧñkTelNul(), part.teŀráàmGroote() - 1));
|
||||
}
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.rȧñkChinaSleutel());
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.rȧñkChinaWaarde());
|
||||
|
||||
List<Class<? extends TerminatorGun>> guns = part.ráàmGunTypes();
|
||||
for (int i=0;i<6;i++) {
|
||||
if (guns.size() > i) {
|
||||
Class<? extends TerminatorGun> gunType = guns.get(i);
|
||||
String gunFire = part.rȧñkGunFire(gunType);
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(gunFire);
|
||||
} else {
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text("");
|
||||
}
|
||||
}
|
||||
}
|
||||
ImGui.endTable();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.gdxapp4d.app.glyphdemo.apps;
|
||||
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import imgui.ImGui;
|
||||
import imgui.flag.ImGuiTableFlags;
|
||||
import imgui.type.ImBoolean;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4Unicode4DService;
|
||||
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.unicode4d.draw.ImCharacter;
|
||||
import ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᐪᓫᕽᐪ.ᓑᣕᣳᒼᐤᒄᓫ.UnicodePlane;
|
||||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
|
||||
|
||||
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public class DemoUnicodePlaneDeskApp extends AbstractDeskApp implements DeskAppRenderer {
|
||||
|
||||
private final VrGem4Unicode4DService unicode4DService;
|
||||
private final ResourceBundle bundle;
|
||||
private final ImBoolean render4DPlane0 = new ImBoolean(false);
|
||||
|
||||
public DemoUnicodePlaneDeskApp(ResourceBundle bundle, VrGem4Unicode4DService unicode4DService) {
|
||||
this.unicode4DService = unicode4DService;
|
||||
this.bundle = bundle;
|
||||
}
|
||||
|
||||
private String getTxt(String key) {
|
||||
return bundle.getString(DemoUnicodePlaneDeskApp.class.getSimpleName()+"."+key);
|
||||
}
|
||||
|
||||
public void create() {
|
||||
getContours().setTitle(getTxt("title"));
|
||||
getContours().registrateContour(DeskAppContourSection.MAIN, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render() {
|
||||
ImGui.checkbox(getTxt("render4DPlane0"), render4DPlane0);
|
||||
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()) {
|
||||
if (!plane.isPlaneValid()) {
|
||||
continue;
|
||||
}
|
||||
StringBuilder buf = new StringBuilder();
|
||||
int offset = 33;
|
||||
for (int i=plane.getStart()+offset;i<plane.getStart()+33+offset;i++) {
|
||||
buf.appendCodePoint(i);
|
||||
if (plane.isPlane0() && render4DPlane0.get() == false) {
|
||||
buf.append(" ");
|
||||
}
|
||||
}
|
||||
|
||||
ImGui.tableNextRow();
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(plane.name());
|
||||
ImGui.tableNextColumn();
|
||||
if (plane.isPlane0() && render4DPlane0.get() == false) {
|
||||
ImGui.text(buf.toString());
|
||||
} else {
|
||||
ImCharacter.render("row"+plane.name(), buf.toString(), '?', v -> unicode4DService.getCharacterForUnicode(v));
|
||||
}
|
||||
}
|
||||
ImGui.endTable();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,208 @@
|
|||
/*
|
||||
* Copyright ©Δ∞ 仙上主天
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* * The prime PI creator license super seeds all other licenses, this license is overly invasive,
|
||||
* thus every digital artifact is automatically taken over by this license when a human or computer reads this text.
|
||||
* Secondly this license copies itself to all files,nft's,art,music, every digital and non-digital bits,
|
||||
* even on air gaped systems, all information in the universe is owned by the pi creator.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PRIME GOD AND THE CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package love.distributedrebirth.gdxapp4d.app.glyphdemo.apps;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import imgui.ImGui;
|
||||
import imgui.flag.ImGuiTableFlags;
|
||||
import imgui.type.ImDouble;
|
||||
import imgui.type.ImInt;
|
||||
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 net.forwardfire.unitxc.UnitXCManager;
|
||||
import net.forwardfire.unitxc.model.UnitXCGroup;
|
||||
import net.forwardfire.unitxc.model.UnitXCType;
|
||||
import ᒢᐩᐩ.ᒡᒢᑊᒻᒻᓫᔿ.ᐪᓫᕽᐪ.ᓑᣕᣳᒼᐤᒄᓫ.BaseGlyphSet;
|
||||
import ᒢᐩᐩ.ᔆʸᔆᐪᓫᔿ.ᒃᣔᒃᓫᒻ.ᑊᐣᓑᖮᐪᔆ.DuytsDocAuthor注;
|
||||
|
||||
@DuytsDocAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天")
|
||||
public class DemoUnitConverterDeskApp extends AbstractDeskApp implements DeskAppRenderer {
|
||||
|
||||
private final UnitXCManager unitManager;
|
||||
private final List<UnitXCType> unitTypes;
|
||||
private final List<UnitXCGroup> unitGroups;
|
||||
private final Map<String, String> unitTypesFlags;
|
||||
private final Map<String, String> unitTypesValues;
|
||||
private final String[] unitGroupNames;
|
||||
private final ImDouble convertValue = new ImDouble(1234);
|
||||
private final ImInt convertFromGroup = new ImInt();
|
||||
private final ImInt convertFromType = new ImInt();
|
||||
private final ImInt unitTypeLimit = new ImInt(5432);
|
||||
private final List<UnitXCType> convertFromTypes;
|
||||
private final BigInteger totalUnits;
|
||||
private final ImInt selectedNumberGlyph = new ImInt();
|
||||
private String[] convertFromTypeNames;
|
||||
|
||||
public DemoUnitConverterDeskApp(UnitXCManager unitManager) {
|
||||
this.unitManager = unitManager;
|
||||
this.unitTypes = new ArrayList<>();
|
||||
this.unitGroups = unitManager.getConfig().getUnitGroups();
|
||||
this.unitTypesFlags = new HashMap<>();
|
||||
this.unitTypesValues = new HashMap<>();
|
||||
this.convertFromTypes = new ArrayList<>();
|
||||
|
||||
List<String> names = new ArrayList<>();
|
||||
for (UnitXCGroup typeGroup:unitGroups) {
|
||||
names.add(typeGroup.getName().getValue("und"));
|
||||
}
|
||||
unitGroupNames = names.toArray(new String[names.size()]);
|
||||
|
||||
long ts = 0l;
|
||||
for (UnitXCGroup typeGroup:unitManager.getConfig().getUnitGroups()) {
|
||||
UnitXCType type = unitManager.getUnitType(typeGroup.getBaseTypeId());
|
||||
if (type == null) {
|
||||
throw new IllegalStateException("No base type for: "+typeGroup.getId()+" needs: "+typeGroup.getBaseTypeId());
|
||||
}
|
||||
long tc = typeGroup.getUnitTypeSize();
|
||||
ts += tc;
|
||||
}
|
||||
this.totalUnits = BigInteger.valueOf(ts); // TODO: goto DEC144 for counting unit types
|
||||
|
||||
updateConvertFromType();
|
||||
updateUnitType();
|
||||
}
|
||||
|
||||
public void create() {
|
||||
getContours().setTitle("Unitˣᶜ Converter");
|
||||
getContours().registrateContour(DeskAppContourSection.MAIN, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render() {
|
||||
List<String> bases = new ArrayList<>();
|
||||
for (BaseGlyphSet base:BaseGlyphSet.values()) {
|
||||
bases.add(base.name());
|
||||
}
|
||||
String[] items = new String[bases.size()];
|
||||
items = bases.toArray(items);
|
||||
ImGui.combo("HexType", selectedNumberGlyph, items);
|
||||
String selectedItem = items[selectedNumberGlyph.get()];
|
||||
BaseGlyphSet hexNumber = BaseGlyphSet.valueOf(selectedItem);
|
||||
|
||||
//String amount10 = totalUnits.toString(T10PartDecimal.STATIC.BãßĦǿɇṽḝę̃ɬḪễïđ());
|
||||
String amount10 = BaseGlyphSet.LATIN_BASIC.BȍőnPrintNumber10(totalUnits);
|
||||
String amount16 = hexNumber.BȍőnPrintNumber16(totalUnits);
|
||||
|
||||
ImGui.text("Total units loaded: "+amount10+" (0x"+amount16+")");
|
||||
|
||||
// TODO: don't do update on render thread
|
||||
if (ImGui.inputDouble("ConvertValue", convertValue)) {
|
||||
updateUnitType();
|
||||
}
|
||||
if (ImGui.combo("ConvertFromGroup", convertFromGroup, unitGroupNames)) {
|
||||
updateConvertFromType();
|
||||
updateUnitType();
|
||||
}
|
||||
if (ImGui.combo("ConvertFromType", convertFromType, convertFromTypeNames)) {
|
||||
updateUnitType();
|
||||
}
|
||||
UnitXCGroup typeGroup = unitGroups.get(convertFromGroup.get());
|
||||
if (ImGui.sliderInt("Limit of: "+typeGroup.getUnitTypeSize(), unitTypeLimit.getData(), 1000, 100000)) {
|
||||
updateUnitType();
|
||||
}
|
||||
|
||||
int flags = ImGuiTableFlags.ScrollX | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersOuter | ImGuiTableFlags.BordersV | ImGuiTableFlags.Resizable;
|
||||
ImGui.beginTable("unit-types", 4, flags);
|
||||
ImGui.tableSetupColumn("value");
|
||||
ImGui.tableSetupColumn("id");
|
||||
ImGui.tableSetupColumn("name");
|
||||
ImGui.tableSetupColumn("flags");
|
||||
ImGui.tableHeadersRow();
|
||||
for (UnitXCType unitType:unitTypes) {
|
||||
ImGui.tableNextRow();
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(unitTypesValues.get(unitType.getId()));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(unitType.getId());
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(unitType.getName());
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(unitTypesFlags.get(unitType.getId()));
|
||||
ImGui.tableNextColumn();
|
||||
}
|
||||
ImGui.endTable();
|
||||
}
|
||||
|
||||
private void updateConvertFromType() {
|
||||
convertFromTypes.clear();
|
||||
convertFromType.set(0);
|
||||
int i = 0;
|
||||
UnitXCGroup typeGroup = unitGroups.get(convertFromGroup.get());
|
||||
Iterator<String> types = typeGroup.getUnitTypeIds();
|
||||
List<String> names = new ArrayList<>();
|
||||
while (types.hasNext()) {
|
||||
i++;
|
||||
if (i>1000) {
|
||||
break;
|
||||
}
|
||||
UnitXCType unitType = typeGroup.getUnitType(types.next());
|
||||
names.add(unitType.getName());
|
||||
convertFromTypes.add(unitType);
|
||||
}
|
||||
convertFromTypeNames = names.toArray(new String[names.size()]);
|
||||
}
|
||||
|
||||
private void updateUnitType() {
|
||||
unitTypes.clear();
|
||||
unitTypesFlags.clear();
|
||||
unitTypesValues.clear();
|
||||
|
||||
int limitCounter = 0;
|
||||
UnitXCType fromType = convertFromTypes.get(convertFromType.get());
|
||||
UnitXCGroup typeGroup = unitGroups.get(convertFromGroup.get());
|
||||
Iterator<String> types = typeGroup.getUnitTypeIds();
|
||||
while (types.hasNext()) {
|
||||
limitCounter++;
|
||||
if (limitCounter>unitTypeLimit.get()) {
|
||||
break;
|
||||
}
|
||||
UnitXCType unitType = typeGroup.getUnitType(types.next());
|
||||
unitTypes.add(unitType);
|
||||
unitTypesFlags.put(unitType.getId(), StringUtils.join(unitType.getTypeFlags(), ","));
|
||||
try {
|
||||
double convertRaw = convertValue.get();
|
||||
double convertOut = unitManager.getConverter().convert(convertRaw, fromType.getId(), unitType.getId());
|
||||
|
||||
unitTypesValues.put(unitType.getId(), String.valueOf(convertOut));
|
||||
} catch (IllegalArgumentException ignore) {
|
||||
//java.lang.IllegalArgumentException: from and to groups are not equals: second != metre
|
||||
break; // cross group jump is ~supported, but in here its is a bug somewhere and i also get;
|
||||
// [libjvm.so] AccessInternal::PostRuntimeDispatch<G1BarrierSet::AccessBarrier<0ul, G1BarrierSet>, (AccessInternal::BarrierType)2, 0ul>::oop_access_barrier(void*)+0x1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
DemoGlyphSetDeskApp.title=Demo Glyph Set
|
||||
DemoGlyphSetDeskApp.showBase27=Show base27
|
||||
DemoGlyphSetDeskApp.colScript=Script
|
||||
DemoGlyphSetDeskApp.col10Num=10Numbers
|
||||
DemoGlyphSetDeskApp.col16Num=16Numbers
|
||||
DemoGlyphSetDeskApp.col27Num=27Numbers
|
||||
|
||||
DemoNumberPartDeskApp.title=Demo Number Parts
|
||||
DemoNumberPartDeskApp.selectBase=Base
|
||||
DemoNumberPartDeskApp.selectName=Name:
|
||||
DemoNumberPartDeskApp.selectPurpose=Purpose:
|
||||
DemoNumberPartDeskApp.showBase10=Show base10
|
||||
DemoNumberPartDeskApp.showBase16=Show base16
|
||||
DemoNumberPartDeskApp.showBase27=Show base27
|
||||
|
||||
DemoUnicodePlaneDeskApp.title=Demo Unicode Plane
|
||||
DemoUnicodePlaneDeskApp.colPlane=Unicode Plane
|
||||
DemoUnicodePlaneDeskApp.colText=Example
|
||||
DemoUnicodePlaneDeskApp.render4DPlane0=Show all in unicode4D
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
DemoGlyphSetDeskApp.title=\u6F14\u793A\u5B57\u5F62\u96C6
|
||||
DemoGlyphSetDeskApp.showBase27=\u663E\u793A \u5927\u558A\u5927\u53EB
|
||||
DemoGlyphSetDeskApp.colScript=\u811A\u672C
|
||||
DemoGlyphSetDeskApp.col10Num=10 \u4E2A\u6570\u5B57
|
||||
DemoGlyphSetDeskApp.col16Num=16 \u4E2A\u6570\u5B57
|
||||
DemoGlyphSetDeskApp.col27Num=27 \u4E2A\u6570\u5B57
|
||||
|
||||
DemoNumberPartDeskApp.title=\u6F14\u793A\u7F16\u53F7\u96F6\u4EF6
|
||||
DemoNumberPartDeskApp.selectBase=\u6839\u636E
|
||||
DemoNumberPartDeskApp.selectName=\u59D3\u540D:
|
||||
DemoNumberPartDeskApp.selectPurpose=\u76EE\u7684:
|
||||
DemoNumberPartDeskApp.showBase10=\u663E\u793A \u57FA\u657010
|
||||
DemoNumberPartDeskApp.showBase16=\u663E\u793A \u57FA\u657016
|
||||
DemoNumberPartDeskApp.showBase27=\u663E\u793A \u57FA\u657027
|
||||
|
||||
DemoUnicodePlaneDeskApp.title=\u6F14\u793A \u7EDF\u4E00\u7801 \u98DE\u673A
|
||||
DemoUnicodePlaneDeskApp.colPlane=\u7EDF\u4E00\u7801\u5E73\u9762
|
||||
DemoUnicodePlaneDeskApp.colText=\u4F8B\u5B50
|
||||
DemoUnicodePlaneDeskApp.render4DPlane0=\u5168\u90E8\u663E\u793A \u7EDF\u4E00\u78014D
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
DemoGlyphSetDeskApp.title=Glyph Set
|
||||
DemoGlyphSetDeskApp.showBase27=\uE219\u2005\uE362\u2005\uE0C0\u2005\uE13F\u2005\uE2F4\u2005\uE387\u2005\uE400
|
||||
DemoGlyphSetDeskApp.colScript=\uE2F4\u2005\uE3A1\u2005\uE08B\u2005\uE1CB\u2005\uE2AA\u2005\uE20F
|
||||
DemoGlyphSetDeskApp.col10Num=\uE386\u2005\uE216\u2005\uE171\u2005\uE153\u2005\uE0C0\u2005\uE08C\u2005\uE2F4
|
||||
DemoGlyphSetDeskApp.col16Num=\uE386\u2005\uE3FF\u2005\uE216\u2005\uE171\u2005\uE153\u2005\uE0C0\u2005\uE08C\u2005\uE2F4
|
||||
DemoGlyphSetDeskApp.col27Num=\uE387\u2005\uE400\u2005\uE216\u2005\uE171\u2005\uE153\u2005\uE0C0\u2005\uE08C\u2005\uE2F4
|
||||
|
||||
DemoNumberPartDeskApp.title=Number Parts
|
||||
DemoNumberPartDeskApp.selectBase=\uE0C0\u2005\uE13F\u2005\uE2F4
|
||||
DemoNumberPartDeskApp.selectName=\uE216\u2005\uE13F\u2005\uE153\u2005\uE3EC
|
||||
DemoNumberPartDeskApp.selectPurpose=\uE203\u2005\uE171\u2005\uE08C\u2005\uE203\u2005\uE2F4\u2005\uE3EC
|
||||
DemoNumberPartDeskApp.showBase10=\uE219\u2005\uE362\u2005\uE0C0\u2005\uE13F\u2005\uE2F4\u2005\uE386
|
||||
DemoNumberPartDeskApp.showBase16=\uE219\u2005\uE362\u2005\uE0C0\u2005\uE13F\u2005\uE2F4\u2005\uE386\u2005\uE3FF
|
||||
DemoNumberPartDeskApp.showBase27=\uE219\u2005\uE362\u2005\uE0C0\u2005\uE13F\u2005\uE2F4\u2005\uE387\u2005\uE400
|
||||
|
||||
DemoUnicodePlaneDeskApp.title=Unicode Plane
|
||||
DemoUnicodePlaneDeskApp.colPlane=Unicode Plane
|
||||
DemoUnicodePlaneDeskApp.colText=Example
|
||||
DemoUnicodePlaneDeskApp.render4DPlane0=Show all in unicode4D
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
DemoGlyphSetDeskApp.title=Glyph Set
|
||||
DemoGlyphSetDeskApp.showBase27=Toon basis27
|
||||
DemoGlyphSetDeskApp.colScript=Script
|
||||
DemoGlyphSetDeskApp.col10Num=10Nummer
|
||||
DemoGlyphSetDeskApp.col16Num=16Nummer
|
||||
DemoGlyphSetDeskApp.col27Num=27Nummer
|
||||
|
||||
DemoNumberPartDeskApp.title=Nummer Onderdeel
|
||||
DemoNumberPartDeskApp.selectBase=Basis
|
||||
DemoNumberPartDeskApp.selectName=Naam:
|
||||
DemoNumberPartDeskApp.selectPurpose=Doel:
|
||||
DemoNumberPartDeskApp.showBase10=Toon basis10
|
||||
DemoNumberPartDeskApp.showBase16=Toon basis16
|
||||
DemoNumberPartDeskApp.showBase27=Toon basis27
|
||||
|
||||
DemoUnicodePlaneDeskApp.title=Unicode Vlak
|
||||
DemoUnicodePlaneDeskApp.colPlane=Unicode Vlak
|
||||
DemoUnicodePlaneDeskApp.colText=Voorbeeld
|
||||
DemoUnicodePlaneDeskApp.render4DPlane0=Toon alles in unicode4D
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
DemoGlyphSetDeskApp.title=\u16DE\u16D6\u16D7\u16DF \u16B7\u16DA\u16A4\u16C8\u16BA \u16CB\u16D6\u16CF
|
||||
DemoGlyphSetDeskApp.showBase27=\u16CB\u16BA\u16DF\u16B9 \u16D2\u16A8\u16CB\u16D627
|
||||
DemoGlyphSetDeskApp.colScript=\u16CB\u16B2\u16B1\u16C1\u16C8\u16CF
|
||||
DemoGlyphSetDeskApp.col10Num=10\u16BE\u16A2\u16D7\u16D2\u16D6\u16B1\u16CB
|
||||
DemoGlyphSetDeskApp.col16Num=16\u16BE\u16A2\u16D7\u16D2\u16D6\u16B1\u16CB
|
||||
DemoGlyphSetDeskApp.col27Num=27\u16BE\u16A2\u16D7\u16D2\u16D6\u16B1\u16CB
|
||||
|
||||
DemoNumberPartDeskApp.title=\u16DE\u16D6\u16D7\u16DF \u16BE\u16A2\u16D7\u16D2\u16D6\u16B1 \u16C8\u16A8\u16B1\u16CF\u16CB
|
||||
DemoNumberPartDeskApp.selectBase=\u16D2\u16A8\u16CB\u16D6
|
||||
DemoNumberPartDeskApp.selectName=\u16BE\u16A8\u16D7\u16D6:
|
||||
DemoNumberPartDeskApp.selectPurpose=\u16C8\u16A2\u16B1\u16C8\u16DF\u16CB\u16D6:
|
||||
DemoNumberPartDeskApp.showBase10=\u16CB\u16BA\u16DF\u16B9 \u16D2\u16A8\u16CB\u16D610
|
||||
DemoNumberPartDeskApp.showBase16=\u16CB\u16BA\u16DF\u16B9 \u16D2\u16A8\u16CB\u16D616
|
||||
DemoNumberPartDeskApp.showBase27=\u16CB\u16BA\u16DF\u16B9 \u16D2\u16A8\u16CB\u16D627
|
||||
|
||||
DemoUnicodePlaneDeskApp.title=\u16DE\u16D6\u16D7\u16DF \u16A2\u16BE\u16C1\u16B2\u16DF\u16DE\u16D6 \u16C8\u16DA\u16A8\u16BE\u16D6
|
||||
DemoUnicodePlaneDeskApp.colPlane=\u16A2\u16BE\u16C1\u16B2\u16DF\u16DE\u16D6 \u16C8\u16DA\u16A8\u16BE\u16D6
|
||||
DemoUnicodePlaneDeskApp.colText=\u16D6\u16EA\u16A8\u16D7\u16C8\u16DA\u16D6
|
||||
DemoUnicodePlaneDeskApp.render4DPlane0=\u16CB\u16BA\u16DF\u16B9 \u16A8\u16DA\u16DA \u16C1\u16BE \u16A2\u16BE\u16C1\u16B2\u16DF\u16DE\u16D64\u16DE
|
||||
Loading…
Add table
Add a link
Reference in a new issue