Skip to content

Commit

Permalink
use common dialog input handler code so mouse clicks don't bleed through
Browse files Browse the repository at this point in the history
  • Loading branch information
myk002 committed Oct 1, 2023
1 parent 57c8593 commit 55d0463
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions gui/quickfort.lua
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,7 @@ function BlueprintDialog:onInput(keys)
details:show()
-- for testing
self._details = details
elseif keys.LEAVESCREEN or keys._MOUSE_R then
self:dismiss()
if self.on_cancel then
self.on_cancel()
end
else
self:inputToSubviews(keys)
elseif BlueprintDialog.super.onInput(self, keys) then
local prev_filter_text = filter_text
-- save the filter if it was updated so we always have the most recent
-- text for the next invocation of the dialog
Expand All @@ -229,6 +223,7 @@ function BlueprintDialog:onInput(keys)
-- otherwise, save the new selected item
save_selection(self.subviews.list)
end
return true
end
end

Expand Down

0 comments on commit 55d0463

Please sign in to comment.