add mouse support for CycleHotkeyLabel widgets

develop
myk002 2022-08-08 10:56:17 -07:00 committed by Myk
parent aa80f280d3
commit 0ae4fed3cf
1 changed files with 9 additions and 1 deletions

@ -763,7 +763,6 @@ function HotkeyLabel:onInput(keys)
self.on_activate() self.on_activate()
return true return true
end end
end end
---------------------- ----------------------
@ -838,6 +837,15 @@ function CycleHotkeyLabel:getOptionValue(option_idx)
return option return option
end end
function CycleHotkeyLabel:onInput(keys)
if CycleHotkeyLabel.super.onInput(self, keys) then
return true
elseif keys._MOUSE_L and self:getMousePos() then
self:cycle()
return true
end
end
----------------------- -----------------------
-- ToggleHotkeyLabel -- -- ToggleHotkeyLabel --
----------------------- -----------------------