Added keypad, fixed one crash bug and few more features for mobile version

This commit is contained in:
OTCv8
2020-06-12 17:58:54 +02:00
parent 8391355c42
commit 82018bf3c9
23 changed files with 294 additions and 36 deletions

View File

@@ -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