#226 mouse events in coordinator

This commit is contained in:
Mikayla Fischler 2023-05-10 20:01:06 -04:00
parent 3a0d677c16
commit 676dfc8c22
2 changed files with 4 additions and 4 deletions

View File

@ -163,9 +163,9 @@ end
function renderer.ui_ready() return engine.ui_ready end function renderer.ui_ready() return engine.ui_ready end
-- handle a touch event -- handle a touch event
---@param event mouse_interaction ---@param event mouse_interaction|nil
function renderer.handle_mouse(event) function renderer.handle_mouse(event)
if engine.ui_ready then if engine.ui_ready and event ~= nil then
if event.monitor == engine.monitors.primary_name then if event.monitor == engine.monitors.primary_name then
engine.ui.main_display.handle_mouse(event) engine.ui.main_display.handle_mouse(event)
else else

View File

@ -20,7 +20,7 @@ local sounder = require("coordinator.sounder")
local apisessions = require("coordinator.session.apisessions") local apisessions = require("coordinator.session.apisessions")
local COORDINATOR_VERSION = "v0.13.8" local COORDINATOR_VERSION = "v0.14.0"
local println = util.println local println = util.println
local println_ts = util.println_ts local println_ts = util.println_ts
@ -358,7 +358,7 @@ local function main()
end end
elseif event == "monitor_touch" then elseif event == "monitor_touch" then
-- handle a monitor touch event -- handle a monitor touch event
renderer.handle_mouse(core.events.touch(param1, param2, param3)) renderer.handle_mouse(core.events.new_mouse_event(event, param1, param2, param3))
elseif event == "speaker_audio_empty" then elseif event == "speaker_audio_empty" then
-- handle speaker buffer emptied -- handle speaker buffer emptied
sounder.continue() sounder.continue()