mirror of
https://gitea.com/SweetSea-ButImNotSweet/tromi_mobile.git
synced 2025-01-08 17:33:09 +08:00
Update virtual control stuff
This commit is contained in:
@@ -23,7 +23,7 @@ local virtual_quad=setmetatable((function()
|
||||
empty_quad=gc_newQuad(0,0,1,1,4*w,3*w)
|
||||
for i,name in next,{
|
||||
'left','right','up','down',
|
||||
'rotate_left','rotate_right','rotate_left2','rotate_right2',
|
||||
'rotate_right','rotate_left','rotate_right2','rotate_left2',
|
||||
'menu_deicde','','menu_back'
|
||||
} do if #name>0 then t[name]=gc_newQuad((i-1)%4*w,math.floor((i-1)/4)*w,w,w,4*w,3*w) end end -- 4x2 is the size of entire texture
|
||||
return t
|
||||
@@ -134,12 +134,14 @@ function VCTRL.press(x,y,id)
|
||||
touches[id]=obj
|
||||
obj:press(x,y,id)
|
||||
VCTRL.focus=obj
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
function VCTRL.release(id)
|
||||
if touches[id] then
|
||||
touches[id]:release()
|
||||
return true
|
||||
end
|
||||
touches[id]=nil
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user