Skip to content

Commit 336de93

Browse files
committed
fix: resolve demo incompatibilities
1 parent 42f0c01 commit 336de93

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

example/src/main/java/ExampleImGuiNodeEditor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ public static void show(final ImBoolean showImNodeEditorWindow, final Graph grap
7373
source.outputNodeId = target.nodeId;
7474
}
7575
}
76-
NodeEditor.endCreate();
7776
}
77+
NodeEditor.endCreate();
7878

7979
int uniqueLinkId = 1;
8080
for (Graph.GraphNode node : graph.nodes.values()) {

example/src/main/java/ExampleImGuizmo.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import imgui.extension.imguizmo.flag.Operation;
55
import imgui.flag.ImGuiCond;
66
import imgui.flag.ImGuiInputTextFlags;
7+
import imgui.flag.ImGuiKey;
78
import imgui.flag.ImGuiWindowFlags;
89
import imgui.type.ImBoolean;
910
import imgui.type.ImFloat;
@@ -12,11 +13,6 @@
1213
import java.net.URI;
1314
import java.util.Arrays;
1415

15-
import static org.lwjgl.glfw.GLFW.GLFW_KEY_LEFT_SHIFT;
16-
import static org.lwjgl.glfw.GLFW.GLFW_KEY_R;
17-
import static org.lwjgl.glfw.GLFW.GLFW_KEY_S;
18-
import static org.lwjgl.glfw.GLFW.GLFW_KEY_T;
19-
2016
public class ExampleImGuizmo {
2117
private static final String URL = "https://github.com/CedricGuillemet/ImGuizmo/tree/f7bbbe";
2218

@@ -145,13 +141,13 @@ public static void show(final ImBoolean showImGuizmoWindow) {
145141
}
146142

147143
private static void editTransform(final ImBoolean showImGuizmoWindow) {
148-
if (ImGui.isKeyPressed(GLFW_KEY_T)) {
144+
if (ImGui.isKeyPressed(ImGuiKey.T)) {
149145
currentGizmoOperation = Operation.TRANSLATE;
150-
} else if (ImGui.isKeyPressed(GLFW_KEY_R)) {
146+
} else if (ImGui.isKeyPressed(ImGuiKey.R)) {
151147
currentGizmoOperation = Operation.ROTATE;
152-
} else if (ImGui.isKeyPressed(GLFW_KEY_S)) {
148+
} else if (ImGui.isKeyPressed(ImGuiKey.S)) {
153149
currentGizmoOperation = Operation.SCALE;
154-
} else if (ImGui.isKeyPressed(GLFW_KEY_LEFT_SHIFT)) {
150+
} else if (ImGui.isKeyPressed(ImGuiKey.LeftShift)) {
155151
USE_SNAP.set(!USE_SNAP.get());
156152
}
157153

0 commit comments

Comments
 (0)