|
4 | 4 | import imgui.extension.imguizmo.flag.Operation; |
5 | 5 | import imgui.flag.ImGuiCond; |
6 | 6 | import imgui.flag.ImGuiInputTextFlags; |
| 7 | +import imgui.flag.ImGuiKey; |
7 | 8 | import imgui.flag.ImGuiWindowFlags; |
8 | 9 | import imgui.type.ImBoolean; |
9 | 10 | import imgui.type.ImFloat; |
|
12 | 13 | import java.net.URI; |
13 | 14 | import java.util.Arrays; |
14 | 15 |
|
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 | | - |
20 | 16 | public class ExampleImGuizmo { |
21 | 17 | private static final String URL = "https://github.com/CedricGuillemet/ImGuizmo/tree/f7bbbe"; |
22 | 18 |
|
@@ -145,13 +141,13 @@ public static void show(final ImBoolean showImGuizmoWindow) { |
145 | 141 | } |
146 | 142 |
|
147 | 143 | private static void editTransform(final ImBoolean showImGuizmoWindow) { |
148 | | - if (ImGui.isKeyPressed(GLFW_KEY_T)) { |
| 144 | + if (ImGui.isKeyPressed(ImGuiKey.T)) { |
149 | 145 | currentGizmoOperation = Operation.TRANSLATE; |
150 | | - } else if (ImGui.isKeyPressed(GLFW_KEY_R)) { |
| 146 | + } else if (ImGui.isKeyPressed(ImGuiKey.R)) { |
151 | 147 | currentGizmoOperation = Operation.ROTATE; |
152 | | - } else if (ImGui.isKeyPressed(GLFW_KEY_S)) { |
| 148 | + } else if (ImGui.isKeyPressed(ImGuiKey.S)) { |
153 | 149 | currentGizmoOperation = Operation.SCALE; |
154 | | - } else if (ImGui.isKeyPressed(GLFW_KEY_LEFT_SHIFT)) { |
| 150 | + } else if (ImGui.isKeyPressed(ImGuiKey.LeftShift)) { |
155 | 151 | USE_SNAP.set(!USE_SNAP.get()); |
156 | 152 | } |
157 | 153 |
|
|
0 commit comments