improved ignoring mouse events for hidden elements

This commit is contained in:
Mikayla Fischler
2023-09-05 15:32:45 -04:00
parent 1525ed9d60
commit 1cb240b1b0
3 changed files with 20 additions and 7 deletions

View File

@@ -30,6 +30,8 @@ events.CLICK_TYPE = {
---@return coordinate_2d
local function _coord2d(x, y) return { x = x, y = y } end
events.new_coord_2d = _coord2d
---@class mouse_interaction
---@field monitor string
---@field button CLICK_BUTTON
@@ -39,11 +41,7 @@ local function _coord2d(x, y) return { x = x, y = y } end
local handler = {
-- left, right, middle button down tracking
button_down = {
_coord2d(0, 0),
_coord2d(0, 0),
_coord2d(0, 0)
}
button_down = { _coord2d(0, 0), _coord2d(0, 0), _coord2d(0, 0) }
}
-- create a new monitor touch mouse interaction event