控件属性输出代码重命名
This commit is contained in:
@@ -184,6 +184,7 @@ function love.touchreleased(id,x,y)
|
||||
sysFX.newRipple(.3,x,y,30)
|
||||
end
|
||||
end
|
||||
|
||||
function love.keypressed(i)
|
||||
mouseShow=false
|
||||
if devMode then
|
||||
@@ -205,12 +206,12 @@ function love.keypressed(i)
|
||||
end
|
||||
elseif i=="q"then
|
||||
local W=WIDGET.sel
|
||||
if W then W:getInfo()end
|
||||
if W then W:printInfo()end
|
||||
elseif i=="f3"then
|
||||
assert(false,"Techmino:挂了")
|
||||
elseif i=="e"then
|
||||
for k,v in next,_G do
|
||||
DBP(k,v)
|
||||
DBP(k,v)
|
||||
end
|
||||
elseif WIDGET.sel then
|
||||
local W=WIDGET.sel
|
||||
@@ -408,7 +409,7 @@ local devColor={
|
||||
color.lBlue,
|
||||
}
|
||||
local FPS=love.timer.getFPS
|
||||
love.draw,love.update=nil
|
||||
love.draw,love.update=nil--remove default draw/update
|
||||
function love.run()
|
||||
local T=love.timer
|
||||
local STEP,GETDelta,WAIT=T.step,T.getDelta,T.sleep
|
||||
|
||||
@@ -69,7 +69,7 @@ function button:draw()
|
||||
gc.printf(t,x,y0,w,"center")
|
||||
end
|
||||
end
|
||||
function button:getInfo()
|
||||
function button:printInfo()
|
||||
DBP(format("x=%d,y=%d,w=%d,h=%d,font=%d",self.x+self.w*.5,self.y+self.h*.5,self.w,self.h,self.font))
|
||||
end
|
||||
|
||||
@@ -119,7 +119,7 @@ function key:draw()
|
||||
gc.printf(t,x,y+h*.5-self.font*.7,w,"center")
|
||||
end
|
||||
end
|
||||
function key:getInfo()
|
||||
function key:printInfo()
|
||||
DBP(format("x=%d,y=%d,w=%d,h=%d,font=%d",self.x+self.w*.5,self.y+self.h*.5,self.w,self.h,self.font))
|
||||
end
|
||||
|
||||
@@ -176,7 +176,7 @@ function switch:draw()
|
||||
gc.printf(t,x-412-ATV,y+20-self.font*.7,400,"right")
|
||||
end
|
||||
end
|
||||
function switch:getInfo()
|
||||
function switch:printInfo()
|
||||
DBP(format("x=%d,y=%d,font=%d",self.x,self.y,self.font))
|
||||
end
|
||||
|
||||
@@ -279,7 +279,7 @@ function slider:draw()
|
||||
gc.printf(t,x-312-ATV,y-self.font*.7,300,"right")
|
||||
end
|
||||
end
|
||||
function slider:getInfo()
|
||||
function slider:printInfo()
|
||||
DBP(format("x=%d,y=%d,w=%d",self.x,self.y,self.w))
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user