Added 60 part
This commit is contained in:
parent
390a6c657e
commit
3763ee3fdd
20 changed files with 184 additions and 97 deletions
|
|
@ -18,6 +18,7 @@ import imgui.type.ImBoolean;
|
|||
import love.distributedrebirth.demo4d.matrix4d.ScreenMatrix4D;
|
||||
import love.distributedrebirth.demo4d.music.MusicManager;
|
||||
import love.distributedrebirth.demo4d.music.MusicPlayerRenderer;
|
||||
import love.distributedrebirth.demo4d.screen.BasePartRenderer;
|
||||
import love.distributedrebirth.demo4d.screen.BasicConsoleRenderer;
|
||||
import love.distributedrebirth.demo4d.screen.HebrewWalletRenderer;
|
||||
import love.distributedrebirth.demo4d.screen.ScreenCredits;
|
||||
|
|
@ -48,6 +49,7 @@ public class Demo4DMain extends Game {
|
|||
private ImBoolean showImGuiDemo = new ImBoolean(false);
|
||||
private ImBoolean showMusicPlayer = new ImBoolean(false);
|
||||
private ImBoolean showHebrewWallet = new ImBoolean(false);
|
||||
private ImBoolean showBasePart = new ImBoolean(false);
|
||||
private ImBoolean showBasicConsole = new ImBoolean(false);
|
||||
|
||||
public Demo4DMain(List<String> args, NativeFileChooser fileChooser) {
|
||||
|
|
@ -71,6 +73,7 @@ public class Demo4DMain extends Game {
|
|||
widgets = new HashMap<>();
|
||||
putWidget(new MusicPlayerRenderer(this));
|
||||
putWidget(new HebrewWalletRenderer(this));
|
||||
putWidget(new BasePartRenderer(this));
|
||||
putWidget(new BasicConsoleRenderer(this));
|
||||
|
||||
screens = new HashMap<>();
|
||||
|
|
@ -133,6 +136,9 @@ public class Demo4DMain extends Game {
|
|||
if (showHebrewWallet.get()) {
|
||||
widgets.get(HebrewWalletRenderer.class).render(showHebrewWallet);
|
||||
}
|
||||
if (showBasePart.get()) {
|
||||
widgets.get(BasePartRenderer.class).render(showBasePart);
|
||||
}
|
||||
if (showBasicConsole.get()) {
|
||||
widgets.get(BasicConsoleRenderer.class).render(showBasicConsole);
|
||||
}
|
||||
|
|
@ -170,6 +176,9 @@ public class Demo4DMain extends Game {
|
|||
if (ImGui.menuItem("Hebrew Wallet")) {
|
||||
showHebrewWallet.set(true);
|
||||
}
|
||||
if (ImGui.menuItem("Base Part")) {
|
||||
showBasePart.set(true);
|
||||
}
|
||||
if (ImGui.menuItem("Basic Console")) {
|
||||
showBasicConsole.set(true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import imgui.ImGui;
|
|||
import imgui.ImGuiIO;
|
||||
import imgui.gl3.ImGuiImplGl3;
|
||||
import imgui.glfw.ImGuiImplGlfw;
|
||||
import love.distributedrebirth.numberxd.base2t.T60Sexagesimal;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -55,6 +56,11 @@ public class ImGuiSetup {
|
|||
rangesBuilder.addRanges(glyphRangesToneLetters0);
|
||||
rangesBuilder.addText("@Ω\u4ed9⁴ ˧꜏⋇꜊꜔ ⁴ﷲΩ@");
|
||||
rangesBuilder.addText("©Δ∞ \u4ed9\u4e0a\u4e3b\u5929");
|
||||
|
||||
for (T60Sexagesimal value:T60Sexagesimal.values()) {
|
||||
rangesBuilder.addText(value.getIdentifierLetter());
|
||||
rangesBuilder.addText(value.getChinaKey());
|
||||
}
|
||||
|
||||
final ImFontConfig fontConfig = new ImFontConfig();
|
||||
fontConfig.setMergeMode(true); // Enable merge mode to merge cyrillic, japanese and icons with default font
|
||||
|
|
|
|||
|
|
@ -0,0 +1,63 @@
|
|||
package love.distributedrebirth.demo4d.screen;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import imgui.ImGui;
|
||||
import imgui.flag.ImGuiCond;
|
||||
import imgui.flag.ImGuiTableFlags;
|
||||
import imgui.type.ImBoolean;
|
||||
import love.distributedrebirth.demo4d.Demo4DMain;
|
||||
import love.distributedrebirth.demo4d.ImGuiRendererMain;
|
||||
import love.distributedrebirth.numberxd.base2t.T60Sexagesimal;
|
||||
import love.distributedrebirth.numberxd.base2t.facet.BasePart;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author willemtsade ©Δ∞ 仙上主天
|
||||
*
|
||||
*/
|
||||
public class BasePartRenderer extends ImGuiRendererMain {
|
||||
|
||||
public BasePartRenderer(Demo4DMain main) {
|
||||
super(main);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(ImBoolean widgetOpen) {
|
||||
ImGui.setNextWindowPos(200, 200, ImGuiCond.FirstUseEver);
|
||||
ImGui.setNextWindowSize(640, 480, ImGuiCond.FirstUseEver);
|
||||
ImGui.begin("Base part", widgetOpen);
|
||||
|
||||
ImGui.text("Current part type:");
|
||||
ImGui.sameLine();
|
||||
ImGui.text("T60Sexagesimal");
|
||||
int flags = ImGuiTableFlags.ScrollX | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersOuter | ImGuiTableFlags.BordersV;
|
||||
ImGui.beginTable("base-part", 5, flags);
|
||||
ImGui.tableSetupColumn("ordinal");
|
||||
ImGui.tableSetupColumn("idTone");
|
||||
ImGui.tableSetupColumn("idLetter");
|
||||
ImGui.tableSetupColumn("ChinaKey");
|
||||
ImGui.tableSetupColumn("ChinaValue");
|
||||
ImGui.tableHeadersRow();
|
||||
|
||||
List<BasePart> parts = Arrays.asList(T60Sexagesimal.values());
|
||||
|
||||
for (BasePart part:parts) {
|
||||
ImGui.tableNextRow();
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(Integer.toString(part.ordinal()));
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.getIdentifierTone());
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.getIdentifierLetter());
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.getChinaKey());
|
||||
ImGui.tableNextColumn();
|
||||
ImGui.text(part.getChinaValue());
|
||||
}
|
||||
ImGui.endTable();
|
||||
|
||||
ImGui.end();
|
||||
}
|
||||
}
|
||||
|
|
@ -32,19 +32,10 @@ public class ScreenUnicode4D extends Demo4DMainAdapter {
|
|||
ImVec2 size = new ImVec2(144f, 48f);
|
||||
ImGui.invisibleButton("canvas", size.x, size.y);
|
||||
ImVec2 p0 = ImGui.getItemRectMin();
|
||||
ImVec2 p1 = ImGui.getItemRectMax();
|
||||
ImVec2 p1 = ImGui.getItemRectMax(); // p1 = p0 + size
|
||||
ImDrawList drawList = ImGui.getWindowDrawList();
|
||||
drawList.pushClipRect(p0.x, p0.y, p1.x, p1.y);
|
||||
// draw unicode4D
|
||||
//System.out.println("p0.x="+p0.x+" p0.y="+p0.y);
|
||||
//System.out.println("p1.x="+p1.x+" p1.y="+p1.y);
|
||||
|
||||
// for (int n = 0; n < (1.0f + Math.sin(ImGui.getTime() * 5.7f)) * 40.0f; n++) {
|
||||
// drawList.addCircle(p0.x + size.x * 0.5f, p0.y + size.y * 0.5f, size.y * (0.01f + n * 0.03f),
|
||||
// ImColor.intToColor(255, 140 - n * 4, n * 3, 255)
|
||||
// );
|
||||
// }
|
||||
|
||||
drawList.addQuad(p0.x, p0.y, p0.x+size.x, p0.y, p1.x, p1.y, p0.x, p0.y+size.y,
|
||||
ImColor.intToColor(127, 127, 255, 255), 5f);
|
||||
|
||||
|
|
@ -54,5 +45,14 @@ public class ScreenUnicode4D extends Demo4DMainAdapter {
|
|||
|
||||
drawList.popClipRect();
|
||||
ImGui.end();
|
||||
|
||||
//System.out.println("p0.x="+p0.x+" p0.y="+p0.y);
|
||||
//System.out.println("p1.x="+p1.x+" p1.y="+p1.y);
|
||||
|
||||
// for (int n = 0; n < (1.0f + Math.sin(ImGui.getTime() * 5.7f)) * 40.0f; n++) {
|
||||
// drawList.addCircle(p0.x + size.x * 0.5f, p0.y + size.y * 0.5f, size.y * (0.01f + n * 0.03f),
|
||||
// ImColor.intToColor(255, 140 - n * 4, n * 3, 255)
|
||||
// );
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue