整理代码,修改颜色名和几乎所有的使用方法(可能有错误,需要后续再整理)
This commit is contained in:
@@ -117,16 +117,16 @@ local function tapBoard(x,y,key)
|
||||
if checkBoard(b)then
|
||||
state=2
|
||||
time=TIME()-startTime
|
||||
if time<1 then LOG.print("不是人",COLOR.lBlue)
|
||||
elseif time<2 then LOG.print("还是人",COLOR.lBlue)
|
||||
elseif time<3 then LOG.print("神仙",COLOR.lBlue)
|
||||
elseif time<5 then LOG.print("太强了",COLOR.lBlue)
|
||||
elseif time<7.5 then LOG.print("很强",COLOR.lBlue)
|
||||
elseif time<10 then LOG.print("可以的",COLOR.lBlue)
|
||||
elseif time<20 then LOG.print("马上入门了",COLOR.lBlue)
|
||||
elseif time<30 then LOG.print("入门不远了",COLOR.lBlue)
|
||||
elseif time<60 then LOG.print("多加练习",COLOR.lBlue)
|
||||
else LOG.print("第一次玩?加油",COLOR.lBlue)
|
||||
if time<1 then LOG.print("不是人",COLOR.lB)
|
||||
elseif time<2 then LOG.print("还是人",COLOR.lB)
|
||||
elseif time<3 then LOG.print("神仙",COLOR.lB)
|
||||
elseif time<5 then LOG.print("太强了",COLOR.lB)
|
||||
elseif time<7.5 then LOG.print("很强",COLOR.lB)
|
||||
elseif time<10 then LOG.print("可以的",COLOR.lB)
|
||||
elseif time<20 then LOG.print("马上入门了",COLOR.lB)
|
||||
elseif time<30 then LOG.print("入门不远了",COLOR.lB)
|
||||
elseif time<60 then LOG.print("多加练习",COLOR.lB)
|
||||
else LOG.print("第一次玩?加油",COLOR.lB)
|
||||
end
|
||||
SFX.play("win")
|
||||
return
|
||||
@@ -201,66 +201,66 @@ end
|
||||
|
||||
local frontColor={
|
||||
[0]={
|
||||
COLOR.lRed,COLOR.lRed,COLOR.lRed,COLOR.lRed,
|
||||
COLOR.lGreen,COLOR.lBlue,COLOR.lBlue,COLOR.lBlue,
|
||||
COLOR.lGreen,COLOR.lYellow,COLOR.lPurple,COLOR.lPurple,
|
||||
COLOR.lGreen,COLOR.lYellow,COLOR.lPurple,COLOR.lPurple,
|
||||
COLOR.lR,COLOR.lR,COLOR.lR,COLOR.lR,
|
||||
COLOR.lG,COLOR.lB,COLOR.lB,COLOR.lB,
|
||||
COLOR.lG,COLOR.lY,COLOR.lV,COLOR.lV,
|
||||
COLOR.lG,COLOR.lY,COLOR.lV,COLOR.lV,
|
||||
},--Colored(rank)
|
||||
{
|
||||
COLOR.lRed,COLOR.lRed,COLOR.lRed,COLOR.lRed,
|
||||
COLOR.lOrange,COLOR.lYellow,COLOR.lYellow,COLOR.lYellow,
|
||||
COLOR.lOrange,COLOR.lGreen,COLOR.lBlue,COLOR.lBlue,
|
||||
COLOR.lOrange,COLOR.lGreen,COLOR.lBlue,COLOR.lBlue,
|
||||
COLOR.lR,COLOR.lR,COLOR.lR,COLOR.lR,
|
||||
COLOR.lO,COLOR.lY,COLOR.lY,COLOR.lY,
|
||||
COLOR.lO,COLOR.lG,COLOR.lB,COLOR.lB,
|
||||
COLOR.lO,COLOR.lG,COLOR.lB,COLOR.lB,
|
||||
},--Rainbow(rank)
|
||||
{
|
||||
COLOR.lRed,COLOR.lRed,COLOR.lRed,COLOR.lRed,
|
||||
COLOR.lBlue,COLOR.lBlue,COLOR.lBlue,COLOR.lBlue,
|
||||
COLOR.lGreen,COLOR.lYellow,COLOR.lPurple,COLOR.lPurple,
|
||||
COLOR.lGreen,COLOR.lYellow,COLOR.lPurple,COLOR.lPurple,
|
||||
COLOR.lR,COLOR.lR,COLOR.lR,COLOR.lR,
|
||||
COLOR.lB,COLOR.lB,COLOR.lB,COLOR.lB,
|
||||
COLOR.lG,COLOR.lY,COLOR.lV,COLOR.lV,
|
||||
COLOR.lG,COLOR.lY,COLOR.lV,COLOR.lV,
|
||||
},--Colored(row)
|
||||
{
|
||||
COLOR.white,COLOR.white,COLOR.white,COLOR.white,
|
||||
COLOR.white,COLOR.white,COLOR.white,COLOR.white,
|
||||
COLOR.white,COLOR.white,COLOR.white,COLOR.white,
|
||||
COLOR.white,COLOR.white,COLOR.white,COLOR.white,
|
||||
COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z,
|
||||
COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z,
|
||||
COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z,
|
||||
COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z,
|
||||
},--Gray
|
||||
{
|
||||
COLOR.white,COLOR.white,COLOR.white,COLOR.white,
|
||||
COLOR.white,COLOR.white,COLOR.white,COLOR.white,
|
||||
COLOR.white,COLOR.white,COLOR.white,COLOR.white,
|
||||
COLOR.white,COLOR.white,COLOR.white,COLOR.white,
|
||||
COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z,
|
||||
COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z,
|
||||
COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z,
|
||||
COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z,
|
||||
},--Black
|
||||
}
|
||||
local backColor={
|
||||
[0]={
|
||||
COLOR.dRed,COLOR.dRed,COLOR.dRed,COLOR.dRed,
|
||||
COLOR.dGreen,COLOR.dBlue,COLOR.dBlue,COLOR.dBlue,
|
||||
COLOR.dGreen,COLOR.dYellow,COLOR.dPurple,COLOR.dPurple,
|
||||
COLOR.dGreen,COLOR.dYellow,COLOR.dPurple,COLOR.dPurple,
|
||||
COLOR.dR,COLOR.dR,COLOR.dR,COLOR.dR,
|
||||
COLOR.dG,COLOR.dB,COLOR.dB,COLOR.dB,
|
||||
COLOR.dG,COLOR.dY,COLOR.dV,COLOR.dV,
|
||||
COLOR.dG,COLOR.dY,COLOR.dV,COLOR.dV,
|
||||
},--Colored(rank)
|
||||
{
|
||||
COLOR.dRed,COLOR.dRed,COLOR.dRed,COLOR.dRed,
|
||||
COLOR.dOrange,COLOR.dYellow,COLOR.dYellow,COLOR.dYellow,
|
||||
COLOR.dOrange,COLOR.dGreen,COLOR.dBlue,COLOR.dBlue,
|
||||
COLOR.dOrange,COLOR.dGreen,COLOR.dBlue,COLOR.dBlue,
|
||||
COLOR.dR,COLOR.dR,COLOR.dR,COLOR.dR,
|
||||
COLOR.dO,COLOR.dY,COLOR.dY,COLOR.dY,
|
||||
COLOR.dO,COLOR.dG,COLOR.dB,COLOR.dB,
|
||||
COLOR.dO,COLOR.dG,COLOR.dB,COLOR.dB,
|
||||
},--Rainbow(rank)
|
||||
{
|
||||
COLOR.dRed,COLOR.dRed,COLOR.dRed,COLOR.dRed,
|
||||
COLOR.dBlue,COLOR.dBlue,COLOR.dBlue,COLOR.dBlue,
|
||||
COLOR.dGreen,COLOR.dYellow,COLOR.dPurple,COLOR.dPurple,
|
||||
COLOR.dGreen,COLOR.dYellow,COLOR.dPurple,COLOR.dPurple,
|
||||
COLOR.dR,COLOR.dR,COLOR.dR,COLOR.dR,
|
||||
COLOR.dB,COLOR.dB,COLOR.dB,COLOR.dB,
|
||||
COLOR.dG,COLOR.dY,COLOR.dV,COLOR.dV,
|
||||
COLOR.dG,COLOR.dY,COLOR.dV,COLOR.dV,
|
||||
},--Colored(row)
|
||||
{
|
||||
COLOR.dGray,COLOR.dGray,COLOR.dGray,COLOR.dGray,
|
||||
COLOR.dGray,COLOR.dGray,COLOR.dGray,COLOR.dGray,
|
||||
COLOR.dGray,COLOR.dGray,COLOR.dGray,COLOR.dGray,
|
||||
COLOR.dGray,COLOR.dGray,COLOR.dGray,COLOR.dGray,
|
||||
COLOR.dH,COLOR.dH,COLOR.dH,COLOR.dH,
|
||||
COLOR.dH,COLOR.dH,COLOR.dH,COLOR.dH,
|
||||
COLOR.dH,COLOR.dH,COLOR.dH,COLOR.dH,
|
||||
COLOR.dH,COLOR.dH,COLOR.dH,COLOR.dH,
|
||||
},--Gray
|
||||
{
|
||||
COLOR.black,COLOR.black,COLOR.black,COLOR.black,
|
||||
COLOR.black,COLOR.black,COLOR.black,COLOR.black,
|
||||
COLOR.black,COLOR.black,COLOR.black,COLOR.black,
|
||||
COLOR.black,COLOR.black,COLOR.black,COLOR.black,
|
||||
COLOR.D,COLOR.D,COLOR.D,COLOR.D,
|
||||
COLOR.D,COLOR.D,COLOR.D,COLOR.D,
|
||||
COLOR.D,COLOR.D,COLOR.D,COLOR.D,
|
||||
COLOR.D,COLOR.D,COLOR.D,COLOR.D,
|
||||
},--Black
|
||||
}
|
||||
function scene.draw()
|
||||
@@ -316,7 +316,7 @@ end
|
||||
|
||||
local function Gaming()return state==1 end
|
||||
scene.widgetList={
|
||||
WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color="lGreen",font=40,code=pressKey"space"},
|
||||
WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color="lG", font=40,code=pressKey"space"},
|
||||
WIDGET.newSlider{name="color", x=110,y=250,w=170,unit=4,show=false,font=30,disp=function()return color end, code=function(v)if state~=1 then color=v end end,hide=Gaming},
|
||||
WIDGET.newSwitch{name="blind", x=240,y=330,w=60, font=40,disp=function()return blind end, code=pressKey"w", hide=Gaming},
|
||||
WIDGET.newSwitch{name="slide", x=240,y=420,w=60, font=40,disp=function()return slide end, code=pressKey"e", hide=Gaming},
|
||||
|
||||
@@ -38,7 +38,7 @@ local score
|
||||
1/2/3/...: 2/4/8/... tile
|
||||
]]
|
||||
local tileColor={
|
||||
[-1]=COLOR.black,
|
||||
[-1]=COLOR.D,
|
||||
[0]={.5,.3,.3},
|
||||
{.93,.89,.85},
|
||||
{.93,.88,.78},
|
||||
@@ -370,8 +370,8 @@ function scene.draw()
|
||||
"Y"
|
||||
)or(
|
||||
repeater.seq[i]==repeater.last[i]and
|
||||
"gray"or
|
||||
"white"
|
||||
"H"or
|
||||
"Z"
|
||||
)
|
||||
])
|
||||
rectangle("line",990,305+60*i,220,50)
|
||||
@@ -405,16 +405,16 @@ function scene.draw()
|
||||
local N=board[i]
|
||||
if i~=prevPos or prevSpawnTime==1 then
|
||||
if not blind or i==prevPos then
|
||||
setColor(tileColor[N]or COLOR.black)
|
||||
setColor(tileColor[N]or COLOR.D)
|
||||
rectangle("fill",x*160+163,y*160-117,154,154,15)
|
||||
if N>=0 then
|
||||
setColor(N<3 and COLOR.black or COLOR.W)
|
||||
setColor(N<3 and COLOR.D or COLOR.Z)
|
||||
local fontSize=tileFont[N]
|
||||
setFont(fontSize)
|
||||
mStr(tileName[N],320+(x-.5)*160,40+(y-.5)*160-fontSize*.7)
|
||||
end
|
||||
else
|
||||
setColor(COLOR.gray)
|
||||
setColor(COLOR.H)
|
||||
rectangle("fill",x*160+163,y*160-117,154,154,15)
|
||||
end
|
||||
else
|
||||
@@ -480,19 +480,19 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newButton{name="reset", x=155,y=100,w=180,h=100,color="lGreen",font=40,code=pressKey"r"},
|
||||
WIDGET.newButton{name="reset", x=155,y=100,w=180,h=100,color="lG",font=40,code=pressKey"r"},
|
||||
WIDGET.newSwitch{name="blind", x=240,y=300,w=60, font=40,disp=function()return blind end, code=pressKey"q",hide=function()return state==1 end},
|
||||
WIDGET.newSwitch{name="tapControl", x=240,y=370,w=60, font=40,disp=function()return tapControl end, code=pressKey"w",hide=function()return state==1 end},
|
||||
|
||||
WIDGET.newKey{name="up", x=155,y=460,w=100,fText="↑",font=50,color="yellow",code=pressKey"up",hide=function()return tapControl end},
|
||||
WIDGET.newKey{name="down", x=155,y=660,w=100,fText="↓",font=50,color="yellow",code=pressKey"down",hide=function()return tapControl end},
|
||||
WIDGET.newKey{name="left", x=55,y=560,w=100,fText="←",font=50,color="yellow",code=pressKey"left",hide=function()return tapControl end},
|
||||
WIDGET.newKey{name="right", x=255,y=560,w=100,fText="→",font=50,color="yellow",code=pressKey"right",hide=function()return tapControl end},
|
||||
WIDGET.newKey{name="skip", x=155,y=400,w=100,font=20,color="yellow",code=pressKey"space",hide=function()return state~=1 or not skipper.cd or skipper.cd>0 end},
|
||||
WIDGET.newKey{name="record1", x=1100,y=390,w=220,h=50,fText="",color="gray",code=pressKey"1",hide=function()return state==2 end},
|
||||
WIDGET.newKey{name="record2", x=1100,y=450,w=220,h=50,fText="",color="gray",code=pressKey"2",hide=function()return state==2 end},
|
||||
WIDGET.newKey{name="replay1", x=1245,y=390,w=50,fText="!",color="green",code=pressKey"c1",hide=function()return state==2 or #repeater.seq[1]==0 end},
|
||||
WIDGET.newKey{name="replay2", x=1245,y=450,w=50,fText="!",color="green",code=pressKey"c2",hide=function()return state==2 or #repeater.seq[2]==0 end},
|
||||
WIDGET.newKey{name="up", x=155,y=460,w=100,fText="↑",font=50,color="Y",code=pressKey"up",hide=function()return tapControl end},
|
||||
WIDGET.newKey{name="down", x=155,y=660,w=100,fText="↓",font=50,color="Y",code=pressKey"down",hide=function()return tapControl end},
|
||||
WIDGET.newKey{name="left", x=55,y=560,w=100,fText="←",font=50,color="Y",code=pressKey"left",hide=function()return tapControl end},
|
||||
WIDGET.newKey{name="right", x=255,y=560,w=100,fText="→",font=50,color="Y",code=pressKey"right",hide=function()return tapControl end},
|
||||
WIDGET.newKey{name="skip", x=155,y=400,w=100,font=20,color="Y",code=pressKey"space",hide=function()return state~=1 or not skipper.cd or skipper.cd>0 end},
|
||||
WIDGET.newKey{name="record1", x=1100,y=390,w=220,h=50,fText="",color="H",code=pressKey"1",hide=function()return state==2 end},
|
||||
WIDGET.newKey{name="record2", x=1100,y=450,w=220,h=50,fText="",color="H",code=pressKey"2",hide=function()return state==2 end},
|
||||
WIDGET.newKey{name="replay1", x=1245,y=390,w=50,fText="!",color="G",code=pressKey"c1",hide=function()return state==2 or #repeater.seq[1]==0 end},
|
||||
WIDGET.newKey{name="replay2", x=1245,y=450,w=50,fText="!",color="G",code=pressKey"c2",hide=function()return state==2 or #repeater.seq[2]==0 end},
|
||||
WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=backScene},
|
||||
}
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newSelector{name="level", x=640,y=640,w=200,list={"A_Z","Z_A","Tech1","Tech2","KeyTest1","KeyTest2","Hello","Roll1","Roll2","Roll3","ZZZ","ZXZX","ZMZM","Stair","Stair2","Stair3","BPW"},disp=function()return levelName end,code=function(i)levelName=i;targetString=levels[i]end,hide=function()return state>0 end},
|
||||
WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color="lGreen",font=40,code=pressKey"space"},
|
||||
WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color="lG",font=40,code=pressKey"space"},
|
||||
WIDGET.newButton{name="keyboard", x=160,y=210,w=180,h=100,code=function()love.keyboard.setTextInput(true,0,select(2,SCR.xOy:transformPoint(0,500)),1,1)end,hide=not MOBILE},
|
||||
WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=backScene},
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ function scene.mouseDown(x,y)
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newButton{name="reset",x=1140,y=540,w=170,h=80,font=40,color="lGreen",code=restart},
|
||||
WIDGET.newButton{name="reset",x=1140,y=540,w=170,h=80,font=40,color="lG",code=restart},
|
||||
WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,font=40,code=backScene},
|
||||
}
|
||||
|
||||
|
||||
@@ -83,15 +83,15 @@ end
|
||||
local scoreColor={
|
||||
"white",--0
|
||||
"aqua",--20
|
||||
"sky",--40
|
||||
"navy",--40
|
||||
"blue",--60
|
||||
"grape",--80
|
||||
"pink",--100
|
||||
"purple",--80
|
||||
"wine",--100
|
||||
"red","fire","orange","yellow","lAqua",--200
|
||||
"lSky","lBlue","lGrape","lPink","lRed",--300
|
||||
"lFire","lOrange","lYellow","dAqua","dSky",--400
|
||||
"dBlue","dGrape","dPink","dRed","dFire",--500
|
||||
"dYellow","lGray","gray","dGray",--before 600, black after
|
||||
"lNavy","lBlue","lPurple","lWine","lRed",--300
|
||||
"lFire","lOrange","lYellow","dAqua","dNavy",--400
|
||||
"dBlue","dPurple","dWine","dRed","dFire",--500
|
||||
"dYellow","lH","H","dH",--before 600, black after
|
||||
}
|
||||
function scene.draw()
|
||||
--Spawn area
|
||||
|
||||
@@ -6,9 +6,9 @@ local C=COLOR
|
||||
local inputBox=WIDGET.newInputBox{name="input",x=40,y=650,w=1200,h=50}
|
||||
local outputBox=WIDGET.newTextBox{name="output",x=40,y=30,w=1200,h=600,font=25,lineH=25,fix=true}
|
||||
local function log(str)outputBox:push(str)end
|
||||
log{C.lGrape,"Techmino Console"}
|
||||
log{C.lBlue,"©2020 26F Studio some rights reserved"}
|
||||
log{C.dRed,"DO NOT RUN ANY CODE YOU DON'T UNDERSTAND"}
|
||||
log{C.lP,"Techmino Console"}
|
||||
log{C.lB,"©2020 26F Studio some rights reserved"}
|
||||
log{C.dR,"DO NOT RUN ANY CODE YOU DON'T UNDERSTAND"}
|
||||
|
||||
local history,hisPtr={"?"}
|
||||
local the_secret=(14^2*10)..(2*11)
|
||||
@@ -272,10 +272,10 @@ do--commands.help(arg)
|
||||
log"Use help [page] to view more commands,"
|
||||
log"or help [command_name] for details of a command."
|
||||
log""
|
||||
log{C.lPink,"Page ",C.lG,page,C.lPink," of ",C.lG,maxPage}
|
||||
log{C.lW,"Page ",C.lG,page,C.lW," of ",C.lG,maxPage}
|
||||
for i=pageSize*(page-1)+1,math.min(pageSize*page,#command_help_list)do
|
||||
local cmd=command_help_list[i]
|
||||
log{C.W,cmd,C.gray," "..command_help_messages[cmd].description}
|
||||
log{C.Z,cmd,C.H," "..command_help_messages[cmd].description}
|
||||
end
|
||||
else
|
||||
log{C.R,"Invalid page number. Must be between 1 and "..maxPage.." (inclusive)."}
|
||||
@@ -313,7 +313,7 @@ function commands.url(url)
|
||||
if url~=""then
|
||||
local res,err=pcall(love.system.openURL,url)
|
||||
if not res then
|
||||
log{C.R,"[ERR] ",C.W,err}
|
||||
log{C.R,"[ERR] ",C.Z,err}
|
||||
end
|
||||
else
|
||||
log{C.aqua,"Usage: url [url]"}
|
||||
@@ -631,14 +631,14 @@ function scene.keyDown(k)
|
||||
setfenv(code,userG)
|
||||
code,err=pcall(code)
|
||||
if not code then
|
||||
log{C.R,"[ERR] ",C.W,err}
|
||||
log{C.R,"[ERR] ",C.Z,err}
|
||||
end
|
||||
else
|
||||
log{C.R,"[SYNTAX ERR] ",C.W,err}
|
||||
log{C.R,"[SYNTAX ERR] ",C.Z,err}
|
||||
end
|
||||
else
|
||||
--Execute builtin command
|
||||
log{C.lSea,"> "..input}
|
||||
log{C.lS,"> "..input}
|
||||
local p=input:find(" ")
|
||||
local cmd,arg
|
||||
if p then
|
||||
@@ -689,7 +689,7 @@ function scene.keyDown(k)
|
||||
log(">Commands start with '"..str.."' :")
|
||||
table.sort(res)
|
||||
for i=1,#res do
|
||||
log{COLOR.lGray,res[i]}
|
||||
log{COLOR.lH,res[i]}
|
||||
end
|
||||
elseif #res==1 then
|
||||
inputBox.value=res[1]
|
||||
|
||||
@@ -174,12 +174,12 @@ setmetatable(backColor,backColor)
|
||||
function scene.draw()
|
||||
--Background
|
||||
local lv,height=int(camY/700),camY%700
|
||||
gc.setColor(backColor[lv+1]or COLOR.black)
|
||||
gc.setColor(backColor[lv+1]or COLOR.D)
|
||||
gc.rectangle("fill",0,720,1280,height-700)
|
||||
gc.setColor(backColor[lv+2]or COLOR.black)
|
||||
gc.setColor(backColor[lv+2]or COLOR.D)
|
||||
gc.rectangle("fill",0,height+20,1280,-height-20)
|
||||
if height-680>0 then
|
||||
gc.setColor(backColor[lv+3]or COLOR.black)
|
||||
gc.setColor(backColor[lv+3]or COLOR.D)
|
||||
gc.rectangle("fill",0,height-680,1280,680-height)
|
||||
end
|
||||
|
||||
|
||||
@@ -277,7 +277,7 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newButton{name="reset", x=155,y=100,w=180,h=100,color="lGreen",font=40,code=pressKey"r"},
|
||||
WIDGET.newButton{name="reset", x=155,y=100,w=180,h=100,color="lG",font=40,code=pressKey"r"},
|
||||
WIDGET.newButton{name="mode", x=155,y=220,w=180,h=100,font=40,code=pressKey"q",hide=function()return state~=0 end},
|
||||
WIDGET.newSwitch{name="arcade", x=230,y=330,font=40,disp=function()return arcade end,code=pressKey"w",hide=function()return state~=0 end},
|
||||
WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=backScene},
|
||||
|
||||
@@ -165,7 +165,7 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newKey{name="back",x=1140,y=60,w=170,h=80,color="black",font=40,code=pressKey"escape"},
|
||||
WIDGET.newKey{name="back",x=1140,y=60,w=170,h=80,color="D",font=40,code=pressKey"escape"},
|
||||
}
|
||||
|
||||
return scene
|
||||
@@ -168,7 +168,7 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color="lGreen",font=40,code=pressKey"space",hide=function()return state==0 end},
|
||||
WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color="lG",font=40,code=pressKey"space",hide=function()return state==0 end},
|
||||
WIDGET.newSlider{name="rank", x=130,y=250,w=150,unit=3,show=false,font=40,disp=function()return rank-3 end,code=function(v)rank=v+3 end,hide=function()return state>0 end},
|
||||
WIDGET.newSwitch{name="blind", x=240,y=330,w=60, font=40,disp=function()return blind end, code=pressKey"q",hide=function()return state==1 end},
|
||||
WIDGET.newSwitch{name="disappear", x=240,y=420,w=60, font=40,disp=function()return disappear end,code=pressKey"w",hide=function()return state==1 end},
|
||||
|
||||
@@ -73,7 +73,7 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newKey{name="tap", x=640,y=540,w=626,h=260,fText="TAP",color="white",font=100,code=pressKey"button"},
|
||||
WIDGET.newKey{name="tap", x=640,y=540,w=626,h=260,fText="TAP",color="Z",font=100,code=pressKey"button"},
|
||||
WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=backScene},
|
||||
}
|
||||
|
||||
|
||||
@@ -269,7 +269,7 @@ function scene.draw()
|
||||
local N=board[i][j]
|
||||
if N>0 then
|
||||
if hide and N>maxNew then
|
||||
setColor(COLOR.dGray)
|
||||
setColor(COLOR.dH)
|
||||
rectangle("fill",320+j*128-128,40+i*128-128,128,128)
|
||||
setColor(1,1,1,.3)
|
||||
mStr("?",j*128+256,i*128-75)
|
||||
@@ -299,7 +299,7 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color="lGreen",font=40,code=pressKey"r"},
|
||||
WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color="lG",font=40,code=pressKey"r"},
|
||||
WIDGET.newSwitch{name="next", x=240,y=235,font=40,disp=function()return nexts end,code=pressKey"q",hide=function()return state==1 end},
|
||||
WIDGET.newSwitch{name="blind", x=240,y=305,font=40,disp=function()return blind end,code=pressKey"w",hide=function()return state==1 end},
|
||||
WIDGET.newSwitch{name="fast", x=240,y=375,font=30,disp=function()return fast end,code=pressKey"e",hide=function()return state==1 end},
|
||||
|
||||
@@ -69,7 +69,7 @@ function scene.keyDown(key)
|
||||
str=str.."!"
|
||||
if #MISSION>0 then str=str..copyMission()end
|
||||
sys.setClipboardText(str.."!"..copyBoards().."!")
|
||||
LOG.print(text.exportSuccess,COLOR.green)
|
||||
LOG.print(text.exportSuccess,COLOR.G)
|
||||
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
|
||||
local str=sys.getClipboardText()
|
||||
local args=SPLITSTR(str:sub((str:find(":")or 0)+1),"!")
|
||||
@@ -85,9 +85,9 @@ function scene.keyDown(key)
|
||||
if not pasteBoard(args[i],i-3)and i<#args then goto THROW_fail end
|
||||
end
|
||||
freshMiniFieldVisible()
|
||||
LOG.print(text.importSuccess,COLOR.green)
|
||||
LOG.print(text.importSuccess,COLOR.G)
|
||||
do return end
|
||||
::THROW_fail::LOG.print(text.dataCorrupted,COLOR.red)
|
||||
::THROW_fail::LOG.print(text.dataCorrupted,COLOR.R)
|
||||
elseif key=="escape"then
|
||||
FILE.save(CUSTOMENV,"conf/customEnv","q")
|
||||
SCN.back()
|
||||
@@ -147,32 +147,32 @@ end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=520, y=5,font=70,align="R"},
|
||||
WIDGET.newText{name="subTitle", x=530, y=50,font=35,align="L",color="gray"},
|
||||
WIDGET.newText{name="defSeq", x=330, y=550,align="L",color="gray",hide=function()return BAG[1]end},
|
||||
WIDGET.newText{name="noMsn", x=610, y=550,align="L",color="gray",hide=function()return MISSION[1]end},
|
||||
WIDGET.newText{name="subTitle", x=530, y=50,font=35,align="L",color="H"},
|
||||
WIDGET.newText{name="defSeq", x=330, y=550,align="L",color="H",hide=function()return BAG[1]end},
|
||||
WIDGET.newText{name="noMsn", x=610, y=550,align="L",color="H",hide=function()return MISSION[1]end},
|
||||
|
||||
--Basic
|
||||
WIDGET.newSelector{name="drop", x=170, y=150,w=220,color="orange", list={0,.125,.25,.5,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99},disp=CUSval("drop"),code=CUSsto("drop")},
|
||||
WIDGET.newSelector{name="lock", x=170, y=230,w=220,color="red", list={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99}, disp=CUSval("lock"),code=CUSsto("lock")},
|
||||
WIDGET.newSelector{name="wait", x=410, y=150,w=220,color="green", list={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, disp=CUSval("wait"),code=CUSsto("wait")},
|
||||
WIDGET.newSelector{name="fall", x=410, y=230,w=220,color="yellow", list={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, disp=CUSval("fall"),code=CUSsto("fall")},
|
||||
WIDGET.newSelector{name="drop", x=170, y=150,w=220,color="O",list={0,.125,.25,.5,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99},disp=CUSval("drop"),code=CUSsto("drop")},
|
||||
WIDGET.newSelector{name="lock", x=170, y=230,w=220,color="R",list={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99}, disp=CUSval("lock"),code=CUSsto("lock")},
|
||||
WIDGET.newSelector{name="wait", x=410, y=150,w=220,color="G",list={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, disp=CUSval("wait"),code=CUSsto("wait")},
|
||||
WIDGET.newSelector{name="fall", x=410, y=230,w=220,color="Y",list={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, disp=CUSval("fall"),code=CUSsto("fall")},
|
||||
|
||||
--Else
|
||||
WIDGET.newSelector{name="bg", x=1070, y=150,w=250,color="yellow",list=BG.getList(),disp=CUSval("bg"), code=function(i)CUSTOMENV.bg=i BG.set(i)end},
|
||||
WIDGET.newSelector{name="bgm", x=1070, y=230,w=250,color="yellow", list=BGM.getList(), disp=CUSval("bgm"), code=function(i)CUSTOMENV.bgm=i BGM.play(i)end},
|
||||
WIDGET.newSelector{name="bg", x=1070, y=150,w=250,color="Y",list=BG.getList(),disp=CUSval("bg"), code=function(i)CUSTOMENV.bg=i BG.set(i)end},
|
||||
WIDGET.newSelector{name="bgm", x=1070, y=230,w=250,color="Y",list=BGM.getList(), disp=CUSval("bgm"), code=function(i)CUSTOMENV.bgm=i BGM.play(i)end},
|
||||
|
||||
--Copy/Paste/Start
|
||||
WIDGET.newButton{name="copy", x=1070, y=310,w=310,h=70,color="lRed", font=25,code=pressKey"cC"},
|
||||
WIDGET.newButton{name="paste", x=1070, y=390,w=310,h=70,color="lBlue", font=25,code=pressKey"cV"},
|
||||
WIDGET.newButton{name="clear", x=1070, y=470,w=310,h=70,color="lYellow",font=35,code=pressKey"return"},
|
||||
WIDGET.newButton{name="puzzle",x=1070, y=550,w=310,h=70,color="lMagenta",font=35,code=pressKey"return2",hide=function()return not initField end},
|
||||
WIDGET.newButton{name="copy", x=1070, y=310,w=310,h=70,color="lR",font=25,code=pressKey"cC"},
|
||||
WIDGET.newButton{name="paste", x=1070, y=390,w=310,h=70,color="lB",font=25,code=pressKey"cV"},
|
||||
WIDGET.newButton{name="clear", x=1070, y=470,w=310,h=70,color="lY",font=35,code=pressKey"return"},
|
||||
WIDGET.newButton{name="puzzle",x=1070, y=550,w=310,h=70,color="lM",font=35,code=pressKey"return2",hide=function()return not initField end},
|
||||
|
||||
--More
|
||||
WIDGET.newKey{name="advance", x=730, y=190,w=220,h=90,color="red", font=35,code=goScene"custom_advance"},
|
||||
WIDGET.newKey{name="mod", x=730, y=310,w=220,h=90,color="white", font=35,code=goScene"mod"},
|
||||
WIDGET.newKey{name="field", x=170, y=640,w=240,h=80,color="aqua", font=25,code=goScene"custom_field"},
|
||||
WIDGET.newKey{name="sequence", x=450, y=640,w=240,h=80,color="pink", font=25,code=goScene"custom_sequence"},
|
||||
WIDGET.newKey{name="mission", x=730, y=640,w=240,h=80,color="sky", font=25,code=goScene"custom_mission"},
|
||||
WIDGET.newKey{name="advance", x=730, y=190,w=220,h=90,color="R",font=35,code=goScene"custom_advance"},
|
||||
WIDGET.newKey{name="mod", x=730, y=310,w=220,h=90,color="Z",font=35,code=goScene"mod"},
|
||||
WIDGET.newKey{name="field", x=170, y=640,w=240,h=80,color="A",font=25,code=goScene"custom_field"},
|
||||
WIDGET.newKey{name="sequence", x=450, y=640,w=240,h=80,color="W",font=25,code=goScene"custom_sequence"},
|
||||
WIDGET.newKey{name="mission", x=730, y=640,w=240,h=80,color="N",font=25,code=goScene"custom_mission"},
|
||||
|
||||
WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80,font=40,code=pressKey"escape"},
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ local scene={}
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=520,y=5,font=70,align="R"},
|
||||
WIDGET.newText{name="subTitle", x=530,y=50,font=35,align="L",color="gray"},
|
||||
WIDGET.newText{name="subTitle", x=530,y=50,font=35,align="L",color="H"},
|
||||
|
||||
--Control
|
||||
WIDGET.newSlider{name="nextCount", x=200, y=150, w=200,unit=6,disp=CUSval("nextCount"),code=CUSsto("nextCount")},
|
||||
@@ -20,12 +20,12 @@ scene.widgetList={
|
||||
WIDGET.newSwitch{name="phyHold", x=350, y=430, disp=CUSval("phyHold"), code=CUSrev("phyHold"),hide=function()return CUSTOMENV.holdCount==0 end},
|
||||
|
||||
--Rule
|
||||
WIDGET.newSelector{name="fieldH", x=270, y=520, w=260,color="sky", list=sList.fieldH, disp=CUSval("fieldH"),code=CUSsto("fieldH")},
|
||||
WIDGET.newSelector{name="visible", x=840, y=60, w=260,color="lBlue",list=sList.visible, disp=CUSval("visible"),code=CUSsto("visible")},
|
||||
WIDGET.newSelector{name="freshLimit",x=840, y=160, w=260,color="purple",list=sList.freshLimit, disp=CUSval("freshLimit"),code=CUSsto("freshLimit")},
|
||||
WIDGET.newSelector{name="opponent", x=1120, y=60, w=260,color="red", list=sList.opponent, disp=CUSval("opponent"),code=CUSsto("opponent")},
|
||||
WIDGET.newSelector{name="life", x=1120, y=160, w=260,color="red", list=sList.life, disp=CUSval("life"),code=CUSsto("life")},
|
||||
WIDGET.newSelector{name="pushSpeed",x=1120, y=260, w=260,color="red", list=sList.pushSpeed, disp=CUSval("pushSpeed"),code=CUSsto("pushSpeed")},
|
||||
WIDGET.newSelector{name="fieldH", x=270, y=520, w=260,color="N",list=sList.fieldH, disp=CUSval("fieldH"),code=CUSsto("fieldH")},
|
||||
WIDGET.newSelector{name="visible", x=840, y=60, w=260,color="lB",list=sList.visible, disp=CUSval("visible"),code=CUSsto("visible")},
|
||||
WIDGET.newSelector{name="freshLimit",x=840, y=160, w=260,color="V",list=sList.freshLimit, disp=CUSval("freshLimit"),code=CUSsto("freshLimit")},
|
||||
WIDGET.newSelector{name="opponent", x=1120, y=60, w=260,color="R",list=sList.opponent, disp=CUSval("opponent"),code=CUSsto("opponent")},
|
||||
WIDGET.newSelector{name="life", x=1120, y=160, w=260,color="R",list=sList.life, disp=CUSval("life"),code=CUSsto("life")},
|
||||
WIDGET.newSelector{name="pushSpeed",x=1120, y=260, w=260,color="R",list=sList.pushSpeed, disp=CUSval("pushSpeed"),code=CUSsto("pushSpeed")},
|
||||
|
||||
WIDGET.newSwitch{name="ospin", x=870, y=350, font=30,disp=CUSval("ospin"), code=CUSrev("ospin")},
|
||||
WIDGET.newSwitch{name="fineKill", x=870, y=440, font=20,disp=CUSval("fineKill"),code=CUSrev("fineKill")},
|
||||
|
||||
@@ -227,15 +227,15 @@ function scene.keyDown(key)
|
||||
SFX.play("fall",.8)
|
||||
elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then
|
||||
sys.setClipboardText("Techmino Field:"..copyBoard(page))
|
||||
LOG.print(text.exportSuccess,COLOR.green)
|
||||
LOG.print(text.exportSuccess,COLOR.G)
|
||||
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
|
||||
local str=sys.getClipboardText()
|
||||
local p=string.find(str,":")--ptr*
|
||||
if p then str=sub(str,p+1)end
|
||||
if pasteBoard(str,page)then
|
||||
LOG.print(text.importSuccess,COLOR.green)
|
||||
LOG.print(text.importSuccess,COLOR.G)
|
||||
else
|
||||
LOG.print(text.dataCorrupted,COLOR.red)
|
||||
LOG.print(text.dataCorrupted,COLOR.R)
|
||||
end
|
||||
elseif key=="tab"or key=="sTab"then
|
||||
if key=="sTab"or kb.isDown("lshift","rshift")then
|
||||
@@ -424,50 +424,50 @@ end
|
||||
local function setPen(i)return function()penType=i end end
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=1020,y=5,font=70,align="R"},
|
||||
WIDGET.newText{name="subTitle", x=1030,y=50,font=35,align="L",color="gray"},
|
||||
WIDGET.newText{name="subTitle", x=1030,y=50,font=35,align="L",color="H"},
|
||||
|
||||
WIDGET.newButton{name="b1", x=580, y=130,w=75,fText="",color=COLOR.red, code=setPen(1)},--B1
|
||||
WIDGET.newButton{name="b2", x=660, y=130,w=75,fText="",color=COLOR.fire, code=setPen(2)},--B2
|
||||
WIDGET.newButton{name="b3", x=740, y=130,w=75,fText="",color=COLOR.orange, code=setPen(3)},--B3
|
||||
WIDGET.newButton{name="b4", x=820, y=130,w=75,fText="",color=COLOR.yellow, code=setPen(4)},--B4
|
||||
WIDGET.newButton{name="b5", x=900, y=130,w=75,fText="",color=COLOR.lime, code=setPen(5)},--B5
|
||||
WIDGET.newButton{name="b6", x=980, y=130,w=75,fText="",color=COLOR.grass, code=setPen(6)},--B6
|
||||
WIDGET.newButton{name="b7", x=1060, y=130,w=75,fText="",color=COLOR.green, code=setPen(7)},--B7
|
||||
WIDGET.newButton{name="b8", x=1140, y=130,w=75,fText="",color=COLOR.aqua, code=setPen(8)},--B8
|
||||
WIDGET.newButton{name="b1", x=580, y=130,w=75,fText="",color="R",code=setPen(1)},--B1
|
||||
WIDGET.newButton{name="b2", x=660, y=130,w=75,fText="",color="F",code=setPen(2)},--B2
|
||||
WIDGET.newButton{name="b3", x=740, y=130,w=75,fText="",color="O",code=setPen(3)},--B3
|
||||
WIDGET.newButton{name="b4", x=820, y=130,w=75,fText="",color="Y",code=setPen(4)},--B4
|
||||
WIDGET.newButton{name="b5", x=900, y=130,w=75,fText="",color="L",code=setPen(5)},--B5
|
||||
WIDGET.newButton{name="b6", x=980, y=130,w=75,fText="",color="J",code=setPen(6)},--B6
|
||||
WIDGET.newButton{name="b7", x=1060, y=130,w=75,fText="",color="G",code=setPen(7)},--B7
|
||||
WIDGET.newButton{name="b8", x=1140, y=130,w=75,fText="",color="A",code=setPen(8)},--B8
|
||||
|
||||
WIDGET.newButton{name="b9", x=580, y=210,w=75,fText="",color=COLOR.cyan, code=setPen(9)},--B9
|
||||
WIDGET.newButton{name="b10", x=660, y=210,w=75,fText="",color=COLOR.sky, code=setPen(10)},--B10
|
||||
WIDGET.newButton{name="b11", x=740, y=210,w=75,fText="",color=COLOR.sea, code=setPen(11)},--B11
|
||||
WIDGET.newButton{name="b12", x=820, y=210,w=75,fText="",color=COLOR.blue, code=setPen(12)},--B12
|
||||
WIDGET.newButton{name="b13", x=900, y=210,w=75,fText="",color=COLOR.purple, code=setPen(13)},--B13
|
||||
WIDGET.newButton{name="b14", x=980, y=210,w=75,fText="",color=COLOR.grape, code=setPen(14)},--B14
|
||||
WIDGET.newButton{name="b15", x=1060, y=210,w=75,fText="",color=COLOR.magenta,code=setPen(15)},--B15
|
||||
WIDGET.newButton{name="b16", x=1140, y=210,w=75,fText="",color=COLOR.pink, code=setPen(16)},--B16
|
||||
WIDGET.newButton{name="b9", x=580, y=210,w=75,fText="",color="C",code=setPen(9)},--B9
|
||||
WIDGET.newButton{name="b10", x=660, y=210,w=75,fText="",color="N",code=setPen(10)},--B10
|
||||
WIDGET.newButton{name="b11", x=740, y=210,w=75,fText="",color="S",code=setPen(11)},--B11
|
||||
WIDGET.newButton{name="b12", x=820, y=210,w=75,fText="",color="B",code=setPen(12)},--B12
|
||||
WIDGET.newButton{name="b13", x=900, y=210,w=75,fText="",color="V",code=setPen(13)},--B13
|
||||
WIDGET.newButton{name="b14", x=980, y=210,w=75,fText="",color="P",code=setPen(14)},--B14
|
||||
WIDGET.newButton{name="b15", x=1060, y=210,w=75,fText="",color="M",code=setPen(15)},--B15
|
||||
WIDGET.newButton{name="b16", x=1140, y=210,w=75,fText="",color="W",code=setPen(16)},--B16
|
||||
|
||||
WIDGET.newButton{name="b17", x=580, y=290,w=75,fText="[ ]",color="dGray", code=setPen(17)},--BONE
|
||||
WIDGET.newButton{name="b18", x=660, y=290,w=75,fText="N", color="black", code=setPen(18)},--HIDE
|
||||
WIDGET.newButton{name="b19", x=740, y=290,w=75,fText="B", color="lYellow",code=setPen(19)},--BOMB
|
||||
WIDGET.newButton{name="b20", x=820, y=290,w=75,fText="_", color="gray", code=setPen(20)},--GB1
|
||||
WIDGET.newButton{name="b21", x=900, y=290,w=75,fText="_", color="lGray", code=setPen(21)},--GB2
|
||||
WIDGET.newButton{name="b22", x=980, y=290,w=75,fText="_", color="dPurple",code=setPen(22)},--GB3
|
||||
WIDGET.newButton{name="b23", x=1060, y=290,w=75,fText="_", color="dRed", code=setPen(23)},--GB4
|
||||
WIDGET.newButton{name="b24", x=1140, y=290,w=75,fText="_", color="dGreen", code=setPen(24)},--GB5
|
||||
WIDGET.newButton{name="b17", x=580, y=290,w=75,fText="[ ]",color="dH", code=setPen(17)},--BONE
|
||||
WIDGET.newButton{name="b18", x=660, y=290,w=75,fText="N", color="D", code=setPen(18)},--HIDE
|
||||
WIDGET.newButton{name="b19", x=740, y=290,w=75,fText="B", color="lY", code=setPen(19)},--BOMB
|
||||
WIDGET.newButton{name="b20", x=820, y=290,w=75,fText="_", color="H", code=setPen(20)},--GB1
|
||||
WIDGET.newButton{name="b21", x=900, y=290,w=75,fText="_", color="lH", code=setPen(21)},--GB2
|
||||
WIDGET.newButton{name="b22", x=980, y=290,w=75,fText="_", color="dV", code=setPen(22)},--GB3
|
||||
WIDGET.newButton{name="b23", x=1060, y=290,w=75,fText="_", color="dR", code=setPen(23)},--GB4
|
||||
WIDGET.newButton{name="b24", x=1140, y=290,w=75,fText="_", color="dG", code=setPen(24)},--GB5
|
||||
|
||||
WIDGET.newButton{name="any", x=600, y=400,w=120,color="lGray", font=40,code=setPen(0)},
|
||||
WIDGET.newButton{name="space", x=730, y=400,w=120,color="gray", font=65,code=setPen(-1)},
|
||||
WIDGET.newButton{name="smartPen", x=860, y=400,w=120,color="lGreen", font=30,code=setPen(-2)},
|
||||
WIDGET.newButton{name="pushLine", x=990, y=400,w=120,h=120,color="lYellow",font=20,code=pressKey"k"},
|
||||
WIDGET.newButton{name="delLine", x=1120, y=400,w=120,h=120,color="lYellow",font=20,code=pressKey"l"},
|
||||
WIDGET.newButton{name="any", x=600, y=400,w=120,color="lH", font=40,code=setPen(0)},
|
||||
WIDGET.newButton{name="space", x=730, y=400,w=120,color="H", font=65,code=setPen(-1)},
|
||||
WIDGET.newButton{name="smartPen", x=860, y=400,w=120,color="lG", font=30,code=setPen(-2)},
|
||||
WIDGET.newButton{name="pushLine", x=990, y=400,w=120,h=120,color="lY",font=20,code=pressKey"k"},
|
||||
WIDGET.newButton{name="delLine", x=1120, y=400,w=120,h=120,color="lY",font=20,code=pressKey"l"},
|
||||
|
||||
WIDGET.newButton{name="copy", x=730, y=530,w=120,color="lRed", font=35,code=pressKey"cC"},
|
||||
WIDGET.newButton{name="paste", x=860, y=530,w=120,color="lBlue", font=35,code=pressKey"cV"},
|
||||
WIDGET.newButton{name="clear", x=990, y=530,w=120,color="white", font=40,code=pressKey"delete"},
|
||||
WIDGET.newButton{name="copy", x=730, y=530,w=120,color="lR", font=35,code=pressKey"cC"},
|
||||
WIDGET.newButton{name="paste", x=860, y=530,w=120,color="lB", font=35,code=pressKey"cV"},
|
||||
WIDGET.newButton{name="clear", x=990, y=530,w=120,color="Z", font=40,code=pressKey"delete"},
|
||||
WIDGET.newSwitch{name="demo", x=755, y=640,disp=function()return demo end,code=function()demo=not demo end},
|
||||
|
||||
WIDGET.newButton{name="newPage", x=100, y=110,w=160,h=110,color="sky",font=20,code=pressKey"n"},
|
||||
WIDGET.newButton{name="delPage", x=100, y=230,w=160,h=110,color="lRed",font=20,code=pressKey"m"},
|
||||
WIDGET.newButton{name="prevPage", x=100, y=350,w=160,h=110,color="lGreen",font=20,code=pressKey"sTab",hide=function()return page==1 end},
|
||||
WIDGET.newButton{name="nextPage", x=100, y=470,w=160,h=110,color="lGreen",font=20,code=pressKey"tab",hide=function()return page==#FIELD end},
|
||||
WIDGET.newButton{name="newPage", x=100, y=110,w=160,h=110,color="N",font=20,code=pressKey"n"},
|
||||
WIDGET.newButton{name="delPage", x=100, y=230,w=160,h=110,color="lR",font=20,code=pressKey"m"},
|
||||
WIDGET.newButton{name="prevPage", x=100, y=350,w=160,h=110,color="lG",font=20,code=pressKey"sTab",hide=function()return page==1 end},
|
||||
WIDGET.newButton{name="nextPage", x=100, y=470,w=160,h=110,color="lG",font=20,code=pressKey"tab",hide=function()return page==#FIELD end},
|
||||
|
||||
WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80,font=40,code=backScene},
|
||||
}
|
||||
|
||||
@@ -73,17 +73,17 @@ function scene.keyDown(key)
|
||||
elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then
|
||||
if #MISSION>0 then
|
||||
sys.setClipboardText("Techmino Target:"..copyMission())
|
||||
LOG.print(text.exportSuccess,COLOR.green)
|
||||
LOG.print(text.exportSuccess,COLOR.G)
|
||||
end
|
||||
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
|
||||
local str=sys.getClipboardText()
|
||||
local p=string.find(str,":")--ptr*
|
||||
if p then str=sub(str,p+1)end
|
||||
if pasteMission(str)then
|
||||
LOG.print(text.importSuccess,COLOR.green)
|
||||
LOG.print(text.importSuccess,COLOR.G)
|
||||
cur=#MISSION
|
||||
else
|
||||
LOG.print(text.dataCorrupted,COLOR.red)
|
||||
LOG.print(text.dataCorrupted,COLOR.R)
|
||||
end
|
||||
elseif key=="escape"then
|
||||
SCN.back()
|
||||
@@ -160,7 +160,7 @@ function scene.draw()
|
||||
elseif L[i]>4 then
|
||||
gc.setColor(COLOR.rainbow(i+TIME()*6.26))
|
||||
else
|
||||
gc.setColor(COLOR.gray)
|
||||
gc.setColor(COLOR.H)
|
||||
end
|
||||
gc.print(missionEnum[L[i]],x,y-25)
|
||||
x=x+56
|
||||
@@ -185,7 +185,7 @@ end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=520,y=5,font=70,align="R"},
|
||||
WIDGET.newText{name="subTitle", x=530,y=50,font=35,align="L",color="gray"},
|
||||
WIDGET.newText{name="subTitle", x=530,y=50,font=35,align="L",color="H"},
|
||||
|
||||
WIDGET.newKey{name="_1", x=800, y=540, w=90, font=50,code=pressKey(01)},
|
||||
WIDGET.newKey{name="_2", x=900, y=540, w=90, font=50,code=pressKey(02)},
|
||||
@@ -224,13 +224,13 @@ scene.widgetList={
|
||||
WIDGET.newKey{name="O4", x=600, y=640, w=90, font=50,code=pressKey(64)},
|
||||
WIDGET.newKey{name="I4", x=700, y=640, w=90, font=50,code=pressKey(74)},
|
||||
|
||||
WIDGET.newKey{name="left", x=800, y=440, w=90, color="lGreen", font=55,code=pressKey"left"},
|
||||
WIDGET.newKey{name="right", x=900, y=440, w=90, color="lGreen", font=55,code=pressKey"right"},
|
||||
WIDGET.newKey{name="ten", x=1000, y=440, w=90, color="lGreen", font=40,code=pressKey"ten"},
|
||||
WIDGET.newKey{name="backsp", x=1000, y=540, w=90, color="lYellow",font=50,code=pressKey"backspace"},
|
||||
WIDGET.newKey{name="reset", x=1000, y=640, w=90, color="lYellow",font=50,code=pressKey"delete"},
|
||||
WIDGET.newButton{name="copy", x=1140, y=440, w=170,h=80, color="lRed", font=40,code=pressKey"cC",hide=function()return #MISSION==0 end},
|
||||
WIDGET.newButton{name="paste", x=1140, y=540, w=170,h=80, color="lBlue", font=40,code=pressKey"cV"},
|
||||
WIDGET.newKey{name="left", x=800, y=440, w=90, color="lG",font=55,code=pressKey"left"},
|
||||
WIDGET.newKey{name="right", x=900, y=440, w=90, color="lG",font=55,code=pressKey"right"},
|
||||
WIDGET.newKey{name="ten", x=1000, y=440, w=90, color="lG",font=40,code=pressKey"ten"},
|
||||
WIDGET.newKey{name="backsp", x=1000, y=540, w=90, color="lY",font=50,code=pressKey"backspace"},
|
||||
WIDGET.newKey{name="reset", x=1000, y=640, w=90, color="lY",font=50,code=pressKey"delete"},
|
||||
WIDGET.newButton{name="copy", x=1140, y=440, w=170,h=80, color="lR",font=40,code=pressKey"cC",hide=function()return #MISSION==0 end},
|
||||
WIDGET.newButton{name="paste", x=1140, y=540, w=170,h=80, color="lB",font=40,code=pressKey"cV"},
|
||||
WIDGET.newSwitch{name="mission",x=1150, y=350, disp=CUSval("missionKill"),code=CUSrev("missionKill")},
|
||||
|
||||
WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80, font=40,code=backScene},
|
||||
|
||||
@@ -88,17 +88,17 @@ function scene.keyDown(key)
|
||||
elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then
|
||||
if #BAG>0 then
|
||||
sys.setClipboardText("Techmino SEQ:"..copySequence())
|
||||
LOG.print(text.exportSuccess,COLOR.green)
|
||||
LOG.print(text.exportSuccess,COLOR.G)
|
||||
end
|
||||
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
|
||||
local str=sys.getClipboardText()
|
||||
local p=string.find(str,":")--ptr*
|
||||
if p then str=sub(str,p+1)end
|
||||
if pasteSequence(str)then
|
||||
LOG.print(text.importSuccess,COLOR.green)
|
||||
LOG.print(text.importSuccess,COLOR.G)
|
||||
cur=#BAG
|
||||
else
|
||||
LOG.print(text.dataCorrupted,COLOR.red)
|
||||
LOG.print(text.dataCorrupted,COLOR.R)
|
||||
end
|
||||
elseif key=="escape"then
|
||||
SCN.back()
|
||||
@@ -186,10 +186,10 @@ end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=520,y=5,font=70,align="R"},
|
||||
WIDGET.newText{name="subTitle",x=530,y=50,font=35,align="L",color="gray"},
|
||||
WIDGET.newText{name="subTitle",x=530,y=50,font=35,align="L",color="H"},
|
||||
|
||||
WIDGET.newSelector{name="sequence",
|
||||
x=1080,y=60,w=200,color="yellow",
|
||||
x=1080,y=60,w=200,color="Y",
|
||||
list={"bag","his4","c2","rnd","mess","reverb","loop","fixed"},
|
||||
disp=CUSval("sequence"),
|
||||
code=CUSsto("sequence")
|
||||
@@ -208,30 +208,30 @@ scene.widgetList={
|
||||
WIDGET.newKey{name="backsp",x=920,y=460,w=80,color="lY",font=50,code=pressKey"backspace"},
|
||||
WIDGET.newKey{name="reset", x=1000,y=460,w=80,color="lY",font=25,code=pressKey"delete"},
|
||||
|
||||
WIDGET.newKey{name="Z5", x=120,y=540,w=80,color="lGray",font=50,code=pressKey(8)},
|
||||
WIDGET.newKey{name="S5", x=200,y=540,w=80,color="lGray",font=50,code=pressKey(9)},
|
||||
WIDGET.newKey{name="P", x=280,y=540,w=80,color="lGray",font=50,code=pressKey(10)},
|
||||
WIDGET.newKey{name="Q", x=360,y=540,w=80,color="lGray",font=50,code=pressKey(11)},
|
||||
WIDGET.newKey{name="F", x=440,y=540,w=80,color="lGray",font=50,code=pressKey(12)},
|
||||
WIDGET.newKey{name="E", x=520,y=540,w=80,color="lGray",font=50,code=pressKey(13)},
|
||||
WIDGET.newKey{name="T5", x=600,y=540,w=80,color="lGray",font=50,code=pressKey(14)},
|
||||
WIDGET.newKey{name="U", x=680,y=540,w=80,color="lGray",font=50,code=pressKey(15)},
|
||||
WIDGET.newKey{name="V", x=760,y=540,w=80,color="lGray",font=50,code=pressKey(16)},
|
||||
WIDGET.newKey{name="I3", x=840,y=540,w=80,color="gray",font=50,code=pressKey(26)},
|
||||
WIDGET.newKey{name="C", x=920,y=540,w=80,color="gray",font=50,code=pressKey(27)},
|
||||
WIDGET.newKey{name="Z5", x=120,y=540,w=80,color="lH",font=50,code=pressKey(8)},
|
||||
WIDGET.newKey{name="S5", x=200,y=540,w=80,color="lH",font=50,code=pressKey(9)},
|
||||
WIDGET.newKey{name="P", x=280,y=540,w=80,color="lH",font=50,code=pressKey(10)},
|
||||
WIDGET.newKey{name="Q", x=360,y=540,w=80,color="lH",font=50,code=pressKey(11)},
|
||||
WIDGET.newKey{name="F", x=440,y=540,w=80,color="lH",font=50,code=pressKey(12)},
|
||||
WIDGET.newKey{name="E", x=520,y=540,w=80,color="lH",font=50,code=pressKey(13)},
|
||||
WIDGET.newKey{name="T5", x=600,y=540,w=80,color="lH",font=50,code=pressKey(14)},
|
||||
WIDGET.newKey{name="U", x=680,y=540,w=80,color="lH",font=50,code=pressKey(15)},
|
||||
WIDGET.newKey{name="V", x=760,y=540,w=80,color="lH",font=50,code=pressKey(16)},
|
||||
WIDGET.newKey{name="I3", x=840,y=540,w=80,color="H",font=50,code=pressKey(26)},
|
||||
WIDGET.newKey{name="C", x=920,y=540,w=80,color="H",font=50,code=pressKey(27)},
|
||||
WIDGET.newKey{name="rnd", x=1000,y=540,w=80,color="R",font=25,code=pressKey"="},
|
||||
|
||||
WIDGET.newKey{name="W", x=120,y=620,w=80,color="lGray",font=50,code=pressKey(17)},
|
||||
WIDGET.newKey{name="X", x=200,y=620,w=80,color="lGray",font=50,code=pressKey(18)},
|
||||
WIDGET.newKey{name="J5", x=280,y=620,w=80,color="lGray",font=50,code=pressKey(19)},
|
||||
WIDGET.newKey{name="L5", x=360,y=620,w=80,color="lGray",font=50,code=pressKey(20)},
|
||||
WIDGET.newKey{name="R", x=440,y=620,w=80,color="lGray",font=50,code=pressKey(21)},
|
||||
WIDGET.newKey{name="Y", x=520,y=620,w=80,color="lGray",font=50,code=pressKey(22)},
|
||||
WIDGET.newKey{name="N", x=600,y=620,w=80,color="lGray",font=50,code=pressKey(23)},
|
||||
WIDGET.newKey{name="H", x=680,y=620,w=80,color="lGray",font=50,code=pressKey(24)},
|
||||
WIDGET.newKey{name="I5", x=760,y=620,w=80,color="lGray",font=50,code=pressKey(25)},
|
||||
WIDGET.newKey{name="I2", x=840,y=620,w=80,color="dGray",font=50,code=pressKey(28)},
|
||||
WIDGET.newKey{name="O1", x=920,y=620,w=80,color="dGray",font=50,code=pressKey(29)},
|
||||
WIDGET.newKey{name="W", x=120,y=620,w=80,color="lH",font=50,code=pressKey(17)},
|
||||
WIDGET.newKey{name="X", x=200,y=620,w=80,color="lH",font=50,code=pressKey(18)},
|
||||
WIDGET.newKey{name="J5", x=280,y=620,w=80,color="lH",font=50,code=pressKey(19)},
|
||||
WIDGET.newKey{name="L5", x=360,y=620,w=80,color="lH",font=50,code=pressKey(20)},
|
||||
WIDGET.newKey{name="R", x=440,y=620,w=80,color="lH",font=50,code=pressKey(21)},
|
||||
WIDGET.newKey{name="Y", x=520,y=620,w=80,color="lH",font=50,code=pressKey(22)},
|
||||
WIDGET.newKey{name="N", x=600,y=620,w=80,color="lH",font=50,code=pressKey(23)},
|
||||
WIDGET.newKey{name="H", x=680,y=620,w=80,color="lH",font=50,code=pressKey(24)},
|
||||
WIDGET.newKey{name="I5", x=760,y=620,w=80,color="lH",font=50,code=pressKey(25)},
|
||||
WIDGET.newKey{name="I2", x=840,y=620,w=80,color="dH",font=50,code=pressKey(28)},
|
||||
WIDGET.newKey{name="O1", x=920,y=620,w=80,color="dH",font=50,code=pressKey(29)},
|
||||
|
||||
|
||||
WIDGET.newButton{name="copy",x=1140,y=460,w=170,h=80,color="lR",font=40,code=pressKey"cC",hide=function()return #BAG==0 end},
|
||||
|
||||
@@ -21,13 +21,13 @@ local lastSearch--Last searched string
|
||||
|
||||
local typeColor={
|
||||
help=COLOR.Y,
|
||||
other=COLOR.lOrange,
|
||||
other=COLOR.lO,
|
||||
game=COLOR.lC,
|
||||
term=COLOR.lR,
|
||||
setup=COLOR.lY,
|
||||
pattern=COLOR.lGrass,
|
||||
pattern=COLOR.lJ,
|
||||
english=COLOR.B,
|
||||
name=COLOR.lPurple,
|
||||
name=COLOR.lV,
|
||||
}
|
||||
local function getList()return result[1]and result or dict end
|
||||
local function clearResult()
|
||||
|
||||
@@ -18,7 +18,7 @@ function scene.mouseDown(_,_,k)
|
||||
if newVersionLaunch then
|
||||
SCN.push(SETTING.simpMode and"main_simple"or"main")
|
||||
SCN.swapTo("history","fade")
|
||||
LOG.print(text.newVersion,"warn",COLOR.lBlue)
|
||||
LOG.print(text.newVersion,"warn",COLOR.lB)
|
||||
else
|
||||
SCN.go(SETTING.simpMode and"main_simple"or"main")
|
||||
end
|
||||
|
||||
@@ -175,8 +175,8 @@ local loadingThread=coroutine.wrap(function()
|
||||
|
||||
DAILYLAUNCH=freshDate("q")
|
||||
if DAILYLAUNCH then
|
||||
logoColor1=COLOR.sea
|
||||
logoColor2=COLOR.lSea
|
||||
logoColor1=COLOR.S
|
||||
logoColor2=COLOR.lS
|
||||
else
|
||||
local r=math.random()*6.2832
|
||||
logoColor1={COLOR.rainbow(r)}
|
||||
@@ -364,7 +364,7 @@ function scene.draw()
|
||||
setFont(25)
|
||||
for i=0,26 do
|
||||
local x,y=light[3*i+1],light[3*i+2]
|
||||
gc.setColor(COLOR[i==progress and"gray"or light[3*i+3]and"dOrange"or"dGray"])
|
||||
gc.setColor(COLOR[i==progress and"H"or light[3*i+3]and"dO"or"dH"])
|
||||
gc.circle("fill",x,y,23)
|
||||
gc.setColor(.16,.16,.16)
|
||||
gc.circle("line",x,y,23)
|
||||
|
||||
@@ -174,18 +174,18 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newButton{name="offline",x=-1200,y=210,w=800,h=100, color="lR", font=45,align="R",edge=30, code=pressKey"1"},
|
||||
WIDGET.newButton{name="qplay", x=-1200,y=330,w=800,h=100, color="lM", font=40,align="R",edge=30, code=pressKey"q"},
|
||||
WIDGET.newButton{name="online", x=-1200,y=450,w=800,h=100, color="lPurple",font=45,align="R",edge=30, code=pressKey"a"},
|
||||
WIDGET.newButton{name="custom", x=-1200,y=570,w=800,h=100, color="lSea", font=45,align="R",edge=30, code=pressKey"z"},
|
||||
WIDGET.newButton{name="offline",x=-1200,y=210,w=800,h=100, color="lR",font=45,align="R",edge=30,code=pressKey"1"},
|
||||
WIDGET.newButton{name="qplay", x=-1200,y=330,w=800,h=100, color="lM",font=40,align="R",edge=30,code=pressKey"q"},
|
||||
WIDGET.newButton{name="online", x=-1200,y=450,w=800,h=100, color="lV",font=45,align="R",edge=30,code=pressKey"a"},
|
||||
WIDGET.newButton{name="custom", x=-1200,y=570,w=800,h=100, color="lS",font=45,align="R",edge=30,code=pressKey"z"},
|
||||
|
||||
WIDGET.newButton{name="setting",x=2480,y=210,w=800,h=100, color="lOrange",font=40,align="L",edge=30, code=pressKey"-"},
|
||||
WIDGET.newButton{name="stat", x=2480,y=330,w=800,h=100, color="lLime", font=40,align="L",edge=30, code=pressKey"p"},
|
||||
WIDGET.newButton{name="dict", x=2480,y=450,w=800,h=100, color="lGreen", font=40,align="L",edge=30, code=pressKey"l"},
|
||||
WIDGET.newButton{name="manual", x=2480,y=570,w=800,h=100, color="lC", font=40,align="L",edge=30, code=pressKey","},
|
||||
WIDGET.newButton{name="setting",x=2480,y=210,w=800,h=100, color="lO",font=40,align="L",edge=30,code=pressKey"-"},
|
||||
WIDGET.newButton{name="stat", x=2480,y=330,w=800,h=100, color="lL",font=40,align="L",edge=30,code=pressKey"p"},
|
||||
WIDGET.newButton{name="dict", x=2480,y=450,w=800,h=100, color="lG",font=40,align="L",edge=30,code=pressKey"l"},
|
||||
WIDGET.newButton{name="manual", x=2480,y=570,w=800,h=100, color="lC",font=40,align="L",edge=30,code=pressKey","},
|
||||
|
||||
WIDGET.newButton{name="music", x=160,y=80,w=200,h=90, color="lOrange",font=35, code=pressKey"2"},
|
||||
WIDGET.newButton{name="lang", x=960,y=80,w=90,h=90, color="lY", font=40, code=pressKey"0",fText=DOGC{64,64,
|
||||
WIDGET.newButton{name="music", x=160,y=80,w=200,h=90, color="lO",font=35,code=pressKey"2"},
|
||||
WIDGET.newButton{name="lang", x=960,y=80,w=90,h=90, color="lY",font=40,code=pressKey"0",fText=DOGC{64,64,
|
||||
{"setLW",4},
|
||||
{"dCirc",32,32,30},
|
||||
{"dLine",2,31,62,31},
|
||||
@@ -193,8 +193,8 @@ scene.widgetList={
|
||||
{"doArc",10,31,40,-.8,.8},
|
||||
{"doArc",53,31,40,2.3,3.9},
|
||||
}},
|
||||
WIDGET.newButton{name="about", x=-110,y=670,w=600,h=70, color="lB", font=35,align="R",edge=30, code=pressKey"x"},
|
||||
WIDGET.newButton{name="quit", x=1390,y=670,w=600,h=70, color="lR", font=40,align="L",edge=30, code=function()VOC.play("bye")SCN.swapTo("quit","slowFade")end},
|
||||
WIDGET.newButton{name="about", x=-110,y=670,w=600,h=70, color="lB",font=35,align="R",edge=30,code=pressKey"x"},
|
||||
WIDGET.newButton{name="quit", x=1390,y=670,w=600,h=70, color="lR",font=40,align="L",edge=30,code=function()VOC.play("bye")SCN.swapTo("quit","slowFade")end},
|
||||
}
|
||||
|
||||
return scene
|
||||
@@ -16,8 +16,8 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="system", x=750,y=280,fText=SYSTEM,color="white",font=30,align="L"},
|
||||
WIDGET.newText{name="version", x=950,y=280,fText=VERSION.string,color="white",font=30,align="L"},
|
||||
WIDGET.newText{name="system", x=750,y=280,fText=SYSTEM,color="Z",font=30,align="L"},
|
||||
WIDGET.newText{name="version", x=950,y=280,fText=VERSION.string,color="Z",font=30,align="L"},
|
||||
WIDGET.newButton{name="sprint", x=260,y=480,w=260,font=50,code=function()loadGame("sprint_40l",true)end},
|
||||
WIDGET.newButton{name="marathon",x=640,y=480,w=260,font=50,code=function()loadGame("marathon_n",true)end},
|
||||
WIDGET.newButton{name="setting",x=1000,y=400,w=120,fText="...",font=50,code=goScene"setting_game"},
|
||||
|
||||
@@ -155,7 +155,7 @@ end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=80,y=50,font=70,align="L"},
|
||||
WIDGET.newText{name="unranked", x=1200,y=60,color="yellow",font=50,align="R",hide=function()return scoreValid()end},
|
||||
WIDGET.newText{name="unranked", x=1200,y=60,color="Y",font=50,align="R",hide=function()return scoreValid()end},
|
||||
WIDGET.newButton{name="reset", x=1140,y=540,w=170,h=80,font=25,code=pressKey"tab"},
|
||||
WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,font=40,code=backScene},
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ local gc=love.graphics
|
||||
local sin=math.sin
|
||||
|
||||
local author={
|
||||
battle="Aether",
|
||||
empty="ERM",
|
||||
["how feeling"]="????",
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ function scene.keyDown(k)
|
||||
SCN.back()
|
||||
else
|
||||
escapeTimer=TIME()
|
||||
LOG.print(text.sureQuit,COLOR.orange)
|
||||
LOG.print(text.sureQuit,COLOR.O)
|
||||
end
|
||||
else
|
||||
WIDGET.keyPressed(k)
|
||||
@@ -68,12 +68,12 @@ function scene.socketRead(mes)
|
||||
local _,text=pcall(data.decode,"string","base64",args[3])
|
||||
if not _ then text=args[3]end
|
||||
textBox:push{
|
||||
COLOR.W,args[1],
|
||||
COLOR.Z,args[1],
|
||||
COLOR.dY,"#"..args[2].." ",
|
||||
COLOR.sky,text
|
||||
COLOR.N,text
|
||||
}
|
||||
else
|
||||
LOG.print("Illegal message: "..mes,30,COLOR.green)
|
||||
LOG.print("Illegal message: "..mes,30,COLOR.G)
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
@@ -79,7 +79,7 @@ function scene.keyDown(key)
|
||||
NET.signal_quit()
|
||||
else
|
||||
lastBackTime=TIME()
|
||||
LOG.print(text.sureQuit,COLOR.orange)
|
||||
LOG.print(text.sureQuit,COLOR.O)
|
||||
end
|
||||
elseif key=="\\"then
|
||||
textBox.hide=not textBox.hide
|
||||
@@ -109,7 +109,7 @@ function scene.gamepadDown(key)
|
||||
SCN.back()
|
||||
else
|
||||
lastBackTime=TIME()
|
||||
LOG.print(text.sureQuit,COLOR.orange)
|
||||
LOG.print(text.sureQuit,COLOR.O)
|
||||
end
|
||||
else
|
||||
if noKey then return end
|
||||
@@ -147,9 +147,9 @@ function scene.socketRead(cmd,d)
|
||||
}
|
||||
elseif cmd=="Talk"then
|
||||
textBox:push{
|
||||
COLOR.W,d.username,
|
||||
COLOR.Z,d.username,
|
||||
COLOR.dY,"#"..d.uid.." ",
|
||||
COLOR.sky,d.message or"[_]",
|
||||
COLOR.N,d.message or"[_]",
|
||||
}
|
||||
elseif cmd=="Go"then
|
||||
if not playing then
|
||||
@@ -161,7 +161,7 @@ function scene.socketRead(cmd,d)
|
||||
upstreamProgress=1
|
||||
resetGameData("n",d.seed)
|
||||
else
|
||||
LOG.print("Redundant [Go]",30,COLOR.green)
|
||||
LOG.print("Redundant [Go]",30,COLOR.G)
|
||||
end
|
||||
elseif cmd=="Finish"then
|
||||
playing=false
|
||||
@@ -278,7 +278,7 @@ scene.widgetList={
|
||||
PLY_NET[1].ready or
|
||||
NET.getlock("ready")
|
||||
end},
|
||||
WIDGET.newKey{name="cancel",x=900,y=560,w=400,h=100,color="gray",font=40,code=pressKey"space",
|
||||
WIDGET.newKey{name="cancel",x=900,y=560,w=400,h=100,color="H",font=40,code=pressKey"space",
|
||||
hide=function()
|
||||
return
|
||||
playing or
|
||||
|
||||
@@ -17,7 +17,7 @@ end
|
||||
scene.widgetList={
|
||||
WIDGET.newButton{name="ffa", x=640, y=200,w=350,h=120,font=40,code=function()NET.enterRoom("ffa")end},
|
||||
WIDGET.newButton{name="rooms", x=640, y=360,w=350,h=120,font=40,code=goScene"net_rooms"},
|
||||
WIDGET.newButton{name="chat", x=640, y=540,w=350,h=120,color="black",font=40,code=NULL},
|
||||
WIDGET.newButton{name="chat", x=640, y=540,w=350,h=120,color="D",font=40,code=NULL},
|
||||
WIDGET.newButton{name="logout", x=1180, y=130,w=180,h=70,color="dR",
|
||||
code=function()
|
||||
if TIME()-lastLogoutTime<1 then
|
||||
@@ -30,7 +30,7 @@ scene.widgetList={
|
||||
SCN.back()
|
||||
end
|
||||
else
|
||||
LOG.print(text.sureQuit,COLOR.orange)
|
||||
LOG.print(text.sureQuit,COLOR.O)
|
||||
lastLogoutTime=TIME()
|
||||
end
|
||||
end},
|
||||
|
||||
@@ -5,14 +5,14 @@ local format=string.format
|
||||
local SCR,setFont,mStr=SCR,setFont,mStr
|
||||
|
||||
local fnsRankColor={
|
||||
Z=COLOR.lYellow,
|
||||
S=COLOR.lGray,
|
||||
A=COLOR.sky,
|
||||
B=COLOR.lGreen,
|
||||
C=COLOR.magenta,
|
||||
D=COLOR.dGreen,
|
||||
E=COLOR.red,
|
||||
F=COLOR.dRed,
|
||||
Z=COLOR.lY,
|
||||
S=COLOR.lG,
|
||||
A=COLOR.N,
|
||||
B=COLOR.lG,
|
||||
C=COLOR.M,
|
||||
D=COLOR.dG,
|
||||
E=COLOR.R,
|
||||
F=COLOR.dR,
|
||||
}
|
||||
|
||||
local scene={}
|
||||
@@ -38,7 +38,7 @@ function scene.sceneInit(org)
|
||||
|
||||
local frameLostRate=(S.frame/S.time/60-1)*100
|
||||
form={
|
||||
{COLOR.white,TIMESTR(S.time),COLOR[frameLostRate>10 and"red"or frameLostRate>3 and"yellow"or"gray"],format(" (%.2f%%)",frameLostRate)},
|
||||
{COLOR.Z,TIMESTR(S.time),COLOR[frameLostRate>10 and"R"or frameLostRate>3 and"Y"or"H"],format(" (%.2f%%)",frameLostRate)},
|
||||
format("%d/%d/%d",S.key,S.rotate,S.hold),
|
||||
format("%d %.2fPPS",S.piece,S.piece/S.time),
|
||||
format("%d(%d) %.2fLPM",S.row,S.dig,S.row/S.time*60),
|
||||
@@ -103,10 +103,10 @@ function scene.sceneInit(org)
|
||||
"F"
|
||||
if acc==1 then
|
||||
trophy=text.finesse_ap
|
||||
trophyColor=COLOR.yellow
|
||||
trophyColor=COLOR.Y
|
||||
elseif P.stat.maxFinesseCombo==P.stat.piece then
|
||||
trophy=text.finesse_fc
|
||||
trophyColor=COLOR.lCyan
|
||||
trophyColor=COLOR.lC
|
||||
else
|
||||
trophy=nil
|
||||
end
|
||||
@@ -309,11 +309,11 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newButton{name="setting", x=1120, y=70, w=240,h=90, color="lBlue", font=35,code=pressKey"s"},
|
||||
WIDGET.newButton{name="replay", x=535, y=250, w=200,h=100,color="lYellow",font=30,code=pressKey"p",hide=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 end},
|
||||
WIDGET.newButton{name="save", x=745, y=250, w=200,h=100,color="green", font=30,code=pressKey"o",hide=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 or GAME.saved end},
|
||||
WIDGET.newButton{name="resume", x=640, y=367, w=240,h=100,color="lGreen", font=30,code=pressKey"escape"},
|
||||
WIDGET.newButton{name="restart", x=640, y=483, w=240,h=100,color="lRed", font=35,code=pressKey"r"},
|
||||
WIDGET.newButton{name="setting", x=1120, y=70, w=240,h=90, color="lB",font=35,code=pressKey"s"},
|
||||
WIDGET.newButton{name="replay", x=535, y=250, w=200,h=100,color="lY",font=30,code=pressKey"p",hide=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 end},
|
||||
WIDGET.newButton{name="save", x=745, y=250, w=200,h=100,color="G",font=30,code=pressKey"o",hide=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 or GAME.saved end},
|
||||
WIDGET.newButton{name="resume", x=640, y=367, w=240,h=100,color="lG",font=30,code=pressKey"escape"},
|
||||
WIDGET.newButton{name="restart", x=640, y=483, w=240,h=100,color="lR",font=35,code=pressKey"r"},
|
||||
WIDGET.newButton{name="quit", x=640, y=600, w=240,h=100,font=35,code=backScene},
|
||||
}
|
||||
|
||||
|
||||
@@ -18,9 +18,9 @@ local function parseCB()
|
||||
|
||||
--Decode
|
||||
_,s=pcall(love.data.decode,"string","base64",s)
|
||||
if not _ then LOG.print(text.dataCorrupted,COLOR.red)return end
|
||||
if not _ then LOG.print(text.dataCorrupted,COLOR.R)return end
|
||||
_,s=pcall(love.data.decompress,"string","zlib",s)
|
||||
if not _ then LOG.print(text.dataCorrupted,COLOR.red)return end
|
||||
if not _ then LOG.print(text.dataCorrupted,COLOR.R)return end
|
||||
|
||||
s=loadstring(s)
|
||||
if s then
|
||||
@@ -29,12 +29,12 @@ local function parseCB()
|
||||
end
|
||||
end
|
||||
scene.widgetList={
|
||||
WIDGET.newButton{name="exportUnlock", x=190,y=150,w=280,h=100,color="lGreen",font=25,code=function()dumpCB(RANKS)end},
|
||||
WIDGET.newButton{name="exportData", x=490,y=150,w=280,h=100,color="lGreen",font=25,code=function()dumpCB(STAT)end},
|
||||
WIDGET.newButton{name="exportSetting", x=790,y=150,w=280,h=100,color="lGreen",font=25,code=function()dumpCB(SETTING)end},
|
||||
WIDGET.newButton{name="exportVK", x=1090,y=150,w=280,h=100,color="lGreen",font=25,code=function()dumpCB(VK_org)end},
|
||||
WIDGET.newButton{name="exportUnlock", x=190,y=150,w=280,h=100,color="lG",font=25,code=function()dumpCB(RANKS)end},
|
||||
WIDGET.newButton{name="exportData", x=490,y=150,w=280,h=100,color="lG",font=25,code=function()dumpCB(STAT)end},
|
||||
WIDGET.newButton{name="exportSetting", x=790,y=150,w=280,h=100,color="lG",font=25,code=function()dumpCB(SETTING)end},
|
||||
WIDGET.newButton{name="exportVK", x=1090,y=150,w=280,h=100,color="lG",font=25,code=function()dumpCB(VK_org)end},
|
||||
|
||||
WIDGET.newButton{name="importUnlock", x=190,y=300,w=280,h=100,color="lBlue",font=25,
|
||||
WIDGET.newButton{name="importUnlock", x=190,y=300,w=280,h=100,color="lB",font=25,
|
||||
code=function()
|
||||
local D=parseCB()
|
||||
if D then
|
||||
@@ -45,7 +45,7 @@ scene.widgetList={
|
||||
LOG.print(text.dataCorrupted,"warn")
|
||||
end
|
||||
end},
|
||||
WIDGET.newButton{name="importData", x=490,y=300,w=280,h=100,color="lBlue",font=25,
|
||||
WIDGET.newButton{name="importData", x=490,y=300,w=280,h=100,color="lB",font=25,
|
||||
code=function()
|
||||
local D=parseCB()
|
||||
if D and D.version==STAT.version then
|
||||
@@ -56,7 +56,7 @@ scene.widgetList={
|
||||
LOG.print(text.dataCorrupted,"warn")
|
||||
end
|
||||
end},
|
||||
WIDGET.newButton{name="importSetting", x=790,y=300,w=280,h=100,color="lBlue",font=25,
|
||||
WIDGET.newButton{name="importSetting", x=790,y=300,w=280,h=100,color="lB",font=25,
|
||||
code=function()
|
||||
local D=parseCB()
|
||||
if D then
|
||||
@@ -67,7 +67,7 @@ scene.widgetList={
|
||||
LOG.print(text.dataCorrupted,"warn")
|
||||
end
|
||||
end},
|
||||
WIDGET.newButton{name="importVK", x=1090,y=300,w=280,h=100,color="lBlue",font=25,
|
||||
WIDGET.newButton{name="importVK", x=1090,y=300,w=280,h=100,color="lB",font=25,
|
||||
code=function()
|
||||
local D=parseCB()
|
||||
if D then
|
||||
@@ -78,14 +78,14 @@ scene.widgetList={
|
||||
LOG.print(text.dataCorrupted,"warn")
|
||||
end
|
||||
end},
|
||||
WIDGET.newButton{name="reset", x=640,y=460,w=280,h=100,color="lRed",font=40,
|
||||
WIDGET.newButton{name="reset", x=640,y=460,w=280,h=100,color="lR",font=40,
|
||||
code=function()
|
||||
scene.widgetList.reset.hide=true
|
||||
scene.widgetList.resetUnlock.hide=false
|
||||
scene.widgetList.resetRecord.hide=false
|
||||
scene.widgetList.resetData.hide=false
|
||||
end},
|
||||
WIDGET.newButton{name="resetUnlock", x=340,y=460,w=280,h=100,color="red",
|
||||
WIDGET.newButton{name="resetUnlock", x=340,y=460,w=280,h=100,color="R",
|
||||
code=function()
|
||||
love.filesystem.remove("conf/unlock")
|
||||
SFX.play("finesseError_long")
|
||||
@@ -93,7 +93,7 @@ scene.widgetList={
|
||||
LOG.print("effected after restart game","message")
|
||||
LOG.print("fresh a rank to get data back","message")
|
||||
end,hide=true},
|
||||
WIDGET.newButton{name="resetRecord", x=640,y=460,w=280,h=100,color="red",
|
||||
WIDGET.newButton{name="resetRecord", x=640,y=460,w=280,h=100,color="R",
|
||||
code=function()
|
||||
for _,name in next,love.filesystem.getDirectoryItems("record")do
|
||||
love.filesystem.remove("record/"..name)
|
||||
@@ -102,7 +102,7 @@ scene.widgetList={
|
||||
TEXT.show("record data resetted",640,300,60,"stretch",.4)
|
||||
LOG.print("fresh a record list to get one list back","message")
|
||||
end,hide=true},
|
||||
WIDGET.newButton{name="resetData", x=940,y=460,w=280,h=100,color="red",
|
||||
WIDGET.newButton{name="resetData", x=940,y=460,w=280,h=100,color="R",
|
||||
code=function()
|
||||
love.filesystem.remove("conf/data")
|
||||
SFX.play("finesseError_long")
|
||||
|
||||
@@ -89,7 +89,7 @@ scene.widgetList={
|
||||
WIDGET.newSwitch{name="ihs", x=1100, y=260, disp=SETval("ihs"), code=SETrev("ihs")},
|
||||
WIDGET.newSwitch{name="irs", x=1100, y=330, disp=SETval("irs"), code=SETrev("irs")},
|
||||
WIDGET.newSwitch{name="ims", x=1100, y=400, disp=SETval("ims"), code=SETrev("ims")},
|
||||
WIDGET.newButton{name="reset", x=160, y=580,w=200,h=100,color="lRed",font=40,
|
||||
WIDGET.newButton{name="reset", x=160, y=580,w=200,h=100,color="lR",font=40,
|
||||
code=function()
|
||||
local _=SETTING
|
||||
_.das,_.arr,_.dascut=10,2,0
|
||||
|
||||
@@ -21,15 +21,15 @@ end
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=640,y=15,font=80},
|
||||
|
||||
WIDGET.newButton{name="graphic", x=200, y=80, w=240,h=80, color="lCyan", font=35,code=swapScene"setting_video","swipeR"},
|
||||
WIDGET.newButton{name="sound", x=1080, y=80, w=240,h=80, color="lCyan", font=35,code=swapScene"setting_sound","swipeL"},
|
||||
WIDGET.newButton{name="graphic", x=200, y=80, w=240,h=80, color="lC",font=35,code=swapScene"setting_video","swipeR"},
|
||||
WIDGET.newButton{name="sound", x=1080, y=80, w=240,h=80, color="lC",font=35,code=swapScene"setting_sound","swipeL"},
|
||||
|
||||
WIDGET.newButton{name="ctrl", x=290, y=220, w=320,h=80, color="lYellow",font=35,code=goScene"setting_control"},
|
||||
WIDGET.newButton{name="key", x=640, y=220, w=320,h=80, color="lGreen", font=35,code=goScene"setting_key"},
|
||||
WIDGET.newButton{name="touch", x=990, y=220, w=320,h=80, color="lBlue", font=35,code=goScene"setting_touch"},
|
||||
WIDGET.newButton{name="ctrl", x=290, y=220, w=320,h=80, color="lY",font=35,code=goScene"setting_control"},
|
||||
WIDGET.newButton{name="key", x=640, y=220, w=320,h=80, color="lG",font=35,code=goScene"setting_key"},
|
||||
WIDGET.newButton{name="touch", x=990, y=220, w=320,h=80, color="lB",font=35,code=goScene"setting_touch"},
|
||||
WIDGET.newSlider{name="reTime", x=350, y=340, w=300,unit=10,disp=SETval("reTime"),code=SETsto("reTime"),show=function(S)return(.5+S.disp()*.25).."s"end},
|
||||
WIDGET.newSelector{name="RS", x=500, y=420, w=300,color="sea",list={"TRS","SRS","C2","C2sym","Classic","None"},disp=SETval("RS"),code=SETsto("RS")},
|
||||
WIDGET.newButton{name="layout", x=550, y=540, w=200,h=70, font=35,code=goScene"setting_skin"},
|
||||
WIDGET.newSelector{name="RS", x=500, y=420, w=300,color="S",list={"TRS","SRS","C2","C2sym","Classic","None"},disp=SETval("RS"),code=SETsto("RS")},
|
||||
WIDGET.newButton{name="layout", x=550, y=540, w=200,h=70,font=35, code=goScene"setting_skin"},
|
||||
WIDGET.newSwitch{name="autoPause", x=1060, y=310, font=20,disp=SETval("autoPause"),code=SETrev("autoPause")},
|
||||
WIDGET.newSwitch{name="swap", x=1060, y=370, font=20,disp=SETval("swap"), code=SETrev("swap")},
|
||||
WIDGET.newSwitch{name="fine", x=1060, y=430, font=20,disp=SETval("fine"), code=function()SETTING.fine=not SETTING.fine if SETTING.fine then SFX.play("finesseError",.6) end end},
|
||||
|
||||
@@ -85,12 +85,12 @@ scene.widgetList={
|
||||
--WIDGET.newButton{name="spin6",x=825,y=540,w=90,h=65,code=function()nextDir(6)end},--Cannot rotate O
|
||||
WIDGET.newButton{name="spin7", x=970,y=540,w=90,h=65,code=function()nextDir(7)end},
|
||||
|
||||
WIDGET.newButton{name="skinR", x=200,y=640,w=220,h=80,color="lPurple",font=35,
|
||||
WIDGET.newButton{name="skinR", x=200,y=640,w=220,h=80,color="lV",font=35,
|
||||
code=function()
|
||||
SETTING.skin={1,7,11,3,14,4,9,1,7,2,6,10,2,13,5,9,15,10,11,3,10,2,16,8,4,10,13,2,8}
|
||||
SFX.play("rotate")
|
||||
end},
|
||||
WIDGET.newButton{name="faceR", x=480,y=640,w=220,h=80,color="lRed",font=35,
|
||||
WIDGET.newButton{name="faceR", x=480,y=640,w=220,h=80,color="lR",font=35,
|
||||
code=function()
|
||||
for i=1,29 do
|
||||
SETTING.face[i]=0
|
||||
|
||||
@@ -57,8 +57,8 @@ end
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=640,y=15,font=80},
|
||||
|
||||
WIDGET.newButton{name="game", x=200, y=80,w=240,h=80,color="lCyan",font=35,code=swapScene"setting_game","swipeR"},
|
||||
WIDGET.newButton{name="graphic",x=1080, y=80,w=240,h=80,color="lCyan",font=35,code=swapScene"setting_video","swipeL"},
|
||||
WIDGET.newButton{name="game", x=200, y=80,w=240,h=80,color="lC",font=35,code=swapScene"setting_game","swipeR"},
|
||||
WIDGET.newButton{name="graphic",x=1080, y=80,w=240,h=80,color="lC",font=35,code=swapScene"setting_video","swipeL"},
|
||||
|
||||
WIDGET.newSlider{name="sfx", x=180, y=200,w=400, font=35,change=function()SFX.play("blip_1")end, disp=SETval("sfx"),code=SETsto("sfx")},
|
||||
WIDGET.newSlider{name="spawn", x=180, y=300,w=400, font=30,change=function()SFX.fplay("spawn_"..math.random(7),SETTING.sfx_spawn)end,disp=SETval("sfx_spawn"),code=SETsto("sfx_spawn")},
|
||||
|
||||
@@ -194,7 +194,7 @@ scene.widgetList={
|
||||
defaultSetSelect=defaultSetSelect%5+1
|
||||
selected=false
|
||||
end},
|
||||
WIDGET.newSelector{name="snap", x=760,y=90,w=200,h=80,color="yellow",list={1,10,20,40,60,80},disp=function()return snapUnit end,code=function(i)snapUnit=i end},
|
||||
WIDGET.newSelector{name="snap", x=760,y=90,w=200,h=80,color="Y",list={1,10,20,40,60,80},disp=function()return snapUnit end,code=function(i)snapUnit=i end},
|
||||
WIDGET.newButton{name="option", x=520,y=190,w=200,h=80,font=40,
|
||||
code=function()
|
||||
SCN.go("setting_touchSwitch")
|
||||
|
||||
@@ -10,8 +10,8 @@ end
|
||||
scene.widgetList={
|
||||
WIDGET.newText{name="title", x=640, y=15,font=80},
|
||||
|
||||
WIDGET.newButton{name="sound", x=200, y=80,w=240,h=80,color="lCyan",font=35,code=swapScene"setting_sound","swipeR"},
|
||||
WIDGET.newButton{name="game", x=1080, y=80,w=240,h=80,color="lCyan",font=35,code=swapScene"setting_game","swipeL"},
|
||||
WIDGET.newButton{name="sound", x=200, y=80,w=240,h=80,color="lC",font=35,code=swapScene"setting_sound","swipeR"},
|
||||
WIDGET.newButton{name="game", x=1080, y=80,w=240,h=80,color="lC",font=35,code=swapScene"setting_game","swipeL"},
|
||||
|
||||
WIDGET.newSwitch{name="block", x=290, y=165, disp=SETval("block"), code=SETrev("block")},
|
||||
WIDGET.newSwitch{name="smooth", x=290, y=215, disp=SETval("smooth"), code=SETrev("smooth")},
|
||||
|
||||
@@ -24,13 +24,13 @@ function scene.gamepadDown(key)
|
||||
push("[gamepadDown] <"..key..">")
|
||||
end
|
||||
function scene.gamepadUp(key)
|
||||
push{COLOR.gray,"[gamepadUp] <"..key..">"}
|
||||
push{COLOR.H,"[gamepadUp] <"..key..">"}
|
||||
end
|
||||
function scene.keyDown(key)
|
||||
push("[keyDown] <"..key..">")
|
||||
end
|
||||
function scene.keyUp(key)
|
||||
push{COLOR.gray,"[keyUp] <"..key..">"}
|
||||
push{COLOR.H,"[keyUp] <"..key..">"}
|
||||
end
|
||||
function scene.mouseDown(x,y,k)
|
||||
push(("[mouseDown] <%d: %d, %d>"):format(k,x,y))
|
||||
@@ -40,7 +40,7 @@ function scene.mouseMove(x,y)
|
||||
end
|
||||
function scene.mouseUp(x,y,k)
|
||||
SYSFX.newRectRipple(1,x-10,y-10,21,21)
|
||||
push{COLOR.gray,"[mouseUp] <"..k..">"}
|
||||
push{COLOR.H,"[mouseUp] <"..k..">"}
|
||||
end
|
||||
function scene.touchClick(x,y)
|
||||
SYSFX.newRipple(.5,x,y,50)
|
||||
@@ -55,7 +55,7 @@ function scene.touchMove(x,y)
|
||||
end
|
||||
function scene.touchUp(x,y)
|
||||
SYSFX.newRipple(.5,x,y,50)
|
||||
push{COLOR.gray,"[touchUp]"}
|
||||
push{COLOR.H,"[touchUp]"}
|
||||
end
|
||||
function scene.wheelMoved(dx,dy)
|
||||
push(("[wheelMoved] <%d, %d>"):format(dx,dy))
|
||||
|
||||
Reference in New Issue
Block a user