Fix longlasting wrong icon key

This commit is contained in:
SweetSea
2024-11-24 15:40:16 +07:00
parent 0e8d3ceacc
commit 1c6857bca9
2 changed files with 4 additions and 59 deletions

View File

@@ -41,7 +41,7 @@ local virtual_quad=setmetatable((function()
empty_quad=gc_newQuad(0,0,1,1,5*w,2*w)
for i,name in next,{
'left','right','up','down','restart',
'rotate_right','rotate_left','rotate_right2','rotate_left2'
'rotate_left','rotate_right','rotate_left2','rotate_right2'
} do if #name>0 then t[name]=gc_newQuad((i-1)%5*w,math.floor((i-1)/5)*w,w,w,5*w,2*w) end end
return t
end)(),{
@@ -108,7 +108,7 @@ function control_type.button:draw(forceAlpha)
if self.shape=='circle' then
love.graphics.setColor(0,0,0,alpha)
love.graphics.circle('fill',self.x,self.y,self.r-4)
love.graphics.setColor(1,1,1,self.pressed and .5 or 0)
love.graphics.circle('fill',self.x,self.y,self.r-4)
@@ -117,7 +117,7 @@ function control_type.button:draw(forceAlpha)
elseif self.shape=='square' then
love.graphics.setColor(0,0,0,alpha)
love.graphics.rectangle('fill',self.x-self.r-4,self.y-self.r-4,self.r*2+8,self.r*2+8)
love.graphics.setColor(1,1,1,self.pressed and .5 or 0)
love.graphics.rectangle('fill',self.x-self.r-4,self.y-self.r-4,self.r*2+8,self.r*2+8)
@@ -182,7 +182,7 @@ function VCTRL.clearAll()
local toggle = global_toggle
VCTRL.toggle(false)
global_toggle = toggle
for i=#VCTRL,1,-1 do VCTRL[i] = nil end
collectgarbage()
end