mirror of
https://gitea.com/SweetSea-ButImNotSweet/tromi_mobile.git
synced 2025-01-08 17:33:09 +08:00
Add VCTRL.export (for saving feature)
This commit is contained in:
@@ -15,6 +15,7 @@ local function mDrawQ(obj,quad,x,y,a,k)
|
||||
love.graphics.draw(obj,quad,x,y,a,k,nil,w*.5,h*.5)
|
||||
end
|
||||
|
||||
ShowLoadingText('virtual key skin')
|
||||
local empty_quad
|
||||
-- A table containing quads used to draw icons for virtual control system.
|
||||
local virtual_quad=setmetatable((function()
|
||||
@@ -56,6 +57,19 @@ function control_type.button:new(data)
|
||||
quad=virtual_quad[data.key]
|
||||
},self)
|
||||
end
|
||||
function control_type.button:export()
|
||||
return {
|
||||
show = self.show,
|
||||
x = self.x,
|
||||
y = self.y,
|
||||
r = self.r,
|
||||
shape = self.shape,
|
||||
key = self.key,
|
||||
iconSize = self.iconSize,
|
||||
alpha = self.alpha,
|
||||
quad = self.quad
|
||||
}
|
||||
end
|
||||
function control_type.button:reset()
|
||||
self.pressed=false
|
||||
self.lastPressTime=-1e99
|
||||
@@ -194,4 +208,6 @@ function VCTRL.draw(forceLight)
|
||||
VCTRL[i]:draw(forceLight)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function VCTRL.export(K) return K:export() end
|
||||
Reference in New Issue
Block a user