Skip to content

Commit

Permalink
Fix tab drag and drop for multiple windows
Browse files Browse the repository at this point in the history
  • Loading branch information
luboslenco committed Mar 24, 2023
1 parent 65df5b3 commit 93b696f
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Sources/zui/Zui.hx
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,16 @@ class Zui {
}

function endInput() {
if (onTabDrop != null && dragTabHandle != null) {
if (inputDX != 0 || inputDY != 0) {
Krom.setMouseCursor(1); // Hand
}
if (inputReleased) {
Krom.setMouseCursor(0); // Default
dragTabHandle = null;
}
}

isKeyPressed = false;
inputStarted = false;
inputStartedR = false;
Expand Down Expand Up @@ -679,16 +689,6 @@ class Zui {
}
}

if (onTabDrop != null && dragTabHandle != null) {
if (inputDX != 0 || inputDY != 0) {
Krom.setMouseCursor(1); // Hand
}
if (inputReleased) {
Krom.setMouseCursor(0); // Default
dragTabHandle = null;
}
}

if (getInputInRect(_windowX, _windowY, _windowW, _windowH)) {
hoveredTabName = tabNames[tabHandle.position];
hoveredTabX = _windowX;
Expand Down

0 comments on commit 93b696f

Please sign in to comment.