Fixed/Changed Minimap and Game Interface Window Issue.

* Changed minimap navigation to hold right click.
* Added MAX_FLOOR_UP and MAX_FLOOR_DOWN for floor changing in the minimap.
* Fixed issues with exit window, logout window and count window to stop multiple instances of the window.
This commit is contained in:
BeniS
2012-07-13 18:31:05 +12:00
parent 29ab28065b
commit 3ebb997c37
7 changed files with 69 additions and 20 deletions

View File

@@ -32,14 +32,18 @@ function g_mouse.isPressed(button)
return g_window.isMouseButtonPressed(button)
end
function g_mouse.bindAutoPress(widget, callback, delay)
function g_mouse.bindAutoPress(widget, callback, delay, button)
local button = button or MouseLeftButton
connect(widget, { onMousePress = function(widget, mousePos, mouseButton)
if(mouseButton ~= button) then
return false
end
local startTime = g_clock.millis()
callback(widget, mousePos, mouseButton, 0)
periodicalEvent(function()
callback(widget, g_window.getMousePosition(), mouseButton, g_clock.millis() - startTime)
end, function()
return widget:isPressed()
return g_mouse.isPressed(mouseButton)
end, 30, delay)
return true
end })