mirror of
https://github.com/darksaid98/Flashback.git
synced 2026-12-04 14:38:50 +00:00
Don't handle keybinds when a popup or text input is open
This commit is contained in:
1 parent
08e8d3df29
commit
6579039ba8
1 file changed
+12
-1
@@ -438,11 +438,13 @@ public class TimelineWindow {
|
||||
}
|
||||
}
|
||||
|
||||
boolean shouldProcessInput = !ImGui.isPopupOpen("", ImGuiPopupFlags.AnyPopup) && !ImGui.getIO().getWantTextInput();
|
||||
if (shouldProcessInput) {
|
||||
handleKeyPresses(replayServer, cursorTicks, editorState, totalTicks);
|
||||
|
||||
boolean leftClicked = ImGui.isMouseClicked(ImGuiMouseButton.Left);
|
||||
boolean rightClicked = ImGui.isMouseClicked(ImGuiMouseButton.Right);
|
||||
if ((leftClicked || rightClicked) && !ImGui.isPopupOpen("", ImGuiPopupFlags.AnyPopup)) {
|
||||
if (leftClicked || rightClicked) {
|
||||
handleClick(editorState, replayServer, totalTicks);
|
||||
} else if (ImGui.isMouseDragging(ImGuiMouseButton.Left)) {
|
||||
if (grabbedExportBarResizeLeft) {
|
||||
@@ -493,6 +495,9 @@ public class TimelineWindow {
|
||||
} else if (!ImGui.isAnyMouseDown()) {
|
||||
releaseGrabbed(editorState, replayServer, totalTicks);
|
||||
}
|
||||
} else {
|
||||
releaseGrabbed(editorState, replayServer, totalTicks);
|
||||
}
|
||||
}
|
||||
ImGui.end();
|
||||
}
|
||||
@@ -1080,6 +1085,12 @@ public class TimelineWindow {
|
||||
|
||||
grabbedKeyframe = false;
|
||||
}
|
||||
|
||||
if (pendingStepBackwardsTicks > 0 && !ImGui.isKeyDown(GLFW.GLFW_KEY_LEFT)) {
|
||||
replayServer.goToReplayTick(Math.max(0, replayServer.getReplayTick() - pendingStepBackwardsTicks));
|
||||
replayServer.forceApplyKeyframes.set(true);
|
||||
pendingStepBackwardsTicks = 0;
|
||||
}
|
||||
}
|
||||
|
||||
record GrabMovementInfo(int grabbedDelta, int grabbedScalePivotTick, float grabbedScaleFactor) {}
|
||||
|
||||
Reference in new issue
Block a user