Made unicode plane work and reversted loading screen
This commit is contained in:
parent
5dfd954db1
commit
5679699282
|
@ -45,7 +45,7 @@ public class DemoUnicodePlaneDeskApp extends AbstractDeskApp implements DeskAppR
|
||||||
ImGui.tableNextColumn();
|
ImGui.tableNextColumn();
|
||||||
ImGui.text(plane.name());
|
ImGui.text(plane.name());
|
||||||
ImGui.tableNextColumn();
|
ImGui.tableNextColumn();
|
||||||
if (plane.isPlane0()) {
|
if (1==0 && plane.isPlane0()) {
|
||||||
StringBuilder buf = new StringBuilder();
|
StringBuilder buf = new StringBuilder();
|
||||||
int offset = 33;
|
int offset = 33;
|
||||||
for (int i=plane.getStart()+offset;i<plane.getStart()+33+offset;i++) {
|
for (int i=plane.getStart()+offset;i<plane.getStart()+33+offset;i++) {
|
||||||
|
@ -59,8 +59,16 @@ public class DemoUnicodePlaneDeskApp extends AbstractDeskApp implements DeskAppR
|
||||||
// LIMITED;
|
// LIMITED;
|
||||||
// Dear ImGui Assertion Failed: draw_list->_VtxCurrentIdx < (1 << 16) && "Too many vertices in ImDrawList using 16-bit indices. Read comment above"
|
// Dear ImGui Assertion Failed: draw_list->_VtxCurrentIdx < (1 << 16) && "Too many vertices in ImDrawList using 16-bit indices. Read comment above"
|
||||||
// Assertion Located At: /tmp/imgui/jni/imgui.cpp:4526
|
// Assertion Located At: /tmp/imgui/jni/imgui.cpp:4526
|
||||||
|
|
||||||
|
DrawCharacter drawChar2 = unicode4DService.getCharacterForUnicode('?');
|
||||||
|
if (drawChar2 != null) {
|
||||||
|
new ImCharacter(drawChar2).render();
|
||||||
|
ImGui.sameLine(); // print before beginChild to fix height of table row
|
||||||
|
}
|
||||||
|
|
||||||
int offset = 33;
|
int offset = 33;
|
||||||
for (int i=plane.getStart()+offset;i<plane.getStart()+7+offset;i++) {
|
ImGui.beginChild("row"+plane.name());
|
||||||
|
for (int i=plane.getStart()+offset;i<plane.getStart()+17+offset;i++) {
|
||||||
DrawCharacter drawChar = unicode4DService.getCharacterForUnicode(i);
|
DrawCharacter drawChar = unicode4DService.getCharacterForUnicode(i);
|
||||||
if (drawChar != null) {
|
if (drawChar != null) {
|
||||||
new ImCharacter(drawChar).render();
|
new ImCharacter(drawChar).render();
|
||||||
|
@ -69,6 +77,7 @@ public class DemoUnicodePlaneDeskApp extends AbstractDeskApp implements DeskAppR
|
||||||
}
|
}
|
||||||
ImGui.sameLine();
|
ImGui.sameLine();
|
||||||
}
|
}
|
||||||
|
ImGui.endChild();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImGui.endTable();
|
ImGui.endTable();
|
||||||
|
|
BIN
gdxapp4d-tos4/src/main/resources/background/gdxapp-loading.png
Normal file
BIN
gdxapp4d-tos4/src/main/resources/background/gdxapp-loading.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 315 KiB |
|
@ -105,7 +105,10 @@ public class GDXAppVrGem4Activator implements BundleActivator {
|
||||||
Gdx.app.postRunnable(new Runnable() {
|
Gdx.app.postRunnable(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
imguiSetup.init(fonts, v -> logger.info(imguiSetup, v));
|
imguiSetup.init(fonts, v -> {
|
||||||
|
logger.info(imguiSetup, v);
|
||||||
|
bootScreen.bootLine(v);
|
||||||
|
});
|
||||||
imLoaded.set(true);
|
imLoaded.set(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -22,7 +22,7 @@ public class GDXAppVrGem4BootScreen extends ScreenAdapter implements GDXAppVrGem
|
||||||
|
|
||||||
public void create() {
|
public void create() {
|
||||||
batch = new SpriteBatch();
|
batch = new SpriteBatch();
|
||||||
backgroundImage = new Texture(Gdx.files.internal("background/temple-os.png"));
|
backgroundImage = new Texture(Gdx.files.internal("background/gdxapp-loading.png"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -31,11 +31,16 @@ public class GDXAppVrGem4BootScreen extends ScreenAdapter implements GDXAppVrGem
|
||||||
int textY = Gdx.graphics.getHeight();
|
int textY = Gdx.graphics.getHeight();
|
||||||
int textYStep = 20;
|
int textYStep = 20;
|
||||||
batch.begin();
|
batch.begin();
|
||||||
|
batch.draw(backgroundImage, 0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
|
||||||
synchronized (messages) {
|
synchronized (messages) {
|
||||||
for (String message:messages) {
|
int start = 0;
|
||||||
|
if (messages.size() > 33) {
|
||||||
|
start = messages.size() - 33;
|
||||||
|
}
|
||||||
|
List<String> part = messages.subList(start, messages.size());
|
||||||
|
for (String message:part) {
|
||||||
font.draw(batch, message, textX, textY-=textYStep);
|
font.draw(batch, message, textX, textY-=textYStep);
|
||||||
}
|
}
|
||||||
batch.draw(backgroundImage, 200, textY, Gdx.graphics.getWidth() - 200, Gdx.graphics.getHeight() - textY);
|
|
||||||
}
|
}
|
||||||
batch.end();
|
batch.end();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ import imgui.ImFontGlyphRangesBuilder;
|
||||||
import imgui.ImGui;
|
import imgui.ImGui;
|
||||||
import imgui.ImGuiIO;
|
import imgui.ImGuiIO;
|
||||||
import imgui.ImGuiStyle;
|
import imgui.ImGuiStyle;
|
||||||
|
import imgui.flag.ImGuiBackendFlags;
|
||||||
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ʸᴰ;
|
||||||
|
@ -36,6 +37,7 @@ public class ImGuiSetup {
|
||||||
imGuiImp.init(windowHandle, true);
|
imGuiImp.init(windowHandle, true);
|
||||||
imGuiGlImp.init("#version 140");
|
imGuiGlImp.init("#version 140");
|
||||||
ImGui.getIO().setIniFilename(null);
|
ImGui.getIO().setIniFilename(null);
|
||||||
|
ImGui.getIO().setBackendFlags(ImGuiBackendFlags.RendererHasVtxOffset);
|
||||||
ImGui.init();
|
ImGui.init();
|
||||||
initStyle();
|
initStyle();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue