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