[Example] Tweak fonts

This commit is contained in:
SpaiR committed 2021-05-30 21:17:17 +03:00
1 parent d54e674f51
commit 5a8692248a
2 files changed
+12 -4

No files matched your search

@@ -17,6 +17,10 @@ public class ExampleImNodes {
private static final ImInt LINK_A = new ImInt();
private static final ImInt LINK_B = new ImInt();
static {
ImNodes.createContext();
}
public static void show(final ImBoolean showImNodesWindow, final Graph graph) {
ImGui.setNextWindowSize(500, 400, ImGuiCond.Once);
ImGui.setNextWindowPos(ImGui.getMainViewport().getPosX() + 100, ImGui.getMainViewport().getPosY() + 100, ImGuiCond.Once);
+8 -4
View File
@@ -32,11 +32,14 @@ public class Main extends Application {
io.addConfigFlags(ImGuiConfigFlags.ViewportsEnable); // Enable Multi-Viewport / Platform Windows
io.setConfigViewportsNoTaskBarIcon(true);
ImNodes.createContext();
// Example of fonts configuration
// For more information read: https://github.com/ocornut/imgui/blob/33cdbe97b8fd233c6c12ca216e76398c2e89b0d8/docs/FONTS.md
initFonts(io);
}
/**
* Example of fonts configuration
* For more information read: https://github.com/ocornut/imgui/blob/33cdbe97b8fd233c6c12ca216e76398c2e89b0d8/docs/FONTS.md
*/
private void initFonts(final ImGuiIO io) {
io.getFonts().addFontDefault(); // Add default font for latin glyphs
// You can use the ImFontGlyphRangesBuilder helper to create glyph ranges based on text input.
@@ -95,5 +98,6 @@ public class Main extends Application {
public static void main(final String[] args) {
launch(new Main());
System.exit(0);
}
}