File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ public class ExampleImNodes {
17
17
private static final ImInt LINK_A = new ImInt ();
18
18
private static final ImInt LINK_B = new ImInt ();
19
19
20
+ static {
21
+ ImNodes .createContext ();
22
+ }
23
+
20
24
public static void show (final ImBoolean showImNodesWindow , final Graph graph ) {
21
25
ImGui .setNextWindowSize (500 , 400 , ImGuiCond .Once );
22
26
ImGui .setNextWindowPos (ImGui .getMainViewport ().getPosX () + 100 , ImGui .getMainViewport ().getPosY () + 100 , ImGuiCond .Once );
Original file line number Diff line number Diff line change @@ -32,11 +32,14 @@ protected void initImGui(final Configuration config) {
32
32
io .addConfigFlags (ImGuiConfigFlags .ViewportsEnable ); // Enable Multi-Viewport / Platform Windows
33
33
io .setConfigViewportsNoTaskBarIcon (true );
34
34
35
- ImNodes .createContext ();
36
-
37
- // Example of fonts configuration
38
- // For more information read: https://github.com/ocornut/imgui/blob/33cdbe97b8fd233c6c12ca216e76398c2e89b0d8/docs/FONTS.md
35
+ initFonts (io );
36
+ }
39
37
38
+ /**
39
+ * Example of fonts configuration
40
+ * For more information read: https://github.com/ocornut/imgui/blob/33cdbe97b8fd233c6c12ca216e76398c2e89b0d8/docs/FONTS.md
41
+ */
42
+ private void initFonts (final ImGuiIO io ) {
40
43
io .getFonts ().addFontDefault (); // Add default font for latin glyphs
41
44
42
45
// You can use the ImFontGlyphRangesBuilder helper to create glyph ranges based on text input.
@@ -95,5 +98,6 @@ private static byte[] loadFromResources(String name) {
95
98
96
99
public static void main (final String [] args ) {
97
100
launch (new Main ());
101
+ System .exit (0 );
98
102
}
99
103
}
You can’t perform that action at this time.
0 commit comments