mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-10-19 22:23:28 +02:00
Added keypad, fixed one crash bug and few more features for mobile version
This commit is contained in:
@@ -29,11 +29,12 @@ local function addButton(id, description, icon, callback, panel, toggle, front,
|
||||
button:setTooltip(description)
|
||||
button:setIcon(resolvepath(icon, 3))
|
||||
button.onMouseRelease = function(widget, mousePos, mouseButton)
|
||||
if widget:containsPoint(mousePos) and mouseButton ~= MouseMidButton then
|
||||
if widget:containsPoint(mousePos) and mouseButton ~= MouseMidButton and mouseButton ~= MouseTouch then
|
||||
callback()
|
||||
return true
|
||||
end
|
||||
end
|
||||
button.onTouchRelease = button.onMouseRelease
|
||||
if not button.index and type(index) == 'number' then
|
||||
button.index = index
|
||||
end
|
||||
|
Reference in New Issue
Block a user