Improved code style
This commit is contained in:
parent
b52cc50c45
commit
dc978272b4
|
@ -47,48 +47,27 @@ public enum BaseGlyphSet implements BãßBȍőnGlyphSetʸᴰ<BaseGlyphSet> {
|
||||||
TONE_SCRIPT.BȍőnGlyphSetNumber36()),
|
TONE_SCRIPT.BȍőnGlyphSetNumber36()),
|
||||||
|
|
||||||
GREEK(new BaseGlyphSetNumber("ō","α","β","γ","δ","ε","ϝ","ζ","η","θ"),
|
GREEK(new BaseGlyphSetNumber("ō","α","β","γ","δ","ε","ϝ","ζ","η","θ"),
|
||||||
LATIN_BASIC.BȍőnGlyphSetNumber16(),
|
|
||||||
new BaseGlyphSetNumber("α","β","γ","δ","ε","ϝ","ζ","η","θ","ι","κ","λ","μ","ν","ξ","ο","π","ϟ","ρ","σ","τ","υ","φ","χ","ψ","ω","ϡ")),
|
|
||||||
GREEK_HEX(GREEK.BȍőnGlyphSetNumber10(),
|
|
||||||
new BaseGlyphSetNumber("ō","α","β","γ","δ","ε","ϝ","ζ","η","θ","ι","κ","λ","μ","ν","ξ"),
|
new BaseGlyphSetNumber("ō","α","β","γ","δ","ε","ϝ","ζ","η","θ","ι","κ","λ","μ","ν","ξ"),
|
||||||
GREEK.BȍőnGlyphSetNumber36()),
|
new BaseGlyphSetNumber("α","β","γ","δ","ε","ϝ","ζ","η","θ","ι","κ","λ","μ","ν","ξ","ο","π","ϟ","ρ","σ","τ","υ","φ","χ","ψ","ω","ϡ")),
|
||||||
CYRILLIC(new BaseGlyphSetNumber("Ф","А","В","Г","Д","Є","Ѕ","З","И","Ѳ"),
|
|
||||||
LATIN_BASIC.BȍőnGlyphSetNumber16(),
|
|
||||||
new BaseGlyphSetNumber("А","В","Г","Д","Є","Ѕ","З","И","Ѳ","І","К","Л","М","Н","Ѯ","Ѻ","П","Ч","Р","С","Т","Ѵ","Ф","Х","Ѱ","Ѿ","Ц")),
|
|
||||||
CYRILLIC_HEX(CYRILLIC.BȍőnGlyphSetNumber10(),
|
|
||||||
new BaseGlyphSetNumber("Ф","А","В","Г","Д","Є","Ѕ","З","И","Ѳ","҂"," ҈"," ҉"," ꙰"," ꙱"," ꙲"),
|
|
||||||
CYRILLIC.BȍőnGlyphSetNumber36()),
|
|
||||||
BENGALI(new BaseGlyphSetNumber("০","১","২","৩","৪","৫","৬","৭","৮","৯"),
|
BENGALI(new BaseGlyphSetNumber("০","১","২","৩","৪","৫","৬","৭","৮","৯"),
|
||||||
LATIN_BASIC.BȍőnGlyphSetNumber16(),
|
|
||||||
new BaseGlyphSetNumber("ক","খ","গ","ঘ","ঙ","চ","ছ","জ","ঝ","ঞ","ট","ঠ","ড","ঢ","ণ","ত","থ","দ","ধ","ন","প","ফ","ব","ভ","ম","য","র")),
|
|
||||||
BENGALI_HEX(BENGALI.BȍőnGlyphSetNumber10(),
|
|
||||||
new BaseGlyphSetNumber("০","১","২","৩","৪","৫","৬","৭","৮","৯","জ্ঞ","ক্ষ","হ","স","ষ","শ"),
|
new BaseGlyphSetNumber("০","১","২","৩","৪","৫","৬","৭","৮","৯","জ্ঞ","ক্ষ","হ","স","ষ","শ"),
|
||||||
BENGALI.BȍőnGlyphSetNumber36()),
|
new BaseGlyphSetNumber("ক","খ","গ","ঘ","ঙ","চ","ছ","জ","ঝ","ঞ","ট","ঠ","ড","ঢ","ণ","ত","থ","দ","ধ","ন","প","ফ","ব","ভ","ম","য","র")),
|
||||||
THAI(new BaseGlyphSetNumber("๐","๑","๒","๓","๔","๕","๖","๗","๘","๙"),
|
THAI(new BaseGlyphSetNumber("๐","๑","๒","๓","๔","๕","๖","๗","๘","๙"),
|
||||||
LATIN_BASIC.BȍőnGlyphSetNumber16(),
|
|
||||||
new BaseGlyphSetNumber("๑","๒","๓","๔","๕","๖","๗","๘","๙","ก","ข","ค","ฆ","ง","จ","ฉ","ช","ฌ","ญ","ฎ","ฐ","ฑ","ฒ","ณ","ด","ท","ธ")),
|
|
||||||
THAI_HEX(THAI.BȍőnGlyphSetNumber10(),
|
|
||||||
new BaseGlyphSetNumber("๐","๑","๒","๓","๔","๕","๖","๗","๘","๙","ก","ข","ค","ฆ","ง","จ"),
|
new BaseGlyphSetNumber("๐","๑","๒","๓","๔","๕","๖","๗","๘","๙","ก","ข","ค","ฆ","ง","จ"),
|
||||||
THAI.BȍőnGlyphSetNumber36()),
|
new BaseGlyphSetNumber("๑","๒","๓","๔","๕","๖","๗","๘","๙","ก","ข","ค","ฆ","ง","จ","ฉ","ช","ฌ","ญ","ฎ","ฐ","ฑ","ฒ","ณ","ด","ท","ธ")),
|
||||||
|
|
||||||
RUNIC(new BaseGlyphSetNumber("ᛰ","ᚠ","ᚢ","ᚦ","ᚬ","ᚱ","ᚴ","ᚼ","ᚾ","ᛁ"),
|
RUNIC(new BaseGlyphSetNumber("ᛰ","ᚠ","ᚢ","ᚦ","ᚬ","ᚱ","ᚴ","ᚼ","ᚾ","ᛁ"),
|
||||||
LATIN_BASIC.BȍőnGlyphSetNumber16(),
|
|
||||||
new BaseGlyphSetNumber("ᚠ","ᚢ","ᚦ","ᚨ","ᚱ","ᚲ","ᚷ","ᚹ","ᚺ","ᚾ","ᛁ","ᛃ","ᛇ","ᛈ","ᛉ","ᛊ","ᛏ","ᛒ","ᛖ","ᛗ","ᛚ","ᛜ","ᛟ","ᛞ","ᚡ","ᚤ","ᚧ")),
|
|
||||||
RUNIC_HEX(RUNIC.BȍőnGlyphSetNumber10(),
|
|
||||||
new BaseGlyphSetNumber("ᛰ","ᚠ","ᚢ","ᚦ","ᚬ","ᚱ","ᚴ","ᚼ","ᚾ","ᛁ","ᛅ","ᛋ","ᛏ","ᛒ","ᛚ","ᛘ"),
|
new BaseGlyphSetNumber("ᛰ","ᚠ","ᚢ","ᚦ","ᚬ","ᚱ","ᚴ","ᚼ","ᚾ","ᛁ","ᛅ","ᛋ","ᛏ","ᛒ","ᛚ","ᛘ"),
|
||||||
|
new BaseGlyphSetNumber("ᚠ","ᚢ","ᚦ","ᚨ","ᚱ","ᚲ","ᚷ","ᚹ","ᚺ","ᚾ","ᛁ","ᛃ","ᛇ","ᛈ","ᛉ","ᛊ","ᛏ","ᛒ","ᛖ","ᛗ","ᛚ","ᛜ","ᛟ","ᛞ","ᚡ","ᚤ","ᚧ")),
|
||||||
|
RUNIC_TOPHEX(RUNIC.BȍőnGlyphSetNumber10(),
|
||||||
|
RUNIC.BȍőnGlyphSetNumber16().withAltGlyphSet(LATIN_TOP),
|
||||||
RUNIC.BȍőnGlyphSetNumber36()),
|
RUNIC.BȍőnGlyphSetNumber36()),
|
||||||
RUNIC_TOPHEX(RUNIC_HEX.BȍőnGlyphSetNumber10(),
|
|
||||||
RUNIC_HEX.BȍőnGlyphSetNumber16().withAltGlyphSet(LATIN_TOP),
|
|
||||||
RUNIC_HEX.BȍőnGlyphSetNumber36()),
|
|
||||||
KOREAN(new BaseGlyphSetNumber("영","일","이","삼","사","오","육","칠","팔","구"),
|
KOREAN(new BaseGlyphSetNumber("영","일","이","삼","사","오","육","칠","팔","구"),
|
||||||
LATIN_BASIC.BȍőnGlyphSetNumber16(),
|
|
||||||
new BaseGlyphSetNumber("ㄱ","ㄲ","ㄴ","ㄷ","ㄸ","ㄹ","ㅁ","ㅂ","ㅃ","ㅅ","ㅆ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ","ㄵ","ㄶ","ㄺ","ㄻ","ㄼ","ㄽ","ㄾ","ㄿ","ㅀ")),
|
|
||||||
KOREAN_HEX(KOREAN.BȍőnGlyphSetNumber10(),
|
|
||||||
new BaseGlyphSetNumber("ㅏ","ㅐ","ㅑ","ㅒ","ㅓ","ㅔ","ㅕ","ㅖ","ㅗ","ㅘ","ㅙ","ㅚ","ㅛ","ㅜ","ㅝ","ㅞ"),
|
new BaseGlyphSetNumber("ㅏ","ㅐ","ㅑ","ㅒ","ㅓ","ㅔ","ㅕ","ㅖ","ㅗ","ㅘ","ㅙ","ㅚ","ㅛ","ㅜ","ㅝ","ㅞ"),
|
||||||
|
new BaseGlyphSetNumber("ㄱ","ㄲ","ㄴ","ㄷ","ㄸ","ㄹ","ㅁ","ㅂ","ㅃ","ㅅ","ㅆ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ","ㄵ","ㄶ","ㄺ","ㄻ","ㄼ","ㄽ","ㄾ","ㄿ","ㅀ")),
|
||||||
|
KOREAN_TOPHEX(KOREAN.BȍőnGlyphSetNumber10(),
|
||||||
|
KOREAN.BȍőnGlyphSetNumber16().withAltGlyphSet(LATIN_TOP),
|
||||||
KOREAN.BȍőnGlyphSetNumber36()),
|
KOREAN.BȍőnGlyphSetNumber36()),
|
||||||
KOREAN_TOPHEX(KOREAN_HEX.BȍőnGlyphSetNumber10(),
|
|
||||||
KOREAN_HEX.BȍőnGlyphSetNumber16().withAltGlyphSet(LATIN_TOP),
|
|
||||||
KOREAN_HEX.BȍőnGlyphSetNumber36()),
|
|
||||||
|
|
||||||
CHINA(
|
CHINA(
|
||||||
new BaseGlyphSetNumber("零","一","二","三","四","五","六","七","八","九"), LATIN_BASIC.BȍőnGlyphSetNumber16(), null),
|
new BaseGlyphSetNumber("零","一","二","三","四","五","六","七","八","九"), LATIN_BASIC.BȍőnGlyphSetNumber16(), null),
|
||||||
|
@ -101,6 +80,9 @@ public enum BaseGlyphSet implements BãßBȍőnGlyphSetʸᴰ<BaseGlyphSet> {
|
||||||
JAPAN_FORMAL(
|
JAPAN_FORMAL(
|
||||||
new BaseGlyphSetNumber("零","壱","弐","参","四","五","六","七","八","九"), LATIN_BASIC.BȍőnGlyphSetNumber16(), null),
|
new BaseGlyphSetNumber("零","壱","弐","参","四","五","六","七","八","九"), LATIN_BASIC.BȍőnGlyphSetNumber16(), null),
|
||||||
|
|
||||||
|
CYRILLIC(new BaseGlyphSetNumber("Ф","А","В","Г","Д","Є","Ѕ","З","И","Ѳ"),
|
||||||
|
LATIN_BASIC.BȍőnGlyphSetNumber16(),
|
||||||
|
new BaseGlyphSetNumber("А","В","Г","Д","Є","Ѕ","З","И","Ѳ","І","К","Л","М","Н","Ѯ","Ѻ","П","Ч","Р","С","Т","Ѵ","Ф","Х","Ѱ","Ѿ","Ц")),
|
||||||
ARABIC(new BaseGlyphSetNumber("٠","١","٢","٣","٤","٥","٦","٧","٨","٩"),
|
ARABIC(new BaseGlyphSetNumber("٠","١","٢","٣","٤","٥","٦","٧","٨","٩"),
|
||||||
LATIN_BASIC.BȍőnGlyphSetNumber16(),
|
LATIN_BASIC.BȍőnGlyphSetNumber16(),
|
||||||
new BaseGlyphSetNumber("ا","ب","ج","د","ه","و","ز","ح","ط","ي","ك","ل","م","ن","س","ع","ف","ص","ق","ر","ش","ت","ث","خ","ذ","ض","ظ")),
|
new BaseGlyphSetNumber("ا","ب","ج","د","ه","و","ز","ح","ط","ي","ك","ل","م","ن","س","ع","ف","ص","ق","ر","ش","ت","ث","خ","ذ","ض","ظ")),
|
||||||
|
|
|
@ -6,6 +6,7 @@ import imgui.ImFontConfig;
|
||||||
import imgui.ImFontGlyphRangesBuilder;
|
import imgui.ImFontGlyphRangesBuilder;
|
||||||
import imgui.ImGui;
|
import imgui.ImGui;
|
||||||
import imgui.ImGuiIO;
|
import imgui.ImGuiIO;
|
||||||
|
import imgui.ImGuiStyle;
|
||||||
import imgui.gl3.ImGuiImplGl3;
|
import imgui.gl3.ImGuiImplGl3;
|
||||||
import imgui.glfw.ImGuiImplGlfw;
|
import imgui.glfw.ImGuiImplGlfw;
|
||||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||||
|
@ -31,8 +32,14 @@ public class ImGuiSetup {
|
||||||
imGuiImp.init(windowHandle, true);
|
imGuiImp.init(windowHandle, true);
|
||||||
imGuiGlImp.init("#version 140");
|
imGuiGlImp.init("#version 140");
|
||||||
ImGui.init();
|
ImGui.init();
|
||||||
|
initStyle();
|
||||||
ImGui.styleColorsLight();
|
}
|
||||||
|
|
||||||
|
private static void initStyle() {
|
||||||
|
ImGui.styleColorsDark();
|
||||||
|
ImGuiStyle style = ImGui.getStyle();
|
||||||
|
style.setWindowRounding(6f);
|
||||||
|
style.setScrollbarSize(22f);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void initFonts(final ImGuiIO io) {
|
private static void initFonts(final ImGuiIO io) {
|
||||||
|
@ -40,10 +47,10 @@ public class ImGuiSetup {
|
||||||
ImFontGlyphRangesBuilder fontBuilder = new ImFontGlyphRangesBuilder();
|
ImFontGlyphRangesBuilder fontBuilder = new ImFontGlyphRangesBuilder();
|
||||||
addRangeUnicodePlane0(fontBuilder);
|
addRangeUnicodePlane0(fontBuilder);
|
||||||
final short[] glyphRanges = fontBuilder.buildRanges();
|
final short[] glyphRanges = fontBuilder.buildRanges();
|
||||||
io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/code2000.ttf").readBytes(), 24, fontConfig, glyphRanges);
|
io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/code2000.ttf").readBytes(), 22, fontConfig, glyphRanges);
|
||||||
fontConfig.setMergeMode(true);
|
fontConfig.setMergeMode(true);
|
||||||
// note: merges 148 chars, just for 3 sub chars for SUBHEX, but still missing 2 chars from T12 alt1 clock
|
// note: merges 148 chars, just for 3 sub chars for SUBHEX, but still missing 2 chars from T12 alt1 clock
|
||||||
io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/free-sans.ttf").readBytes(), 24, fontConfig, glyphRanges);
|
io.getFonts().addFontFromMemoryTTF(Gdx.files.internal("font/free-sans.ttf").readBytes(), 22, fontConfig, glyphRanges);
|
||||||
fontConfig.destroy();
|
fontConfig.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ public class SystemBaseGlyphRenderer extends ImGuiRendererMain {
|
||||||
|
|
||||||
int flags = ImGuiTableFlags.ScrollX | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersOuter | ImGuiTableFlags.BordersV;
|
int flags = ImGuiTableFlags.ScrollX | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersOuter | ImGuiTableFlags.BordersV;
|
||||||
ImGui.beginTable("base-part", 3, flags);
|
ImGui.beginTable("base-part", 3, flags);
|
||||||
ImGui.tableSetupColumn("Language");
|
ImGui.tableSetupColumn("Script");
|
||||||
ImGui.tableSetupColumn("10Numbers");
|
ImGui.tableSetupColumn("10Numbers");
|
||||||
ImGui.tableSetupColumn("16Numbers");
|
ImGui.tableSetupColumn("16Numbers");
|
||||||
ImGui.tableHeadersRow();
|
ImGui.tableHeadersRow();
|
||||||
|
|
|
@ -92,19 +92,19 @@ public class SystemBasePartRenderer extends ImGuiRendererMain {
|
||||||
ImGui.tableNextColumn();
|
ImGui.tableNextColumn();
|
||||||
ImGui.text(part.BȍőnPrintGlyphSetNumber10(BaseGlyphSet.TONE_SCRIPT));
|
ImGui.text(part.BȍőnPrintGlyphSetNumber10(BaseGlyphSet.TONE_SCRIPT));
|
||||||
ImGui.tableNextColumn();
|
ImGui.tableNextColumn();
|
||||||
ImGui.text(part.BȍőnPrintGlyphSetNumber10(BaseGlyphSet.KOREAN_HEX));
|
ImGui.text(part.BȍőnPrintGlyphSetNumber10(BaseGlyphSet.KOREAN));
|
||||||
ImGui.tableNextColumn();
|
ImGui.tableNextColumn();
|
||||||
ImGui.text(part.BȍőnPrintGlyphSetNumber10(BaseGlyphSet.LATIN_DTMF));
|
ImGui.text(part.BȍőnPrintGlyphSetNumber10(BaseGlyphSet.LATIN_DTMF));
|
||||||
ImGui.tableNextColumn();
|
ImGui.tableNextColumn();
|
||||||
ImGui.text(part.BȍőnPrintGlyphSetNumber16(BaseGlyphSet.TONE_SCRIPT));
|
ImGui.text(part.BȍőnPrintGlyphSetNumber16(BaseGlyphSet.TONE_SCRIPT));
|
||||||
ImGui.tableNextColumn();
|
ImGui.tableNextColumn();
|
||||||
ImGui.text(part.BȍőnPrintGlyphSetNumber16(BaseGlyphSet.KOREAN_HEX));
|
ImGui.text(part.BȍőnPrintGlyphSetNumber16(BaseGlyphSet.KOREAN));
|
||||||
ImGui.tableNextColumn();
|
ImGui.tableNextColumn();
|
||||||
ImGui.text(part.BȍőnPrintGlyphSetNumber10(BaseGlyphSet.LATIN_BASIC));
|
ImGui.text(part.BȍőnPrintGlyphSetNumber10(BaseGlyphSet.LATIN_BASIC));
|
||||||
ImGui.tableNextColumn();
|
ImGui.tableNextColumn();
|
||||||
ImGui.text(part.BȍőnPrintGlyphSetNumber36(BaseGlyphSet.TONE_SCRIPT));
|
ImGui.text(part.BȍőnPrintGlyphSetNumber36(BaseGlyphSet.TONE_SCRIPT));
|
||||||
ImGui.tableNextColumn();
|
ImGui.tableNextColumn();
|
||||||
ImGui.text(part.BȍőnPrintGlyphSetNumber36(BaseGlyphSet.KOREAN_HEX));
|
ImGui.text(part.BȍőnPrintGlyphSetNumber36(BaseGlyphSet.KOREAN));
|
||||||
ImGui.tableNextColumn();
|
ImGui.tableNextColumn();
|
||||||
ImGui.text(part.BȍőnPrintGlyphSetNumber36(BaseGlyphSet.LATIN_BASIC));
|
ImGui.text(part.BȍőnPrintGlyphSetNumber36(BaseGlyphSet.LATIN_BASIC));
|
||||||
ImGui.tableNextColumn();
|
ImGui.tableNextColumn();
|
||||||
|
|
Loading…
Reference in a new issue