mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 03:24:55 +02:00
Tweak modules interface
Minimize miniwindows space usage Implement easier minimap navigation Redesign inventory, minimap and healthinfo layout
This commit is contained in:
@@ -32,14 +32,15 @@ function g_mouse.isPressed(button)
|
||||
return g_window.isMouseButtonPressed(button)
|
||||
end
|
||||
|
||||
function g_mouse.bindAutoPress(widget, callback)
|
||||
function g_mouse.bindAutoPress(widget, callback, delay)
|
||||
connect(widget, { onMousePress = function(widget, mousePos, mouseButton)
|
||||
callback()
|
||||
local startTime = g_clock.millis()
|
||||
callback(widget, mousePos, mouseButton, 0)
|
||||
periodicalEvent(function()
|
||||
callback()
|
||||
callback(widget, g_window.getMousePosition(), mouseButton, g_clock.millis() - startTime)
|
||||
end, function()
|
||||
return widget:isPressed()
|
||||
end, 30, 300)
|
||||
end, 30, delay)
|
||||
return true
|
||||
end })
|
||||
end
|
||||
|
@@ -246,3 +246,7 @@ function UIMiniWindow:saveParentIndex(parentId, index)
|
||||
selfSettings.index = index
|
||||
self:setSettings(selfSettings)
|
||||
end
|
||||
|
||||
function UIMiniWindow:disableResize()
|
||||
self:getChildById('bottomResizeBorder'):disable()
|
||||
end
|
||||
|
Reference in New Issue
Block a user