自定义模式允许设置消行任务

This commit is contained in:
MrZ626
2020-09-18 23:07:39 +08:00
parent a5285a9beb
commit e2d06503ad
8 changed files with 381 additions and 31 deletions

View File

@@ -23,6 +23,7 @@ local langList={
continue="Continue.",
maxspeed="最高速度",
speedup="速度加快",
missionFailed="非任务消除",
win="胜利",
finish="完成",
@@ -30,7 +31,7 @@ local langList={
pause="暂停",
pauseCount="暂停统计",
custom="自定义游戏",basic="常规",rule="规则",field="自定义场地",
custom="自定义游戏",basic="常规",rule="规则",field="自定义场地",mission="任务",
softdropdas="软降DAS:",
softdroparr="软降ARR:",
snapLevelName={"无吸附","10px吸附","20px吸附","40px吸附","60px吸附","80px吸附"},
@@ -205,7 +206,7 @@ local langList={
bg="背景",
bgm="音乐",
draw="初始场地",
mission="任务设置",
rule="更多规则(Tab)→",
back="返回",
},
@@ -255,8 +256,26 @@ local langList={
delLine="消除行(L)",
demo="不显示×",
seq="←序列设置",
norm="基础设置(Tab)→",
mission="任务设置(Tab)→",
back="返回",
},
custom_mission={
Z1="Z1",S1="S1",J1="J1",L1="L1",T1="T1",O1="O1",I1="I1",
Z2="Z2",S2="S2",J2="J2",L2="L2",T2="T2",O2="O2",I2="I2",
Z3="Z3",S3="S3",J3="J3",L3="L3",T3="T3",O3="O3",I3="I3",
any1="any1",any2="any2",any3="any3",any4="any4",
PC="PC",O4="O4",I4="I4",
_1="1",_2="2",_3="3",_4="4",
left="",right="",
ten="+10",
backsp="<X",
reset="R",
copy="复制",
paste="粘贴",
mission="强制任务",
draw="←初始场地",
norm="基础设置(tab)→",
back="返回",
},
play={
@@ -527,6 +546,7 @@ local langList={
continue="继续。",
maxspeed="最高速度",
speedup="速度加快",
missionFailed="非任务消除",
win="胜利",
finish="完成",
@@ -534,7 +554,7 @@ local langList={
pause="暂停",
pauseCount="暂停统计",
custom="自定义游戏",basic="常规",rule="规则",field="自定义场地",
custom="自定义游戏",basic="常规",rule="规则",field="自定义场地",mission="任务",
snapLevelName={"无吸附","10像素吸附","20像素吸附","40像素吸附","60像素吸附","80像素吸附"},
setting_game="游戏设置",
setting_video="画面设置",
@@ -705,7 +725,7 @@ local langList={
bg="背景",
bgm="音乐",
draw="初始场地",
mission="任务设置",
rule="更多规则(Tab)→",
back="返回",
},
@@ -755,8 +775,26 @@ local langList={
delLine="消除行(L)",
demo="不显示×",
seq="←序列设置",
norm="基础设置(Tab)→",
mission="任务设置(Tab)→",
back="返回",
},
custom_mission={
Z1="Z1",S1="S1",J1="J1",L1="L1",T1="T1",O1="O1",I1="I1",
Z2="Z2",S2="S2",J2="J2",L2="L2",T2="T2",O2="O2",I2="I2",
Z3="Z3",S3="S3",J3="J3",L3="L3",T3="T3",O3="O3",I3="I3",
any1="any1",any2="any2",any3="any3",any4="any4",
PC="PC",O4="O4",I4="I4",
_1="1",_2="2",_3="3",_4="4",
left="",right="",
ten="+10",
backsp="<X",
reset="R",
copy="复制",
paste="粘贴",
mission="强制任务",
draw="←初始场地",
norm="基础设置(tab)→",
back="返回",
},
play={
@@ -1027,6 +1065,7 @@ local langList={
continue="Keep going!",
maxspeed="Max speed!",
speedup="Speed up!",
missionFailed="Wrong Clear",
win="You Win!",
finish="Finish",
@@ -1034,7 +1073,7 @@ local langList={
pause="Pause",
pauseCount="Pauses:",
custom="Custom Game",basic="Basic",rule="Rule",field="Custom Field",
custom="Custom Game",basic="Basic",rule="Rule",field="Custom Field",mission="Mission",
snapLevelName={"Free pos","Snap-10","Snap-20","Snap-40","Snap-60","Snap-80"},
setting_game="Game Settings",
setting_video="Video Settings",
@@ -1195,7 +1234,7 @@ local langList={
bg="Background",
bgm="Music",
draw="Field",
mission="Mission",
rule="Rules (Tab)→",
back="Back",
},
@@ -1245,8 +1284,26 @@ local langList={
delLine="Del Line(L)",
demo="Don't show ×",
seq="←Sequence",
norm="Basic (Tab)→",
mission="Mission (Tab)→",
back="Back",
},
custom_mission={
Z1="Z1",S1="S1",J1="J1",L1="L1",T1="T1",O1="O1",I1="I1",
Z2="Z2",S2="S2",J2="J2",L2="L2",T2="T2",O2="O2",I2="I2",
Z3="Z3",S3="S3",J3="J3",L3="L3",T3="T3",O3="O3",I3="I3",
any1="any1",any2="any2",any3="any3",any4="any4",
PC="PC",O4="O4",I4="I4",
_1="1",_2="2",_3="3",_4="4",
left="",right="",
ten="+10",
backsp="<X",
reset="R",
copy="Copy",
paste="Paste",
mission="Force mission",
draw="←Field",
norm="Basic (tab)→",
back="Back",
},
play={
@@ -1517,6 +1574,7 @@ local langList={
continue="~~",
maxspeed="!!!",
speedup="~!~",
missionFailed="-X_X-",
win=": )",
finish="&",
@@ -1524,7 +1582,7 @@ local langList={
pause="=",
pauseCount="=:",
custom="!@#$%^&*",basic="!!",rule="##",field="!@#$%^&* [##]",
custom="!@#$%^&*",basic="!!",rule="##",field="!@#$%^&* [##]",mission="(!)",
snapLevelName={"~","10","20","40","60","80"},
setting_game="%~~%",
setting_video="{~~}",
@@ -1683,7 +1741,7 @@ local langList={
bg="{~}",
bgm="(~)",
draw="Field",
mission="Mission",
rule="Rule (Tab)→",
back="X",
},
@@ -1733,8 +1791,26 @@ local langList={
delLine="==X==(L)",
demo="X ×",
seq="←Seq",
norm="Basic (Tab)→",
mission="Mission (Tab)→",
back="X",
},
custom_mission={
Z1="Z1",S1="S1",J1="J1",L1="L1",T1="T1",O1="O1",I1="I1",
Z2="Z2",S2="S2",J2="J2",L2="L2",T2="T2",O2="O2",I2="I2",
Z3="Z3",S3="S3",J3="J3",L3="L3",T3="T3",O3="O3",I3="I3",
any1="any1",any2="any2",any3="any3",any4="any4",
PC="PC",O4="O4",I4="I4",
_1="1",_2="2",_3="3",_4="4",
left="",right="",
ten="+10",
backsp="<X",
reset="R",
copy="Copy",
paste="Paste",
mission="Force mission",
draw="←Field",
norm="Basic (tab)→",
back="X",
},
play={
@@ -2005,6 +2081,7 @@ local langList={
continue="您继续",
maxspeed="速度封顶",
speedup="速度加快",
missionFailed="非任务消除",
win="成了",
finish="可以的",
@@ -2012,7 +2089,7 @@ local langList={
pause="歇会",
pauseCount="歇多久了",
custom="自定义",basic="普通",rule="规则",field="自定义场地",
custom="自定义",basic="普通",rule="规则",field="自定义场地",mission="任务",
softdropdas="软降DAS:",
softdroparr="软降ARR:",
snapLevelName={"无吸附","10px吸附","20px吸附","40px吸附","60px吸附","80px吸附"},
@@ -2185,7 +2262,7 @@ local langList={
bg="背景",
bgm="音乐",
draw="初始场地",
mission="任务设置",
rule="更多规则(Tab)→",
back="返回",
},
@@ -2235,8 +2312,26 @@ local langList={
delLine="消除行(L)",
demo="不显示×",
seq="←序列设置",
norm="基础设置(Tab)→",
mission="任务设置(Tab)→",
back="返回",
},
custom_mission={
Z1="Z1",S1="S1",J1="J1",L1="L1",T1="T1",O1="O1",I1="I1",
Z2="Z2",S2="S2",J2="J2",L2="L2",T2="T2",O2="O2",I2="I2",
Z3="Z3",S3="S3",J3="J3",L3="L3",T3="T3",O3="O3",I3="I3",
any1="any1",any2="any2",any3="any3",any4="any4",
PC="PC",O4="O4",I4="I4",
_1="1",_2="2",_3="3",_4="4",
left="",right="",
ten="+10",
backsp="<X",
reset="R",
copy="复制",
paste="粘贴",
mission="强制任务",
draw="←初始场地",
norm="基础设置(tab)→",
back="返回",
},
play={
@@ -2534,7 +2629,7 @@ local drawableTextLoad={
"next","hold",
"win","finish","gameover","pause",
"custom","basic","rule","field",
"custom","basic","rule","field","mission",
"setting_game","setting_video","setting_sound",
"setting_control","setting_skin",
"keyboard","joystick",

View File

@@ -185,7 +185,7 @@ local Widgets={
newSelector({name="bg", x=1140, y=460, w=220,color="yellow", list=CUSlist.bg, disp=CUSval("bg"), code=function(i)customEnv.bg=i BG.set(i)end}),
newSelector({name="bgm", x=1140, y=540, w=220,color="yellow", list=CUSlist.bgm, disp=CUSval("bgm"), code=function(i)customEnv.bgm=i BGM.play(i)end}),
newButton({name="draw", x=900, y=60, w=220,h=80, color="lBlue", font=30,code=swapScene("custom_draw","swipeR")}),
newButton({name="mission", x=900, y=60, w=220,h=80, color="lBlue", font=30,code=swapScene("custom_mission","swipeR")}),
newButton({name="rule", x=1140, y=60, w=220,h=80, color="lBlue", font=30,code=swapScene("custom_rule","swipeL")}),
newButton({name="back", x=1140, y=640, w=170,h=80, color="white", font=40,code=BACK}),
},
@@ -278,10 +278,60 @@ local Widgets={
newButton({name="delLine", x=1200, y=520, w=120, color="lYellow",font=20,code=pressKey("l")}),
newSwitch({name="demo", x=755, y=640, font=30,disp=function()return sceneTemp.demo end,code=function()sceneTemp.demo=not sceneTemp.demo end}),
newButton({name="seq", x=900, y=60, w=220,h=80, color="lBlue", font=30,code=swapScene("custom_seq","swipeR")}),
newButton({name="norm", x=1140, y=60, w=220,h=80, color="lBlue", font=30,code=swapScene("custom_norm","swipeL")}),
newButton({name="mission", x=1140, y=60, w=220,h=80, color="lBlue", font=30,code=swapScene("custom_mission","swipeL")}),
newButton({name="back", x=1140, y=640, w=170,h=80, color="white", font=40,code=BACK}),
},
custom_mission={
newKey({name="Z1", x=100, y=340, w=90, color="white", font=50,code=pressKey(11)}),
newKey({name="S1", x=200, y=340, w=90, color="white", font=50,code=pressKey(12)}),
newKey({name="J1", x=300, y=340, w=90, color="white", font=50,code=pressKey(13)}),
newKey({name="L1", x=400, y=340, w=90, color="white", font=50,code=pressKey(14)}),
newKey({name="T1", x=500, y=340, w=90, color="white", font=50,code=pressKey(15)}),
newKey({name="O1", x=600, y=340, w=90, color="white", font=50,code=pressKey(16)}),
newKey({name="I1", x=700, y=340, w=90, color="white", font=50,code=pressKey(17)}),
newKey({name="Z2", x=100, y=440, w=90, color="white", font=50,code=pressKey(21)}),
newKey({name="S2", x=200, y=440, w=90, color="white", font=50,code=pressKey(22)}),
newKey({name="J2", x=300, y=440, w=90, color="white", font=50,code=pressKey(23)}),
newKey({name="L2", x=400, y=440, w=90, color="white", font=50,code=pressKey(24)}),
newKey({name="T2", x=500, y=440, w=90, color="white", font=50,code=pressKey(25)}),
newKey({name="O2", x=600, y=440, w=90, color="white", font=50,code=pressKey(26)}),
newKey({name="I2", x=700, y=440, w=90, color="white", font=50,code=pressKey(27)}),
newKey({name="Z3", x=100, y=540, w=90, color="white", font=50,code=pressKey(31)}),
newKey({name="S3", x=200, y=540, w=90, color="white", font=50,code=pressKey(32)}),
newKey({name="J3", x=300, y=540, w=90, color="white", font=50,code=pressKey(33)}),
newKey({name="L3", x=400, y=540, w=90, color="white", font=50,code=pressKey(34)}),
newKey({name="T3", x=500, y=540, w=90, color="white", font=50,code=pressKey(35)}),
newKey({name="O3", x=600, y=540, w=90, color="white", font=50,code=pressKey(36)}),
newKey({name="I3", x=700, y=540, w=90, color="white", font=50,code=pressKey(37)}),
newKey({name="any1", x=100, y=640, w=90, color="white", font=30,code=pressKey(91)}),
newKey({name="any2", x=200, y=640, w=90, color="white", font=30,code=pressKey(92)}),
newKey({name="any3", x=300, y=640, w=90, color="white", font=30,code=pressKey(93)}),
newKey({name="any4", x=400, y=640, w=90, color="white", font=30,code=pressKey(94)}),
newKey({name="PC", x=500, y=640, w=90, color="white", font=50,code=pressKey(99)}),
newKey({name="O4", x=600, y=640, w=90, color="white", font=50,code=pressKey(46)}),
newKey({name="I4", x=700, y=640, w=90, color="white", font=50,code=pressKey(47)}),
newKey({name="_1", x=800, y=540, w=90, color="white", font=50,code=pressKey(1)}),
newKey({name="_2", x=900, y=540, w=90, color="white", font=50,code=pressKey(2)}),
newKey({name="_3", x=800, y=640, w=90, color="white", font=50,code=pressKey(3)}),
newKey({name="_4", x=900, y=640, w=90, color="white", font=50,code=pressKey(4)}),
newKey({name="left", x=800, y=440, w=90, color="lGreen", font=55,code=pressKey("left")}),
newKey({name="right", x=900, y=440, w=90, color="lGreen", font=55,code=pressKey("right")}),
newKey({name="ten", x=1000, y=440, w=90, color="lGreen", font=40,code=pressKey("ten")}),
newKey({name="backsp", x=1000, y=540, w=90, color="lYellow",font=50,code=pressKey("backspace")}),
newKey({name="reset", x=1000, y=640, w=90, color="lYellow",font=50,code=pressKey("delete")}),
newButton({name="copy", x=1140, y=440, w=170,h=80, color="lRed", font=40,code=pressKey("cC"),hide=function()return #preMission==0 end}),
newButton({name="paste", x=1140, y=540, w=170,h=80, color="lBlue", font=40,code=pressKey("cV")}),
newSwitch({name="mission", x=1150, y=350, font=30, disp=CUSval("missionKill"), code=CUSrev("missionKill")}),
newButton({name="draw", x=900, y=60, w=220,h=80, color="lBlue", font=30,code=swapScene("custom_draw","swipeR")}),
newButton({name="norm", x=1140, y=60, w=220,h=80, color="lBlue", font=30,code=swapScene("custom_norm","swipeL")}),
newButton({name="back", x=1140, y=640, w=170,h=80, color="white", font=40,code=BACK}),
},
play={
newButton({name="pause", x=1235, y=45, w=80, color="white", font=25,code=function()pauseGame()end}),
},

View File

@@ -71,6 +71,7 @@ customEnv={
ospin=true,
noTele=false,
fineKill=false,
missionKill=false,
easyFresh=true,
visible="show",
target=200,
@@ -83,8 +84,9 @@ customEnv={
bg="none",
bgm="race"
}
preField={h=20}for i=1,20 do preField[i]={0,0,0,0,0,0,0,0,0,0}end
preBag={}
preField={h=20}for i=1,20 do preField[i]={0,0,0,0,0,0,0,0,0,0}end--Field for custom game
preBag={}--Sequence for custom game
preMission={}--Clearing target for custom game
game={
frame=0, --Frame count

View File

@@ -14,6 +14,11 @@ return{
else
modeEnv.bag=nil
end
if preMission[1]then
modeEnv.mission=preMission
else
modeEnv.mission=nil
end
PLY.newPlayer(1,340,15)
local L=modeEnv.opponent
if L~=0 then

View File

@@ -32,6 +32,11 @@ return{
else
modeEnv.bag=nil
end
if preMission[1]then
modeEnv.mission=preMission
else
modeEnv.mission=nil
end
PLY.newPlayer(1,340,15)
local L=modeEnv.opponent
if L~=0 then

View File

@@ -195,7 +195,7 @@ drawableText={
win=T(120),finish=T(120),
gameover=T(100),pause=T(120),
custom=T(80),basic=T(35),rule=T(35),field=T(35),
custom=T(80),basic=T(35),rule=T(35),field=T(35),mission=T(35),
setting_game=T(80),setting_video=T(80),setting_sound=T(80),
setting_control=T(70),setting_skin=T(70),
preview=T(40),

View File

@@ -34,6 +34,7 @@ local gameEnv0={
hold=true,oncehold=true,
ospin=true,
sequence="bag",bag={1,2,3,4,5,6,7},
mission=NULL,
face=NULL,skin=NULL,
life=0,
@@ -45,6 +46,7 @@ local gameEnv0={
Fkey=NULL,
fine=false,fineKill=false,
missionKill=false,
target=1e99,dropPiece=NULL,
mindas=0,minarr=0,minsdarr=0,
@@ -1205,6 +1207,10 @@ local function applyGameEnv(P)--Finish gameEnv processing
end
end
if type(ENV.mission)=="table"then
P.missionProgress=0
end
ENV.das=max(ENV.das,ENV.mindas)
ENV.arr=max(ENV.arr,ENV.minarr)
ENV.sdarr=max(ENV.sdarr,ENV.minsdarr)
@@ -2214,7 +2220,7 @@ do--player.drop(P)--Place piece
end
end
if cc>0 then
if cc>0 then--If lines cleared, about 200 lines below
local C=P.lastClear
C.id,C.name=CB.id,CB.name
C.row=cc
@@ -2297,6 +2303,7 @@ do--player.drop(P)--Place piece
VOC.play(clearName[cc],CHN)
end
--PC/HPC bonus
if clear then
if #P.field==0 then
P:showText(text.PC,0,-80,50,"flicker")
@@ -2332,6 +2339,7 @@ do--player.drop(P)--Place piece
C.pc=false
end
--Normal clear, reduce B2B point
if not C.special then
P.b2b=max(P.b2b-250,0)
P:showText(text.clear[cc],0,-30,27+cc*3,"appear",(8-cc)*.3)
@@ -2361,6 +2369,7 @@ do--player.drop(P)--Place piece
end
end
--Send Lines
send=atk
if send>0 then
if exblock>0 then
@@ -2402,13 +2411,47 @@ do--player.drop(P)--Place piece
end
end
--Check clearing task
if P.missionProgress then
local t=P.gameEnv.mission[P.missionProgress+1]
local success
if t<10 then
if C.row==t then
success=true
end
elseif t<90 then
if C.row==int(t/10)and C.name==t%10 then
success=true
end
elseif t<99 then
if C.row==int(t/10)then
success=true
end
elseif t==99 then
if C.pc then
success=true
end
end
if success then
P.missionProgress=P.missionProgress+1
if P.missionProgress==#P.gameEnv.mission then
P:win()
end
elseif P.gameEnv.missionKill then
P:showText(text.missionFailed,0,200,40,"flicker",.5)
SFX.play("finesseError_long",.6)
P:lose()
end
end
--SFX & Vibrate
if P.human then
SFX.play(clear_n[cc])
SFX.play(ren_n[min(cmb,11)])
if cmb>14 then SFX.play("ren_mega",(cmb-10)*.1)end
VIB(cc+1)
end
else
else--No lines clear
cmb=0
local dropScore=10

View File

@@ -1229,7 +1229,7 @@ do--custom_norm
function keyDown.custom_norm(key)
if key=="tab"then
if kb.isDown("lshift","rshift")then
SCN.swapTo("custom_draw","swipeR")
SCN.swapTo("custom_mission","swipeR")
else
SCN.swapTo("custom_rule","swipeL")
end
@@ -1477,7 +1477,7 @@ do--custom_draw
if kb.isDown("lshift","rshift")then
SCN.swapTo("custom_seq","swipeR")
else
SCN.swapTo("custom_norm","swipeL")
SCN.swapTo("custom_mission","swipeL")
end
elseif key=="escape"then
SCN.back()
@@ -1583,6 +1583,156 @@ do--custom_draw
end
end
end
do--custom_mission
function sceneInit.custom_mission()
sceneTemp={
input="",
cur=#preMission,
sure=0,
}
end
local clear={
Z1=11,Z2=21,Z3=31,
S1=12,S2=22,S3=32,
J1=13,J2=23,J3=33,
L1=14,L2=24,L3=34,
T1=15,T2=25,T3=35,
O1=16,O2=26,O3=36,O4=46,
I1=17,I2=27,I3=37,I4=47,
A1=91,A2=92,A3=93,A4=94,
_1=01,_2=02,_3=03,_4=04,
PC=99,
[11]="Z1",[21]="Z2",[31]="Z3",
[12]="S1",[22]="S2",[32]="S3",
[13]="J1",[23]="J2",[33]="J3",
[14]="L1",[24]="L2",[34]="L3",
[15]="T1",[25]="T2",[35]="T3",
[16]="O1",[26]="O2",[36]="O3",[46]="O4",
[17]="I1",[27]="I2",[37]="I3",[47]="I4",
[91]="A1",[92]="A2",[93]="A3",[94]="A4",
[01]="_1",[02]="_2",[03]="_3",[04]="_4",
[99]="PC",
}
local legalInput={Z=true,S=true,J=true,L=true,T=true,O=true,I=true,A=true,_=true,P=true}
function keyDown.custom_mission(key)
local S=sceneTemp
if key=="left"then
S.cur=S.cur-1
if S.cur==-1 then
S.cur=#preMission
end
elseif key=="right"then
S.cur=S.cur+1
if S.cur>#preMission then
S.cur=0
end
elseif key=="ten"then
S.cur=min(S.cur+10,#preMission)
elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then
if #preMission>0 then
sys.setClipboardText("Techmino Target:"..copyTarget())
LOG.print(text.copySuccess,color.green)
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=string.sub(str,p+1)end
if not pasteTarget(str)then
LOG.print(text.dataCorrupted,color.red)
end
elseif key=="backspace"then
if S.cur>0 then
rem(preMission,S.cur)
S.cur=S.cur-1
end
elseif key=="delete"then
if S.sure>20 then
preMission={}
S.cur=0
S.sure=0
SFX.play("finesseError",.7)
else
S.sure=50
end
elseif key=="tab"then
if kb.isDown("lshift","rshift")then
SCN.swapTo("custom_draw","swipeR")
else
SCN.swapTo("custom_norm","swipeL")
end
elseif key=="escape"then
SCN.back()
elseif type(key)=="number"then
S.cur=S.cur+1
ins(preMission,S.cur,key)
else
if key=="space"then
key="_"
else
key=string.upper(key)
end
local input=S.input
input=input..key
if clear[input]then
input=""
ins(preMission,clear[input])
elseif #input>1 or not legalInput[input]then
input=""
end
S.input=input
end
end
function Tmr.custom_mission()
if sceneTemp.sure>0 then sceneTemp.sure=sceneTemp.sure-1 end
end
function Pnt.custom_mission()
local S=sceneTemp
gc.setColor(1,1,1)
gc.draw(drawableText.custom,20,5)
gc.setColor(.7,.7,.7)
gc.draw(drawableText.mission,585,50)
--Draw frame
gc.setLineWidth(4)
gc.setColor(1,1,1)
gc.rectangle("line",60,110,1160,170)
--Draw inputing target
setFont(30)
gc.setColor(.1,.9,.1)
gc.print(S.input,1200,270)
--Draw targets
gc.setColor(1,1,1)
setFont(35)
local x,y=100,136--Next block pos
local cx,cy=100,136--Cursor-center pos
for i=1,#preMission do
gc.print(clear[preMission[i]],x,y-25)
x=x+55
if x>1160 then
x,y=100,y+50
end
if i==S.cur then
cx,cy=x,y
end
end
--Draw cursor
gc.setColor(1,1,.4,.6+.4*sin(Timer()*6.26))
gc.line(cx-5,cy-20,cx-5,cy+20)
--Confirm reset
if S.sure>0 then
gc.setColor(1,1,1,S.sure*.02)
gc.draw(drawableText.question,980,570)
end
end
end
do--play
local function onVirtualkey(x,y)
local dist,nearest=1e10