From 1d3dd5fe2a7066e99810059b15626c05a3978b63 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Sun, 1 Oct 2023 16:29:10 -0700 Subject: [PATCH] use new centralized mouse handling --- gui/cp437-table.lua | 4 ---- gui/sandbox.lua | 2 -- hide-tutorials.lua | 3 --- 3 files changed, 9 deletions(-) diff --git a/gui/cp437-table.lua b/gui/cp437-table.lua index 0340c4dbda..667e028913 100644 --- a/gui/cp437-table.lua +++ b/gui/cp437-table.lua @@ -118,10 +118,6 @@ function CPDialog:submit() keys[i] = k end - -- ensure clicks on "submit" don't bleed through - df.global.enabler.mouse_lbut = 0 - df.global.enabler.mouse_lbut_down = 0 - local screen = self.parent_view local parent = screen._native.parent dfhack.screen.hideGuard(screen, function() diff --git a/gui/sandbox.lua b/gui/sandbox.lua index 854173d836..cb136f41ba 100644 --- a/gui/sandbox.lua +++ b/gui/sandbox.lua @@ -122,7 +122,6 @@ function Sandbox:init() label="Spawn unit", on_activate=function() clear_arena_action() - gui.markMouseClicksHandled{_MOUSE_L=true} view:sendInputToParent{ARENA_CREATE_CREATURE=true} df.global.game.main_interface.arena_unit.editing_filter = true end, @@ -163,7 +162,6 @@ function Sandbox:init() label="Spawn tree", on_activate=function() clear_arena_action() - gui.markMouseClicksHandled{_MOUSE_L=true} view:sendInputToParent{ARENA_CREATE_TREE=true} df.global.game.main_interface.arena_tree.editing_filter = true end, diff --git a/hide-tutorials.lua b/hide-tutorials.lua index c1fac3a980..ef855539e4 100644 --- a/hide-tutorials.lua +++ b/hide-tutorials.lua @@ -34,9 +34,6 @@ function skip_tutorial_prompt(scr) if help.context == df.help_context_type.EMBARK_MESSAGE then df.global.gps.mouse_x = df.global.gps.dimx // 2 df.global.gps.mouse_y = mouse_y - df.global.enabler.tracking_on = 1 - df.global.enabler.mouse_lbut = 1 - df.global.enabler.mouse_lbut_down = 1 gui.simulateInput(scr, '_MOUSE_L') end end