diff options
author | Alex Auvolat <alex@adnab.me> | 2017-05-04 11:48:08 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2017-05-04 11:48:08 +0200 |
commit | 9bb1c5371affb2ff0b83256470dec7461b404264 (patch) | |
tree | 9db7cd56713864a07f047572bfa2d55a5a9933dd /src/syslua/lx/gui.lua | |
parent | 1161e1d8be014945266017cb0ce735537a287677 (diff) | |
download | kogata-9bb1c5371affb2ff0b83256470dec7461b404264.tar.gz kogata-9bb1c5371affb2ff0b83256470dec7461b404264.zip |
Beginning of tk.lua
Diffstat (limited to 'src/syslua/lx/gui.lua')
-rw-r--r-- | src/syslua/lx/gui.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/syslua/lx/gui.lua b/src/syslua/lx/gui.lua index 23e6cb6..35e73b8 100644 --- a/src/syslua/lx/gui.lua +++ b/src/syslua/lx/gui.lua @@ -121,6 +121,8 @@ end function gui.on_mouse(dx, dy, dw, lb, rb, mb) if dx ~= 0 or dy ~= 0 then + local prev_x, prev_y = gui.mouse_x, gui.mouse_y + local csr = gui.cursor_visible if csr then gui.hide_cursor() end @@ -133,7 +135,7 @@ function gui.on_mouse(dx, dy, dw, lb, rb, mb) if csr then gui.show_cursor() end - gui.on_mouse_move(gui.mouse_x, gui.mouse_y) + gui.on_mouse_move(prev_x, prev_y, gui.mouse_x, gui.mouse_y) end if lb == 1 and not gui.mouse_lbtn then @@ -153,7 +155,7 @@ function gui.on_mouse(dx, dy, dw, lb, rb, mb) end end -function gui.on_mouse_move(x, y) +function gui.on_mouse_move(prev_x, prev_y, x, y) -- Nothing, can be replaced :) end |