Merge text0
This commit is contained in:
commit
fcccbebe39
6
main.lua
6
main.lua
|
@ -202,6 +202,12 @@ function App.wheelmoved(dx,dy)
|
|||
if on.mouse_wheel_move then on.mouse_wheel_move(dx,dy) end
|
||||
end
|
||||
|
||||
function App.mousefocus(in_focus)
|
||||
if Mode == 'error' then return end
|
||||
Cursor_time = 0 -- ensure cursor is visible immediately after it moves
|
||||
if on.mouse_focus then on.mouse_focus(in_focus) end
|
||||
end
|
||||
|
||||
function App.focus(in_focus)
|
||||
if Mode == 'error' then return end
|
||||
if in_focus then
|
||||
|
|
|
@ -97,6 +97,11 @@ two categories.
|
|||
right. Positive values for `dy` indicate upward movement.
|
||||
(Based on [LÖVE](https://love2d.org/wiki/love.wheelmoved).)
|
||||
|
||||
* `on.mouse_focus(in_focus)` -- called when the mouse pointer moves on or off
|
||||
the app window. `in_focus` will be `true` when mouse comes within the window
|
||||
area, and `false` when it goes off.
|
||||
(Based on [LÖVE](https://love2d.org/wiki/love.mousefocus).)
|
||||
|
||||
* `on.keychord_press(chord, key)` -- called when you press a key-combination.
|
||||
Provides in `key` a string name for the key most recently pressed ([valid
|
||||
values](https://love2d.org/wiki/KeyConstant)). Provides in `chord` a
|
||||
|
|
Loading…
Reference in New Issue