Fixed ttf4d rendering
This commit is contained in:
parent
5679699282
commit
05993d3768
6 changed files with 51 additions and 43 deletions
|
|
@ -3,6 +3,7 @@ package love.distributedrebirth.gdxapp4d.app.glyphdemo.apps;
|
|||
import java.util.ResourceBundle;
|
||||
|
||||
import imgui.ImGui;
|
||||
import imgui.flag.ImGuiStyleVar;
|
||||
import imgui.flag.ImGuiTableFlags;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp4d.vrgem4.service.VrGem4Unicode4DService;
|
||||
|
|
@ -60,24 +61,28 @@ public class DemoUnicodePlaneDeskApp extends AbstractDeskApp implements DeskAppR
|
|||
// 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
|
||||
|
||||
DrawCharacter drawChar2 = unicode4DService.getCharacterForUnicode('?');
|
||||
ImGui.pushStyleVar(ImGuiStyleVar.ItemSpacing, 0f, 0f);
|
||||
|
||||
DrawCharacter drawChar2 = unicode4DService.getCharacterForUnicode(' ');
|
||||
if (drawChar2 != null) {
|
||||
new ImCharacter(drawChar2).render();
|
||||
ImCharacter.render(drawChar2);
|
||||
ImGui.sameLine(); // print before beginChild to fix height of table row
|
||||
}
|
||||
|
||||
int offset = 33;
|
||||
ImGui.beginChild("row"+plane.name());
|
||||
for (int i=plane.getStart()+offset;i<plane.getStart()+17+offset;i++) {
|
||||
for (int i=plane.getStart()+offset;i<plane.getStart()+33+offset;i++) {
|
||||
DrawCharacter drawChar = unicode4DService.getCharacterForUnicode(i);
|
||||
if (drawChar != null) {
|
||||
new ImCharacter(drawChar).render();
|
||||
ImCharacter.render(drawChar);
|
||||
} else {
|
||||
ImGui.text("?");
|
||||
}
|
||||
ImGui.sameLine();
|
||||
}
|
||||
ImGui.endChild();
|
||||
|
||||
ImGui.popStyleVar();
|
||||
}
|
||||
}
|
||||
ImGui.endTable();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue