Fixed i18n and naming
This commit is contained in:
parent
231abff3fd
commit
2624eb4dea
19 changed files with 244 additions and 75 deletions
|
|
@ -56,18 +56,18 @@ public class VrGem4LocaleServiceImpl implements VrGem4LocaleService {
|
|||
void close() {
|
||||
log.debug(this, SystemGdxLog.DEACTIVATE);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setTextLocaleI18n(String isoCode) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getTextLocaleI18n() {
|
||||
return properties.getProperty(LocaleKey.TEXT_LOCALE.name(), "en");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Locale getTextLocale() {
|
||||
return new Locale(getTextLocaleI18n());
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.view;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
|
|
@ -23,8 +22,6 @@ import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppContourSec
|
|||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppLauncher;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppMenuSection;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.deskapp.DeskAppRenderer;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.view.apps.SystemBaseGlyphApp;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.view.apps.SystemBasePartApp;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class DeskTopScreenMenu {
|
||||
|
|
@ -32,7 +29,6 @@ public class DeskTopScreenMenu {
|
|||
private SystemGdxBootArgs bootArgs;
|
||||
private SystemGdxTerminal terminal;
|
||||
private VrGem4DeskAppServiceImpl deskAppService;
|
||||
private List<DeskAppLauncher> apps;
|
||||
private ImBoolean fileMinimizeSelected = new ImBoolean(false);
|
||||
private ImBoolean fileCloseSelected = new ImBoolean(false);
|
||||
private ImBoolean tosSelfSelected = new ImBoolean(false);
|
||||
|
|
@ -41,9 +37,6 @@ public class DeskTopScreenMenu {
|
|||
this.bootArgs = bootArgs;
|
||||
this.terminal = terminal;
|
||||
this.deskAppService = deskAppService;
|
||||
apps = new ArrayList<>();
|
||||
apps.add(new DeskAppLauncher(DeskAppMenuSection.PROGRAMMING, "Sys Glyph Set", () -> new SystemBaseGlyphApp()));
|
||||
apps.add(new DeskAppLauncher(DeskAppMenuSection.PROGRAMMING, "Sys Number Parts", () -> new SystemBasePartApp()));
|
||||
}
|
||||
|
||||
public void renderMenu(DeskTopScreen appScreen) {
|
||||
|
|
@ -211,14 +204,6 @@ public class DeskTopScreenMenu {
|
|||
}
|
||||
ImGui.separator();
|
||||
if (ImGui.beginMenu(FontAwesomeIcons.PlusSquare + " Start App")) {
|
||||
for (DeskAppLauncher launcher: apps) {
|
||||
if (ImGui.menuItem(launcher.getName())) {
|
||||
DeskApp controller = launcher.getLauncher().get();
|
||||
controller.create();
|
||||
appScreen.getDeskAppController().addDeskApp(controller);
|
||||
}
|
||||
}
|
||||
ImGui.separator();
|
||||
for (DeskAppMenuSection section: DeskAppMenuSection.values()) {
|
||||
if (section.isSystem()) {
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -1,94 +0,0 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.view.apps;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import imgui.ImGui;
|
||||
import imgui.flag.ImGuiTableFlags;
|
||||
import imgui.type.ImBoolean;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
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.glyph.BaseGlyphSet;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class SystemBaseGlyphApp extends AbstractDeskApp {
|
||||
|
||||
private final ImBoolean showBase27 = new ImBoolean(false);
|
||||
|
||||
private String getTxt(String key) {
|
||||
ResourceBundle bundle = ResourceBundle.getBundle("love.distributedrebirth.gdxapp.Main", new Locale("en"));
|
||||
return bundle.getString("SystemBaseGlyphApp."+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.BȍőnNaam());
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,186 +0,0 @@
|
|||
package love.distributedrebirth.gdxapp4d.vrgem4.view.apps;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import imgui.ImGui;
|
||||
import imgui.flag.ImGuiTableFlags;
|
||||
import imgui.type.ImBoolean;
|
||||
import imgui.type.ImInt;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
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.glyph.BaseGlyphSet;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class SystemBasePartApp extends AbstractDeskApp implements DeskAppRenderer {
|
||||
|
||||
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);
|
||||
|
||||
private String getTxt(String key) {
|
||||
ResourceBundle bundle = ResourceBundle.getBundle("love.distributedrebirth.gdxapp.Main", new Locale("en"));
|
||||
return bundle.getString("SystemBasePartApp."+key);
|
||||
}
|
||||
|
||||
public void create() {
|
||||
getContours().setTitle(getTxt("title"));
|
||||
getContours().registrateContour(DeskAppContourSection.MAIN, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render() {
|
||||
List<String> bases = new ArrayList<>();
|
||||
for (int base:Base2PartsFactory.INSTANCE.BãßBases()) {
|
||||
bases.add(Integer.toString(base));
|
||||
}
|
||||
String[] items = new String[bases.size()];
|
||||
items = bases.toArray(items);
|
||||
String selectedItem = items[selectedBasePart.get()];
|
||||
Integer baseNumber = Integer.valueOf(selectedItem);
|
||||
BãßBȍőnPartʸᴰ<?>[] baseParts = Base2PartsFactory.INSTANCE.BãßBuildPartsByBase(baseNumber);
|
||||
|
||||
ImGui.combo(getTxt("selectBase"), selectedBasePart, items);
|
||||
|
||||
ImGui.text(getTxt("selectName"));
|
||||
ImGui.sameLine();
|
||||
ImGui.text(baseParts[0].BãßClassNaam());
|
||||
|
||||
ImGui.text(getTxt("selectPurpose"));
|
||||
ImGui.sameLine();
|
||||
ImGui.text(baseParts[0].BãßClassPurpose());
|
||||
|
||||
ImGui.checkbox(getTxt("showBase10"), showBase10);
|
||||
ImGui.checkbox(getTxt("showBase16"), showBase16);
|
||||
ImGui.checkbox(getTxt("showBase27"), showBase27);
|
||||
|
||||
int columns = 10;
|
||||
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("16Kor");
|
||||
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.tableHeadersRow();
|
||||
|
||||
for (BãßBȍőnPartʸᴰ<?> part:baseParts) {
|
||||
ImGui.tableNextRow();
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnNaam());
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(Integer.toString(part.BȍőnRangTelNul()));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(Integer.toString(part.BȍőnRangTelEen()));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnDialTone());
|
||||
if (showBase10.get()) {
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber10(BaseGlyphSet.TONE_SCRIPT));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber10(BaseGlyphSet.KOREAN));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber10(BaseGlyphSet.BENGALI));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber10(BaseGlyphSet.ARABIC));
|
||||
}
|
||||
if (showBase16.get()) {
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber16(BaseGlyphSet.TONE_SCRIPT));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber16(BaseGlyphSet.KOREAN));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber16(BaseGlyphSet.RUNIC));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber16(BaseGlyphSet.LATIN_BASIC));
|
||||
}
|
||||
if (showBase27.get()) {
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber27(BaseGlyphSet.TONE_SCRIPT));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber27(BaseGlyphSet.KOREAN));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber27(BaseGlyphSet.LATIN_BASIC));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber27(BaseGlyphSet.GREEK));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnPrintGlyphSetNumber27(BaseGlyphSet.MALAYALAM));
|
||||
}
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnChinaKey());
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.BȍőnChinaValue());
|
||||
|
||||
ImGui.tableNextColumn();
|
||||
if (part instanceof BãßBȍőnPartAlt1ʸᴰ) {
|
||||
ImGui.text(BãßBȍőnPartAlt1ʸᴰ.class.cast(part).BȍőnAlt1Value());
|
||||
} else {
|
||||
ImGui.text("");
|
||||
}
|
||||
ImGui.tableNextColumn();
|
||||
if (part instanceof BãßBȍőnPartAlt2ʸᴰ) {
|
||||
ImGui.text(BãßBȍőnPartAlt2ʸᴰ.class.cast(part).BȍőnAlt2Value());
|
||||
} else {
|
||||
ImGui.text("");
|
||||
}
|
||||
ImGui.tableNextColumn();
|
||||
if (part instanceof BãßBȍőnPartAlt3ʸᴰ) {
|
||||
ImGui.text(BãßBȍőnPartAlt3ʸᴰ.class.cast(part).BȍőnAlt3Value());
|
||||
} else {
|
||||
ImGui.text("");
|
||||
}
|
||||
ImGui.tableNextColumn();
|
||||
if (part instanceof BãßBȍőnPartAlt4ʸᴰ) {
|
||||
ImGui.text(BãßBȍőnPartAlt4ʸᴰ.class.cast(part).BȍőnAlt4Value());
|
||||
} else {
|
||||
ImGui.text("");
|
||||
}
|
||||
}
|
||||
ImGui.endTable();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue