Skip to content

Commit 2ff6676

Browse files
committed
fix mouse clicks bleeding through overlay panel
1 parent a970161 commit 2ff6676

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

docs/changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ Template for new versions:
5757
- `sort`: search and sort for the "choose unit to elevate to the barony" screen. units are sorted by the number of item preferences they have and the units are annotated with the items that they have preferences for
5858

5959
## Fixes
60+
- `sort`: fix mouse clicks falling through the squad assignment overlay panel when clicking on the panel but not on a clickable widget
6061
- `sort`: fix potential crash when removing jobs directly from the Tasks info screen
6162

6263
## Misc Improvements

plugins/lua/sort.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,8 @@ function SquadAssignmentOverlay:onInput(keys)
11791179
-- if any click is made outside of our window, we may need to refresh our list
11801180
self.dirty = true
11811181
end
1182-
return SquadAssignmentOverlay.super.onInput(self, keys)
1182+
return SquadAssignmentOverlay.super.onInput(self, keys) or
1183+
(keys._MOUSE_L and self:getMouseFramePos())
11831184
end
11841185

11851186
function SquadAssignmentOverlay:onRenderFrame(dc, frame_rect)
@@ -1287,6 +1288,11 @@ function SquadAnnotationOverlay:init()
12871288
end
12881289
end
12891290

1291+
function SquadAnnotationOverlay:onInput(keys)
1292+
return SquadAnnotationOverlay.super.onInput(self, keys) or
1293+
(keys._MOUSE_L and self:getMouseFramePos())
1294+
end
1295+
12901296
OVERLAY_WIDGETS = {
12911297
squad_assignment=SquadAssignmentOverlay,
12921298
squad_annotation=SquadAnnotationOverlay,

0 commit comments

Comments
 (0)