0.9.0:自定义序列
This commit is contained in:
Binary file not shown.
@@ -343,6 +343,7 @@ function keyDown.sequence(key)
|
||||
elseif key=="delete"then
|
||||
if sceneTemp.sure>20 then
|
||||
preBag={1,2,3,4,5,6,7}
|
||||
sceneTemp.cur=7
|
||||
sceneTemp.sure=0
|
||||
else
|
||||
sceneTemp.sure=50
|
||||
|
||||
@@ -310,20 +310,39 @@ function Pnt.custom()
|
||||
end
|
||||
end
|
||||
function Pnt.sequence()
|
||||
local s=sceneTemp
|
||||
gc.setColor(.7,.7,.7)gc.draw(drawableText.sequence,120,-15)
|
||||
gc.setColor(1,1,1)gc.draw(drawableText.sequence,122,-12)
|
||||
gc.setLineWidth(4)
|
||||
gc.rectangle("line",100,100,1080,260)
|
||||
setFont(30)
|
||||
for i=1,#preBag do
|
||||
gc.print(preBag[i],100+30*i,110)
|
||||
end
|
||||
local bag=preBag
|
||||
local len=#bag
|
||||
|
||||
setFont(40)
|
||||
gc.print(sceneTemp.cur,120,300)
|
||||
gc.print(len,120,300)
|
||||
|
||||
local L=miniBlock
|
||||
local x,y=120,126
|
||||
local cx,cy=120,126
|
||||
for i=1,len do
|
||||
local B=miniBlock[bag[i]]
|
||||
gc.draw(B,x,y,nil,15,15,0,B:getHeight()*.5)
|
||||
x=x+B:getWidth()*15+10
|
||||
if x>1126 then
|
||||
x,y=120,y+50
|
||||
end
|
||||
if i==s.cur then
|
||||
cx,cy=x,y
|
||||
end
|
||||
end
|
||||
|
||||
gc.setColor(.5,1,.5,.6+.4*sin(Timer()*6.26))
|
||||
gc.line(cx-5,cy-20,cx-5,cy+20)
|
||||
|
||||
--Confirm reset
|
||||
if sceneTemp.sure>0 then
|
||||
gc.setColor(1,1,1,sceneTemp.sure*.02)
|
||||
if s.sure>0 then
|
||||
gc.setColor(1,1,1,s.sure*.02)
|
||||
gc.draw(drawableText.question,1035,570)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -159,10 +159,10 @@ local Widgets={
|
||||
H= newButton(850, 640,90, 90,C.white, 50,SEQpush(24)),
|
||||
I5= newButton(950, 640,90, 90,C.white, 50,SEQpush(25)),
|
||||
|
||||
left= newButton(850, 440,90, 90,C.green, 55,pressKey("left")),
|
||||
right= newButton(950, 440,90, 90,C.green, 55,pressKey("right")),
|
||||
backsp= newButton(1050, 440,90, 90,C.red, 50,pressKey("backspace")),
|
||||
reset= newButton(1050, 540,90, 90,C.red, 50,pressKey("delete")),
|
||||
left= newButton(850, 440,90, 90,C.lightGreen, 55,pressKey("left")),
|
||||
right= newButton(950, 440,90, 90,C.lightGreen, 55,pressKey("right")),
|
||||
backsp= newButton(1050, 440,90, 90,C.lightRed, 50,pressKey("backspace")),
|
||||
reset= newButton(1050, 540,90, 90,C.lightRed, 50,pressKey("delete")),
|
||||
back= newButton(1200, 640,120,120,C.white, 35,BACK),
|
||||
},
|
||||
draw={
|
||||
|
||||
@@ -19,7 +19,7 @@ for i=1,20 do
|
||||
end
|
||||
|
||||
miniBlock={}
|
||||
for i=1,7 do
|
||||
for i=1,25 do
|
||||
local b=blocks[i][0]
|
||||
miniBlock[i]=C(#b[1],#b)
|
||||
for y=1,#b do for x=1,#b[1]do
|
||||
|
||||
Reference in New Issue
Block a user