diff --git a/game/vctrl.lua b/game/vctrl.lua index e79b856..f0f837f 100644 --- a/game/vctrl.lua +++ b/game/vctrl.lua @@ -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 \ No newline at end of file +end + +function VCTRL.export(K) return K:export() end \ No newline at end of file