新自定义游戏ui初步,舍弃部分drawableText改为大规模使用text控件,大规模控件排版修改

This commit is contained in:
MrZ626
2020-10-17 02:45:12 +08:00
parent 7810ad7aa6
commit 1d78abf185
5 changed files with 856 additions and 756 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -12,12 +12,18 @@ local text={
}
function text:reset()
if type(self.text)=="string"then
self.text=gc.newText(getFont(self.font or 30),self.text)
self.text=gc.newText(getFont(self.font),self.text)
end
end
function text:draw()
gc.setColor(self.color)
if self.align=="M" then
gc.draw(self.text,self.x-self.text:getWidth()*.5,self.y)
elseif self.align=="L" then
gc.draw(self.text,self.x,self.y)
elseif self.align=="R" then
gc.draw(self.text,self.x-self.text:getWidth(),self.y)
end
end
local image={
@@ -479,6 +485,8 @@ function WIDGET.newText(D)
x= D.x,
y= D.y,
color= D.color and(color[D.color]or D.color)or color.white,
font= D.font or 30,
align= D.align or"M",
hide= D.hide,
}
for k,v in next,text do _[k]=v end
@@ -847,7 +855,12 @@ function WIDGET.keyPressed(i)
end
end
else
WIDGET.sel=WIDGET.active[1]
for k,v in next,WIDGET.active do
if v.isAbove then
WIDGET.sel=v
break
end
end
end
end
end

View File

@@ -86,23 +86,33 @@ local CUSlist={
opponent={0,1,2,3,4,5,6,7,8,9,10},
life={0,1,2,3,5,10,15,26,42,87,500},
pushSpeed={1,2,3,5,15},
bg={"none","bg1","bg2","rainbow","rainbow2","glow","rgb","aura","wing","matrix","space"},
bg={"none","grey","glow","rgb","flink","wing","fan","aura","bg1","bg2","rainbow","rainbow2","lightning","lightning2","matrix","space"},
bgm=BGM.list,
}
--Lambda Funcs for widgets,delete at file end
local function CUSval(k) return function() return customEnv[k] end end
local function CUSrev(k) return function() customEnv[k]=not customEnv[k] end end
local function CUSsto(k) return function(i) customEnv[k]=i end end
local function SETval(k) return function() return setting[k] end end
local function SETrev(k) return function() setting[k]=not setting[k] end end
local function SETsto(k) return function(i) setting[k]=i end end
local function pressKey(k) return function() love.keypressed(k) end end
local function setPen(i) return function() sceneTemp.pen=i end end
local function STPval(k) return function() return sceneTemp[k] end end
local function STPrev(k) return function() sceneTemp[k]=not sceneTemp[k] end end
local function STPeq(k,v) return function() return sceneTemp[k]==v end end
local function STPsto(k) return function(i) sceneTemp[k]=i end end
local function prevSkin(n) return function() SKIN.prev(n) end end
local function nextSkin(n) return function() SKIN.next(n) end end
local function nextDir(n) return function() SKIN.rotate(n) end end
local function VKAdisp(n) return function() return VK_org[n].ava end end
local function VKAcode(n) return function() VK_org[n].ava=not VK_org[n].ava end end
local function pressKey(k) return function() love.keypressed(k) end end
local function setPen(i) return function() sceneTemp.pen=i end end
local function setLang(n) return function() LANG.set(n)setting.lang=n end end
local function goScene(t,s) return function() SCN.go(t,s) end end
local function swapScene(t,s)return function() SCN.swapTo(t,s) end end
@@ -121,16 +131,16 @@ local newKeyboard= WIDGET.newKeyboard
local Widgets={
load={},intro={},quit={},
calculator={
newKey({name="_1", x=150,y=300,w=90, color="white", font=50,code=pressKey("1")}),
newKey({name="_2", x=250,y=300,w=90, color="white", font=50,code=pressKey("2")}),
newKey({name="_3", x=350,y=300,w=90, color="white", font=50,code=pressKey("3")}),
newKey({name="_4", x=150,y=400,w=90, color="white", font=50,code=pressKey("4")}),
newKey({name="_5", x=250,y=400,w=90, color="white", font=50,code=pressKey("5")}),
newKey({name="_6", x=350,y=400,w=90, color="white", font=50,code=pressKey("6")}),
newKey({name="_7", x=150,y=500,w=90, color="white", font=50,code=pressKey("7")}),
newKey({name="_8", x=250,y=500,w=90, color="white", font=50,code=pressKey("8")}),
newKey({name="_9", x=350,y=500,w=90, color="white", font=50,code=pressKey("9")}),
newKey({name="_0", x=150,y=600,w=90, color="white", font=50,code=pressKey("0")}),
newKey({name="_1", x=150,y=300,w=90, font=50,code=pressKey("1")}),
newKey({name="_2", x=250,y=300,w=90, font=50,code=pressKey("2")}),
newKey({name="_3", x=350,y=300,w=90, font=50,code=pressKey("3")}),
newKey({name="_4", x=150,y=400,w=90, font=50,code=pressKey("4")}),
newKey({name="_5", x=250,y=400,w=90, font=50,code=pressKey("5")}),
newKey({name="_6", x=350,y=400,w=90, font=50,code=pressKey("6")}),
newKey({name="_7", x=150,y=500,w=90, font=50,code=pressKey("7")}),
newKey({name="_8", x=250,y=500,w=90, font=50,code=pressKey("8")}),
newKey({name="_9", x=350,y=500,w=90, font=50,code=pressKey("9")}),
newKey({name="_0", x=150,y=600,w=90, font=50,code=pressKey("0")}),
newKey({name=".", x=250,y=600,w=90, color="lPurple",font=50,code=pressKey(".")}),
newKey({name="e", x=350,y=600,w=90, color="lPurple",font=50,code=pressKey("e")}),
newKey({name="+", x=450,y=300,w=90, color="lBlue", font=50,code=pressKey("+")}),
@@ -144,88 +154,142 @@ local Widgets={
main={
newButton({name="play", x=150,y=270,w=200,h=160,color="lRed", font=55,code=goScene("mode")}),
newButton({name="setting", x=370,y=270,w=200,h=160,color="lBlue", font=45,code=goScene("setting_game")}),
newButton({name="custom", x=590,y=270,w=200,h=160,color="lOrange",font=45,code=goScene("custom_basic"),hide=function()return not modeRanks.marathon_normal end}),
newButton({name="custom", x=590,y=270,w=200,h=160,color="lOrange",font=45,code=goScene("customGame"),hide=function()return not modeRanks.marathon_normal end}),
newButton({name="help", x=150,y=450,w=200,h=160,color="lYellow",font=50,code=goScene("help")}),
newButton({name="stat", x=370,y=450,w=200,h=160,color="lCyan", font=40,code=goScene("stat")}),
newButton({name="qplay", x=590,y=450,w=200,h=160,color="lGreen", font=45,code=function()SCN.push()loadGame(stat.lastPlay,true)end}),
newButton({name="lang", x=150,y=590,w=200,h=80,color="lGreen", font=45,code=goScene("setting_lang")}),
newButton({name="music", x=370,y=590,w=200,h=80,color="lPurple", font=30,code=goScene("music")}),
newButton({name="quit", x=590,y=590,w=200,h=80,color="lGrey", font=45,code=function()VOC.play("bye")SCN.swapTo("quit","slowFade")end}),
newKey({name="minigame", x=370,y=670,w=200,h=60,color="dGrey", font=30,code=goScene("minigame")}),
newKey({name="account", x=150,y=670,w=200,h=60,color="dRed", code=goScene("account")}),
newKey({name="minigame", x=370,y=670,w=200,h=60,color="grey", code=goScene("minigame")}),
},
mode={
newButton({name="start", x=1040,y=655,w=180,h=80,color="white", font=40,code=pressKey("return"),hide=function()return not mapCam.sel end}),
newButton({name="back", x=1200,y=655,w=120,h=80,color="white", font=40,code=BACK}),
newButton({name="start", x=1040, y=655,w=180,h=80, font=40,code=pressKey("return"),hide=function()return not mapCam.sel end}),
newButton({name="back", x=1200, y=655,w=120,h=80, font=40,code=BACK}),
},
music={
newSlider({name="bgm", x=760, y=80, w=400, font=35,disp=SETval("bgm"),code=function(v)setting.bgm=v BGM.freshVolume()end}),
newButton({name="up", x=200, y=250, w=120, color="white", font=55,code=pressKey("up"),hide=function()return sceneTemp==1 end}),
newButton({name="play", x=200, y=390, w=120, color="white", font=35,code=pressKey("space"),hide=function()return setting.bgm==0 end}),
newButton({name="down", x=200, y=530, w=120, color="white", font=55,code=pressKey("down"),hide=function()return sceneTemp==BGM.len end}),
newButton({name="back", x=1140, y=640, w=170,h=80, color="white", font=40,code=BACK}),
newText({name="title", x=30, y=30,font=80,align="L"}),
newText({name="arrow", x=270, y=360,font=45,align="L"}),
newText({name="now", x=700, y=500,font=50,align="R",hide=function()return not BGM.nowPlay end}),
newSlider({name="bgm", x=760, y=80,w=400, font=35,disp=SETval("bgm"),code=function(v)setting.bgm=v BGM.freshVolume()end}),
newButton({name="up", x=200, y=250,w=120, font=55,code=pressKey("up"),hide=function()return sceneTemp==1 end}),
newButton({name="play", x=200, y=390,w=120, font=35,code=pressKey("space"),hide=function()return setting.bgm==0 end}),
newButton({name="down", x=200, y=530,w=120, font=55,code=pressKey("down"),hide=function()return sceneTemp==BGM.len end}),
newButton({name="back", x=1140, y=640,w=170,h=80, font=40,code=BACK}),
},
custom_basic={
customGame={
newText({name="title", x=600,y=5,font=80,align="R"}),
newText({name="subTitle", x=610,y=50,font=35,align="L",color="grey"}),
--Basic
newSelector({name="drop", x=250, y=150,w=260,color="orange", list=CUSlist.drop, disp=CUSval("drop"), code=CUSsto("drop")}),
newSelector({name="lock", x=250, y=230,w=260,color="red", list=CUSlist.lock, disp=CUSval("lock"), code=CUSsto("lock")}),
newSelector({name="wait", x=250, y=310,w=260,color="green", list=CUSlist.wait, disp=CUSval("wait"), code=CUSsto("wait")}),
newSelector({name="fall", x=250, y=390,w=260,color="yellow", list=CUSlist.fall, disp=CUSval("fall"), code=CUSsto("fall")}),
newSlider({name="next", x=170, y=470,w=200,unit=6, disp=CUSval("next"), code=CUSsto("next")}),
newSwitch({name="hold", x=300, y=540, disp=CUSval("hold"), code=CUSrev("hold")}),
newSwitch({name="oncehold", x=300, y=620, disp=CUSval("oncehold"),code=CUSrev("oncehold"),hide=function()return not customEnv.hold end}),
--Visual
newSwitch({name="block", x=700, y=160, font=25, disp=CUSval("block"), code=CUSrev("block")}),
newSlider({name="ghost", x=570, y=230,w=200,unit=.6, font=25, disp=CUSval("ghost"), code=CUSsto("ghost")}),
newSlider({name="center", x=570, y=290,w=200,unit=1, font=25, disp=CUSval("center"), code=CUSsto("center")}),
newSwitch({name="bagLine", x=1190, y=160, disp=CUSval("bagLine"), code=CUSrev("bagLine")}),
newSwitch({name="highCam", x=1190, y=230, disp=CUSval("highCam"), code=CUSrev("highCam")}),
newSwitch({name="nextPos", x=1190, y=300, disp=CUSval("nextPos"), code=CUSrev("nextPos")}),
newSwitch({name="bone", x=1190, y=370, disp=CUSval("bone"), code=CUSrev("bone")}),
newSelector({name="drop", x=160, y=150,w=220,color="orange", list=CUSlist.drop, disp=CUSval("drop"),code=CUSsto("drop")}),
newSelector({name="lock", x=160, y=230,w=220,color="red", list=CUSlist.lock, disp=CUSval("lock"),code=CUSsto("lock")}),
newSelector({name="wait", x=400, y=150,w=220,color="green", list=CUSlist.wait, disp=CUSval("wait"),code=CUSsto("wait")}),
newSelector({name="fall", x=400, y=230,w=220,color="yellow", list=CUSlist.fall, disp=CUSval("fall"),code=CUSsto("fall")}),
--Else
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}),
newSelector({name="bg", x=1070, y=150,w=250,color="yellow", list=CUSlist.bg, disp=CUSval("bg"), code=function(i)customEnv.bg=i BG.set(i)end}),
newSelector({name="bgm", x=1070, y=230,w=250,color="yellow", list=CUSlist.bgm, disp=CUSval("bgm"), code=function(i)customEnv.bgm=i BGM.play(i)end}),
--Copy/Paste/Start
newButton({name="copy", x=560, y=530, w=300,h=100, color="lRed", font=25,code=pressKey("cC")}),
newButton({name="paste", x=870, y=530, w=300,h=100, color="lBlue", font=25,code=pressKey("cV")}),
newButton({name="clear", x=560, y=640, w=300,h=100, color="lYellow", font=40,code=pressKey("return")}),
newButton({name="puzzle", x=870, y=640, w=300,h=100, color="lMagenta", font=40,code=pressKey("return2")}),
newButton({name="copy", x=1070, y=310,w=310,h=70,color="lRed", font=25,code=pressKey("cC")}),
newButton({name="paste", x=1070, y=390,w=310,h=70,color="lBlue", font=25,code=pressKey("cV")}),
newButton({name="clear", x=1070, y=470,w=310,h=70,color="lYellow",font=35,code=pressKey("return")}),
newButton({name="puzzle", x=1070, y=550,w=310,h=70,color="lMagenta",font=35,code=pressKey("return2")}),
newButton({name="mission", x=900, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_mission","swipeR")}),
newButton({name="rule", x=1140, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_rule","swipeL")}),
newButton({name="back", x=1140, y=640, w=170,h=80, color="white", font=40,code=BACK}),
--More
newKey({name="advance", x=730, y=190,w=220,h=90,color="red",font=35,code=goScene("custom_advance")}),
newKey({name="field", x=170, y=640,w=240,h=80,color="water", font=25,code=goScene("custom_field")}),
newKey({name="sequence", x=450, y=640,w=240,h=80,color="pink", font=25,code=goScene("custom_sequence")}),
newKey({name="mission", x=730, y=640,w=240,h=80,color="sky", font=25,code=goScene("custom_mission")}),
newButton({name="back", x=1140, y=640, w=170,h=80,font=40,code=BACK}),
},
custom_rule={
--Rule
custom_advance={
newText({name="title", x=600,y=5,font=80,align="R"}),
newText({name="subTitle", x=610,y=50,font=35,align="L",color="grey"}),
--Visual
newSwitch({name="block", x=620, y=430, font=25, disp=CUSval("block"), code=CUSrev("block")}),
newSlider({name="ghost", x=490, y=500,w=200,unit=.6,font=25, disp=CUSval("ghost"), code=CUSsto("ghost")}),
newSlider({name="center", x=490, y=560,w=200,unit=1, font=25, disp=CUSval("center"), code=CUSsto("center")}),
newSwitch({name="bagLine", x=1190, y=340, disp=CUSval("bagLine"), code=CUSrev("bagLine")}),
newSwitch({name="highCam", x=1190, y=410, disp=CUSval("highCam"), code=CUSrev("highCam")}),
newSwitch({name="nextPos", x=1190, y=480, disp=CUSval("nextPos"), code=CUSrev("nextPos")}),
newSwitch({name="bone", x=1190, y=550, disp=CUSval("bone"), code=CUSrev("bone")}),
--Control
newSlider({name="next", x=130, y=410,w=200,unit=6, disp=CUSval("next"), code=CUSsto("next")}),
newSwitch({name="hold", x=260, y=480, disp=CUSval("hold"), code=CUSrev("hold")}),
newSwitch({name="oncehold", x=260, y=560, disp=CUSval("oncehold"),code=CUSrev("oncehold"),hide=function()return not customEnv.hold end}),
newSlider({name="mindas", x=180, y=150,w=400,unit=15,font=25, disp=CUSval("mindas"), code=CUSsto("mindas")}),
newSlider({name="minarr", x=180, y=220,w=400,unit=10,font=25, disp=CUSval("minarr"), code=CUSsto("minarr")}),
newSlider({name="minsdarr", x=180, y=290,w=200,unit=4, font=20, disp=CUSval("minsdarr"),code=CUSsto("minsdarr")}),
newSwitch({name="ospin", x=260, y=380, font=30, disp=CUSval("ospin"), code=CUSrev("ospin")}),
newSwitch({name="noTele", x=260, y=460, font=25, disp=CUSval("noTele"), code=CUSrev("noTele")}),
newSwitch({name="fineKill", x=260, y=530, font=20, disp=CUSval("fineKill"),code=CUSrev("fineKill")}),
newSwitch({name="easyFresh", x=260, y=600, font=20, disp=CUSval("easyFresh"),code=CUSrev("easyFresh")}),
newSelector({name="visible", x=800, y=160,w=260,color="lBlue", list=CUSlist.visible, disp=CUSval("visible"), code=CUSsto("visible")}),
newSelector({name="target", x=800, y=260,w=260,color="green", list=CUSlist.target, disp=CUSval("target"), code=CUSsto("target")}),
newSelector({name="freshLimit", x=800, y=360,w=260,color="purple", list=CUSlist.freshLimit,disp=CUSval("freshLimit"),code=CUSsto("freshLimit")}),
newSelector({name="opponent", x=1100, y=160,w=260,color="red", list=CUSlist.opponent, disp=CUSval("opponent"),code=CUSsto("opponent")}),
newSelector({name="life", x=1100, y=260,w=260,color="red", list=CUSlist.life, disp=CUSval("life"), code=CUSsto("life")}),
newSelector({name="pushSpeed", x=1100, y=360,w=260,color="red", list=CUSlist.pushSpeed, disp=CUSval("pushSpeed"),code=CUSsto("pushSpeed")}),
newButton({name="basic", x=900, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_basic","swipeR")}),
newButton({name="sequence", x=1140, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_seq","swipeL")}),
newButton({name="back", x=1140, y=640, w=170,h=80, color="white", font=40,code=BACK}),
--Rule
newSwitch({name="ospin", x=910, y=340, font=30, disp=CUSval("ospin"), code=CUSrev("ospin")}),
newSwitch({name="noTele", x=910, y=420, font=25, disp=CUSval("noTele"), code=CUSrev("noTele")}),
newSwitch({name="fineKill", x=910, y=490, font=20, disp=CUSval("fineKill"),code=CUSrev("fineKill")}),
newSwitch({name="easyFresh",x=910, y=560, font=20, disp=CUSval("easyFresh"),code=CUSrev("easyFresh")}),
newSelector({name="visible", x=840, y=60,w=260,color="lBlue", list=CUSlist.visible, disp=CUSval("visible"), code=CUSsto("visible")}),
newSelector({name="target", x=840, y=160,w=260,color="green", list=CUSlist.target, disp=CUSval("target"), code=CUSsto("target")}),
newSelector({name="freshLimit", x=840, y=260,w=260,color="purple", list=CUSlist.freshLimit,disp=CUSval("freshLimit"),code=CUSsto("freshLimit")}),
newSelector({name="opponent", x=1120, y=60,w=260,color="red", list=CUSlist.opponent, disp=CUSval("opponent"),code=CUSsto("opponent")}),
newSelector({name="life", x=1120, y=160,w=260,color="red", list=CUSlist.life, disp=CUSval("life"), code=CUSsto("life")}),
newSelector({name="pushSpeed", x=1120, y=260,w=260,color="red", list=CUSlist.pushSpeed, disp=CUSval("pushSpeed"),code=CUSsto("pushSpeed")}),
newButton({name="back", x=1140, y=640, w=170,h=80, font=40,code=BACK}),
},
custom_seq={
newKey({name="Z", x=100, y=440, w=90, color="white", font=50,code=pressKey(1)}),
newKey({name="S", x=200, y=440, w=90, color="white", font=50,code=pressKey(2)}),
newKey({name="J", x=300, y=440, w=90, color="white", font=50,code=pressKey(3)}),
newKey({name="L", x=400, y=440, w=90, color="white", font=50,code=pressKey(4)}),
newKey({name="T", x=500, y=440, w=90, color="white", font=50,code=pressKey(5)}),
newKey({name="O", x=600, y=440, w=90, color="white", font=50,code=pressKey(6)}),
newKey({name="I", x=700, y=440, w=90, color="white", font=50,code=pressKey(7)}),
custom_field={
newText({name="title", x=1100,y=5,font=80,align="R"}),
newText({name="subTitle", x=1110,y=50,font=35,align="L",color="grey"}),
newButton({name="b1", x=500+65*1, y=200, w=58, color="red", code=setPen(1)}),--B1
newButton({name="b2", x=500+65*2, y=200, w=58, color="orange", code=setPen(2)}),--B2
newButton({name="b3", x=500+65*3, y=200, w=58, color="yellow", code=setPen(3)}),--B3
newButton({name="b4", x=500+65*4, y=200, w=58, color="grass", code=setPen(4)}),--B4
newButton({name="b5", x=500+65*5, y=200, w=58, color="green", code=setPen(5)}),--B5
newButton({name="b6", x=500+65*6, y=200, w=58, color="water", code=setPen(6)}),--B6
newButton({name="b7", x=500+65*7, y=200, w=58, color="cyan", code=setPen(7)}),--B7
newButton({name="b8", x=500+65*8, y=200, w=58, color="blue", code=setPen(8)}),--B8
newButton({name="b9", x=500+65*9, y=200, w=58, color="purple", code=setPen(9)}),--B9
newButton({name="b10", x=500+65*10,y=200, w=58, color="magenta", code=setPen(10)}),--B10
newButton({name="b11", x=500+65*11,y=200, w=58, color="pink", code=setPen(11)}),--B11
newButton({name="b12", x=500+65*1, y=270, w=58, color="dGrey", code=setPen(12)}),--Bone
newButton({name="b13", x=500+65*2, y=270, w=58, color="grey", code=setPen(13)}),--GB1
newButton({name="b14", x=500+65*3, y=270, w=58, color="lGrey", code=setPen(14)}),--GB2
newButton({name="b15", x=500+65*4, y=270, w=58, color="dPurple", code=setPen(15)}),--GB3
newButton({name="b16", x=500+65*5, y=270, w=58, color="dRed", code=setPen(16)}),--GB4
newButton({name="b17", x=500+65*6, y=270, w=58, color="dGreen", code=setPen(17)}),--GB5
newButton({name="any", x=600, y=380, w=120, color="lGrey", font=40,code=setPen(0)}),
newButton({name="space", x=730, y=380, w=120, color="grey", font=65,code=setPen(-1)}),
newButton({name="copy", x=920, y=380, w=120, color="lRed", font=35,code=pressKey("cC")}),
newButton({name="paste", x=1060, y=380, w=120, color="lBlue", font=35,code=pressKey("cV")}),
newButton({name="clear", x=1200, y=380, w=120, color="white", font=40,code=pressKey("delete")}),
newButton({name="pushLine", x=1060, y=520, w=120, color="lYellow",font=20,code=pressKey("k")}),
newButton({name="delLine", x=1200, y=520, w=120, color="lYellow",font=20,code=pressKey("l")}),
newSwitch({name="demo", x=755, y=640, disp=STPval("demo"),code=STPrev("demo")}),
newButton({name="back", x=1140, y=640, w=170,h=80, font=40,code=BACK}),
},
custom_sequence={
newText({name="title", x=600,y=5,font=80,align="R"}),
newText({name="subTitle", x=610,y=50,font=35,align="L",color="grey"}),
newSelector({name="sequence",x=1080,y=60, w=200, color="yellow",list=CUSlist.sequence,disp=CUSval("sequence"),code=CUSsto("sequence")}),
newKey({name="Z", x=100, y=440, w=90, font=50,code=pressKey(1)}),
newKey({name="S", x=200, y=440, w=90, font=50,code=pressKey(2)}),
newKey({name="J", x=300, y=440, w=90, font=50,code=pressKey(3)}),
newKey({name="L", x=400, y=440, w=90, font=50,code=pressKey(4)}),
newKey({name="T", x=500, y=440, w=90, font=50,code=pressKey(5)}),
newKey({name="O", x=600, y=440, w=90, font=50,code=pressKey(6)}),
newKey({name="I", x=700, y=440, w=90, font=50,code=pressKey(7)}),
newKey({name="Z5", x=100, y=540, w=90, color="grey", font=50,code=pressKey(8)}),
newKey({name="S5", x=200, y=540, w=90, color="grey", font=50,code=pressKey(9)}),
@@ -254,81 +318,48 @@ local Widgets={
newButton({name="copy", x=1140, y=440, w=170,h=80, color="lRed", font=40,code=pressKey("cC"),hide=function()return #preBag==0 end}),
newButton({name="paste", x=1140, y=540, w=170,h=80, color="lBlue", font=40,code=pressKey("cV")}),
newSelector({name="sequence",x=670, y=60, w=200,color="yellow",list=CUSlist.sequence,disp=CUSval("sequence"),code=CUSsto("sequence")}),
newButton({name="rule", x=900, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_rule","swipeR")}),
newButton({name="draw", x=1140, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_draw","swipeL")}),
newButton({name="back", x=1140, y=640, w=170,h=80, color="white", font=40,code=BACK}),
},
custom_draw={
newButton({name="b1", x=500+65*1, y=200, w=58, color="red", code=setPen(1)}),--B1
newButton({name="b2", x=500+65*2, y=200, w=58, color="orange", code=setPen(2)}),--B2
newButton({name="b3", x=500+65*3, y=200, w=58, color="yellow", code=setPen(3)}),--B3
newButton({name="b4", x=500+65*4, y=200, w=58, color="grass", code=setPen(4)}),--B4
newButton({name="b5", x=500+65*5, y=200, w=58, color="green", code=setPen(5)}),--B5
newButton({name="b6", x=500+65*6, y=200, w=58, color="water", code=setPen(6)}),--B6
newButton({name="b7", x=500+65*7, y=200, w=58, color="cyan", code=setPen(7)}),--B7
newButton({name="b8", x=500+65*8, y=200, w=58, color="blue", code=setPen(8)}),--B8
newButton({name="b9", x=500+65*9, y=200, w=58, color="purple", code=setPen(9)}),--B9
newButton({name="b10", x=500+65*10,y=200, w=58, color="magenta", code=setPen(10)}),--B10
newButton({name="b11", x=500+65*11,y=200, w=58, color="pink", code=setPen(11)}),--B11
newButton({name="b12", x=500+65*1, y=270, w=58, color="dGrey", code=setPen(12)}),--Bone
newButton({name="b13", x=500+65*2, y=270, w=58, color="grey", code=setPen(13)}),--GB1
newButton({name="b14", x=500+65*3, y=270, w=58, color="lGrey", code=setPen(14)}),--GB2
newButton({name="b15", x=500+65*4, y=270, w=58, color="dPurple", code=setPen(15)}),--GB3
newButton({name="b16", x=500+65*5, y=270, w=58, color="dRed", code=setPen(16)}),--GB4
newButton({name="b17", x=500+65*6, y=270, w=58, color="dGreen", code=setPen(17)}),--GB5
newButton({name="any", x=600, y=380, w=120, color="lGrey", font=40,code=setPen(0)}),
newButton({name="space", x=730, y=380, w=120, color="grey", font=65,code=setPen(-1)}),
newButton({name="copy", x=920, y=380, w=120, color="lRed", font=35,code=pressKey("cC")}),
newButton({name="paste", x=1060, y=380, w=120, color="lBlue", font=35,code=pressKey("cV")}),
newButton({name="clear", x=1200, y=380, w=120, color="white", font=40,code=pressKey("delete")}),
newButton({name="pushLine", x=1060, y=520, w=120, color="lYellow",font=20,code=pressKey("k")}),
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="sequence", x=900, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_seq","swipeR")}),
newButton({name="mission", x=1140, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_mission","swipeL")}),
newButton({name="back", x=1140, y=640, w=170,h=80, color="white", font=40,code=BACK}),
newButton({name="back", x=1140, y=640, w=170,h=80, font=40,code=BACK}),
},
custom_mission={
newKey({name="_1", x=800, y=540, w=90, color="white", font=50,code=pressKey(01)}),
newKey({name="_2", x=900, y=540, w=90, color="white", font=50,code=pressKey(02)}),
newKey({name="_3", x=800, y=640, w=90, color="white", font=50,code=pressKey(03)}),
newKey({name="_4", x=900, y=640, w=90, color="white", font=50,code=pressKey(04)}),
newKey({name="any1", x=100, y=640, w=90, color="white", code=pressKey(05)}),
newKey({name="any2", x=200, y=640, w=90, color="white", code=pressKey(06)}),
newKey({name="any3", x=300, y=640, w=90, color="white", code=pressKey(07)}),
newKey({name="any4", x=400, y=640, w=90, color="white", code=pressKey(08)}),
newKey({name="PC", x=500, y=640, w=90, color="white", font=50,code=pressKey(09)}),
newText({name="title", x=600,y=5,font=80,align="R"}),
newText({name="subTitle", x=610,y=50,font=35,align="L",color="grey"}),
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(21)}),
newKey({name="J1", x=300, y=340, w=90, color="white", font=50,code=pressKey(31)}),
newKey({name="L1", x=400, y=340, w=90, color="white", font=50,code=pressKey(41)}),
newKey({name="T1", x=500, y=340, w=90, color="white", font=50,code=pressKey(51)}),
newKey({name="O1", x=600, y=340, w=90, color="white", font=50,code=pressKey(61)}),
newKey({name="I1", x=700, y=340, w=90, color="white", font=50,code=pressKey(71)}),
newKey({name="_1", x=800, y=540, w=90, font=50,code=pressKey(01)}),
newKey({name="_2", x=900, y=540, w=90, font=50,code=pressKey(02)}),
newKey({name="_3", x=800, y=640, w=90, font=50,code=pressKey(03)}),
newKey({name="_4", x=900, y=640, w=90, font=50,code=pressKey(04)}),
newKey({name="any1", x=100, y=640, w=90, code=pressKey(05)}),
newKey({name="any2", x=200, y=640, w=90, code=pressKey(06)}),
newKey({name="any3", x=300, y=640, w=90, code=pressKey(07)}),
newKey({name="any4", x=400, y=640, w=90, code=pressKey(08)}),
newKey({name="PC", x=500, y=640, w=90, font=50,code=pressKey(09)}),
newKey({name="Z2", x=100, y=440, w=90, color="white", font=50,code=pressKey(12)}),
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(32)}),
newKey({name="L2", x=400, y=440, w=90, color="white", font=50,code=pressKey(42)}),
newKey({name="T2", x=500, y=440, w=90, color="white", font=50,code=pressKey(52)}),
newKey({name="O2", x=600, y=440, w=90, color="white", font=50,code=pressKey(62)}),
newKey({name="I2", x=700, y=440, w=90, color="white", font=50,code=pressKey(72)}),
newKey({name="Z1", x=100, y=340, w=90, font=50,code=pressKey(11)}),
newKey({name="S1", x=200, y=340, w=90, font=50,code=pressKey(21)}),
newKey({name="J1", x=300, y=340, w=90, font=50,code=pressKey(31)}),
newKey({name="L1", x=400, y=340, w=90, font=50,code=pressKey(41)}),
newKey({name="T1", x=500, y=340, w=90, font=50,code=pressKey(51)}),
newKey({name="O1", x=600, y=340, w=90, font=50,code=pressKey(61)}),
newKey({name="I1", x=700, y=340, w=90, font=50,code=pressKey(71)}),
newKey({name="Z3", x=100, y=540, w=90, color="white", font=50,code=pressKey(13)}),
newKey({name="S3", x=200, y=540, w=90, color="white", font=50,code=pressKey(23)}),
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(43)}),
newKey({name="T3", x=500, y=540, w=90, color="white", font=50,code=pressKey(53)}),
newKey({name="O3", x=600, y=540, w=90, color="white", font=50,code=pressKey(63)}),
newKey({name="I3", x=700, y=540, w=90, color="white", font=50,code=pressKey(73)}),
newKey({name="Z2", x=100, y=440, w=90, font=50,code=pressKey(12)}),
newKey({name="S2", x=200, y=440, w=90, font=50,code=pressKey(22)}),
newKey({name="J2", x=300, y=440, w=90, font=50,code=pressKey(32)}),
newKey({name="L2", x=400, y=440, w=90, font=50,code=pressKey(42)}),
newKey({name="T2", x=500, y=440, w=90, font=50,code=pressKey(52)}),
newKey({name="O2", x=600, y=440, w=90, font=50,code=pressKey(62)}),
newKey({name="I2", x=700, y=440, w=90, font=50,code=pressKey(72)}),
newKey({name="O4", x=600, y=640, w=90, color="white", font=50,code=pressKey(64)}),
newKey({name="I4", x=700, y=640, w=90, color="white", font=50,code=pressKey(74)}),
newKey({name="Z3", x=100, y=540, w=90, font=50,code=pressKey(13)}),
newKey({name="S3", x=200, y=540, w=90, font=50,code=pressKey(23)}),
newKey({name="J3", x=300, y=540, w=90, font=50,code=pressKey(33)}),
newKey({name="L3", x=400, y=540, w=90, font=50,code=pressKey(43)}),
newKey({name="T3", x=500, y=540, w=90, font=50,code=pressKey(53)}),
newKey({name="O3", x=600, y=540, w=90, font=50,code=pressKey(63)}),
newKey({name="I3", x=700, y=540, w=90, font=50,code=pressKey(73)}),
newKey({name="O4", x=600, y=640, w=90, font=50,code=pressKey(64)}),
newKey({name="I4", x=700, y=640, w=90, font=50,code=pressKey(74)}),
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")}),
@@ -337,23 +368,23 @@ local Widgets={
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")}),
newSwitch({name="mission", x=1150, y=350, disp=CUSval("missionKill"), code=CUSrev("missionKill")}),
newButton({name="draw", x=900, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_draw","swipeR")}),
newButton({name="basic", x=1140, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_basic","swipeL")}),
newButton({name="back", x=1140, y=640, w=170,h=80, color="white", font=40,code=BACK}),
newButton({name="back", x=1140, y=640, w=170,h=80, font=40,code=BACK}),
},
play={
newButton({name="pause", x=1235, y=45, w=80, color="white", font=25,code=function()pauseGame()end}),
newButton({name="pause", x=1235, y=45, w=80, font=25,code=function()pauseGame()end}),
},
pause={
newButton({name="setting", x=1120, y=70, w=240,h=90, color="lBlue", font=35,code=pressKey("s")}),
newButton({name="replay", x=640, y=250, w=240,h=100,color="lYellow",font=30,code=pressKey("p"),hide=function()return not(game.result or game.replaying)or #players>1 end}),
newButton({name="resume", x=640, y=367, w=240,h=100,color="lGreen", font=30,code=pressKey("escape")}),
newButton({name="restart", x=640, y=483, w=240,h=100,color="lRed", font=35,code=pressKey("r")}),
newButton({name="quit", x=640, y=600, w=240,h=100,color="white", font=35,code=BACK}),
newButton({name="quit", x=640, y=600, w=240,h=100,font=35,code=BACK}),
},
setting_game={
newText({name="title", x=640,y=15,font=80}),
newButton({name="graphic", x=200, y=80, w=240,h=80, color="lCyan", font=35,code=swapScene("setting_video","swipeR")}),
newButton({name="sound", x=1080, y=80, w=240,h=80, color="lCyan", font=35,code=swapScene("setting_sound","swipeL")}),
@@ -362,15 +393,17 @@ local Widgets={
newButton({name="touch", x=990, y=220, w=320,h=80, color="lBlue", font=35,code=goScene("setting_touch")}),
newSlider({name="reTime", x=350, y=340, w=300,unit=10, font=30,disp=SETval("reTime"), code=SETsto("reTime"),show=function(S)return(.5+S.disp()*.25).."s"end}),
newSlider({name="maxNext", x=350, y=440, w=300,unit=6, font=30,disp=SETval("maxNext"), code=SETsto("maxNext")}),
newButton({name="layout", x=460, y=540, w=140,h=70,color="white", font=35,code=goScene("setting_skin")}),
newButton({name="layout", x=460, y=540, w=140,h=70, font=35,code=goScene("setting_skin")}),
newSwitch({name="autoPause",x=1080, y=320, font=20,disp=SETval("autoPause"), code=SETrev("autoPause")}),
newSwitch({name="swap", x=1080, y=380, font=20,disp=SETval("swap"), code=SETrev("swap")}),
newSwitch({name="fine", x=1080, y=440, font=20,disp=SETval("fine"), code=SETrev("fine")}),
newSwitch({name="appLock", x=1080, y=500, font=20,disp=SETval("appLock"), code=SETrev("appLock")}),
newButton({name="calc", x=970, y=550, w=150,h=60,color="dGrey", font=25,code=goScene("calculator"),hide=function()return not setting.appLock end}),
newButton({name="back", x=1140, y=640, w=170,h=80,color="white", font=40,code=BACK}),
newButton({name="back", x=1140, y=640, w=170,h=80, font=40,code=BACK}),
},
setting_video={
newText({name="title",x=640,y=15,font=80}),
newButton({name="sound", x=200, y=80,w=240,h=80,color="lCyan",font=35,code=swapScene("setting_sound","swipeR")}),
newButton({name="game", x=1080, y=80,w=240,h=80,color="lCyan",font=35,code=swapScene("setting_game","swipeL")}),
@@ -382,13 +415,13 @@ local Widgets={
newSwitch({name="grid", x=700, y=240, disp=SETval("grid"), code=SETrev("grid")}),
newSwitch({name="bagLine", x=700, y=300, disp=SETval("bagLine"), code=SETrev("bagLine")}),
newSlider({name="lockFX", x=350, y=350,w=373,unit=5, font=30,disp=SETval("lockFX"), code=SETsto("lockFX")}),
newSlider({name="dropFX", x=350, y=400,w=373,unit=5, font=30,disp=SETval("dropFX"), code=SETsto("dropFX")}),
newSlider({name="moveFX", x=350, y=450,w=373,unit=5, font=30,disp=SETval("moveFX"), code=SETsto("moveFX")}),
newSlider({name="clearFX", x=350, y=500,w=373,unit=5, font=30,disp=SETval("clearFX"), code=SETsto("clearFX")}),
newSlider({name="shakeFX", x=350, y=550,w=373,unit=5, font=30,disp=SETval("shakeFX"), code=SETsto("shakeFX")}),
newSlider({name="atkFX", x=350, y=600,w=373,unit=5, font=30,disp=SETval("atkFX"), code=SETsto("atkFX")}),
newSlider({name="frame", x=350, y=650,w=373,unit=10,font=30,
newSlider({name="lockFX", x=350, y=350,w=373,unit=5, disp=SETval("lockFX"), code=SETsto("lockFX")}),
newSlider({name="dropFX", x=350, y=400,w=373,unit=5, disp=SETval("dropFX"), code=SETsto("dropFX")}),
newSlider({name="moveFX", x=350, y=450,w=373,unit=5, disp=SETval("moveFX"), code=SETsto("moveFX")}),
newSlider({name="clearFX", x=350, y=500,w=373,unit=5, disp=SETval("clearFX"), code=SETsto("clearFX")}),
newSlider({name="shakeFX", x=350, y=550,w=373,unit=5, disp=SETval("shakeFX"), code=SETsto("shakeFX")}),
newSlider({name="atkFX", x=350, y=600,w=373,unit=5, disp=SETval("atkFX"), code=SETsto("atkFX")}),
newSlider({name="frame", x=350, y=650,w=373,unit=10,
disp=function()
return setting.frameMul>35 and setting.frameMul/10 or setting.frameMul/5-4
end,
@@ -401,7 +434,7 @@ local Widgets={
newSwitch({name="warn", x=1100, y=300,font=35,disp=SETval("warn"),code=SETrev("warn")}),
newSwitch({name="highCam", x=1100, y=360,font=35,disp=SETval("highCam"),code=SETrev("highCam")}),
newSwitch({name="nextPos", x=1100, y=420,font=35,disp=SETval("nextPos"),code=SETrev("nextPos")}),
newSwitch({name="fullscreen",x=1100,y=480,font=30,disp=SETval("fullscreen"),
newSwitch({name="fullscreen",x=1100,y=480,disp=SETval("fullscreen"),
code=function()
setting.fullscreen=not setting.fullscreen
love.window.setFullscreen(setting.fullscreen)
@@ -417,9 +450,11 @@ local Widgets={
code=function()
setting.powerInfo=not setting.powerInfo
end}),
newButton({name="back", x=1140, y=640,w=170,h=80,color="white", font=40,code=BACK}),
newButton({name="back", x=1140, y=640,w=170,h=80, font=40,code=BACK}),
},
setting_sound={
newText({name="title", x=640,y=15,font=80}),
newButton({name="game", x=200, y=80,w=240,h=80,color="lCyan", font=35,code=swapScene("setting_game","swipeR")}),
newButton({name="graphic", x=1080, y=80,w=240,h=80,color="lCyan", font=35,code=swapScene("setting_video","swipeL")}),
@@ -429,9 +464,12 @@ local Widgets={
newSlider({name="bgm", x=180, y=400,w=400, font=35,change=function()BGM.freshVolume()end, disp=SETval("bgm"), code=SETsto("bgm")}),
newSlider({name="vib", x=750, y=200,w=400, unit=5, font=25,change=function()VIB(2)end, disp=SETval("vib"), code=SETsto("vib")}),
newSlider({name="voc", x=750, y=300,w=400, font=35,change=function()VOC.play("test")end, disp=SETval("voc"), code=SETsto("voc")}),
newButton({name="back", x=1140, y=640,w=170,h=80,color="white", font=40,code=BACK}),
newButton({name="back", x=1140, y=640,w=170,h=80, font=40,code=BACK}),
},
setting_control={
newText({name="title", x=80,y=50,font=70,align="L"}),
newText({name="preview", x=520,y=540,font=40,align="R"}),
newSlider({name="das", x=250, y=200,w=910, unit=26, disp=SETval("das"), show="frame_time",code=SETsto("das")}),
newSlider({name="arr", x=250, y=290,w=525, unit=15, disp=SETval("arr"), show="frame_time",code=SETsto("arr")}),
newSlider({name="sddas", x=250, y=380,w=350, unit=10, disp=SETval("sddas"), show="frame_time",code=SETsto("sddas")}),
@@ -446,37 +484,44 @@ local Widgets={
_.sddas,_.sdarr=0,2
_.ihs,_.irs,_.ims=false,false,false
end}),
newButton({name="back", x=1140, y=640,w=170,h=80,color="white",font=40,code=BACK}),
newButton({name="back", x=1140, y=640,w=170,h=80,font=40,code=BACK}),
},
setting_key={
newButton({name="back", x=1140,y=640,w=170,h=80,color="white",font=40,code=BACK}),
newText({name="keyboard", x=340,y=30,color="lRed",font=25}),
newText({name="keyboard", x=940,y=30,color="lRed",font=25}),
newText({name="joystick", x=540,y=30,color="lBlue",font=25}),
newText({name="joystick", x=1140,y=30,color="lBlue",font=25}),
newText({name="help", x=50,y=650,font=30,align="L"}),
newButton({name="back", x=1140,y=640,w=170,h=80,font=40,code=BACK}),
},
setting_skin={
newButton({name="prev", x=700,y=100,w=140,h=100,color="white",font=50,code=function()SKIN.prevSet()end}),
newButton({name="next", x=860,y=100,w=140,h=100,color="white",font=50,code=function()SKIN.nextSet()end}),
newButton({name="prev1", x=130,y=230,w=90,h=65,color="white",code=prevSkin(1)}),
newButton({name="prev2", x=270,y=230,w=90,h=65,color="white",code=prevSkin(2)}),
newButton({name="prev3", x=410,y=230,w=90,h=65,color="white",code=prevSkin(3)}),
newButton({name="prev4", x=550,y=230,w=90,h=65,color="white",code=prevSkin(4)}),
newButton({name="prev5", x=690,y=230,w=90,h=65,color="white",code=prevSkin(5)}),
newButton({name="prev6", x=830,y=230,w=90,h=65,color="white",code=prevSkin(6)}),
newButton({name="prev7", x=970,y=230,w=90,h=65,color="white",code=prevSkin(7)}),
newText({name="title", x=80,y=50,font=70}),
newButton({name="next1", x=130,y=450,w=90,h=65,color="white",code=nextSkin(1)}),
newButton({name="next2", x=270,y=450,w=90,h=65,color="white",code=nextSkin(2)}),
newButton({name="next3", x=410,y=450,w=90,h=65,color="white",code=nextSkin(3)}),
newButton({name="next4", x=550,y=450,w=90,h=65,color="white",code=nextSkin(4)}),
newButton({name="next5", x=690,y=450,w=90,h=65,color="white",code=nextSkin(5)}),
newButton({name="next6", x=830,y=450,w=90,h=65,color="white",code=nextSkin(6)}),
newButton({name="next7", x=970,y=450,w=90,h=65,color="white",code=nextSkin(7)}),
newButton({name="prev", x=700,y=100,w=140,h=100,font=50,code=function()SKIN.prevSet()end}),
newButton({name="next", x=860,y=100,w=140,h=100,font=50,code=function()SKIN.nextSet()end}),
newButton({name="prev1", x=130,y=230,w=90,h=65,code=prevSkin(1)}),
newButton({name="prev2", x=270,y=230,w=90,h=65,code=prevSkin(2)}),
newButton({name="prev3", x=410,y=230,w=90,h=65,code=prevSkin(3)}),
newButton({name="prev4", x=550,y=230,w=90,h=65,code=prevSkin(4)}),
newButton({name="prev5", x=690,y=230,w=90,h=65,code=prevSkin(5)}),
newButton({name="prev6", x=830,y=230,w=90,h=65,code=prevSkin(6)}),
newButton({name="prev7", x=970,y=230,w=90,h=65,code=prevSkin(7)}),
newButton({name="spin1", x=130,y=540,w=90,h=65,color="white",code=nextDir(1)}),
newButton({name="spin2", x=270,y=540,w=90,h=65,color="white",code=nextDir(2)}),
newButton({name="spin3", x=410,y=540,w=90,h=65,color="white",code=nextDir(3)}),
newButton({name="spin4", x=550,y=540,w=90,h=65,color="white",code=nextDir(4)}),
newButton({name="spin5", x=690,y=540,w=90,h=65,color="white",code=nextDir(5)}),
--newButton({name="spin6",x=825,y=540,w=90,h=65,color="white",code=nextDir(6)}),--Cannot rotate O
newButton({name="spin7", x=970,y=540,w=90,h=65,color="white",code=nextDir(7)}),
newButton({name="next1", x=130,y=450,w=90,h=65,code=nextSkin(1)}),
newButton({name="next2", x=270,y=450,w=90,h=65,code=nextSkin(2)}),
newButton({name="next3", x=410,y=450,w=90,h=65,code=nextSkin(3)}),
newButton({name="next4", x=550,y=450,w=90,h=65,code=nextSkin(4)}),
newButton({name="next5", x=690,y=450,w=90,h=65,code=nextSkin(5)}),
newButton({name="next6", x=830,y=450,w=90,h=65,code=nextSkin(6)}),
newButton({name="next7", x=970,y=450,w=90,h=65,code=nextSkin(7)}),
newButton({name="spin1", x=130,y=540,w=90,h=65,code=nextDir(1)}),
newButton({name="spin2", x=270,y=540,w=90,h=65,code=nextDir(2)}),
newButton({name="spin3", x=410,y=540,w=90,h=65,code=nextDir(3)}),
newButton({name="spin4", x=550,y=540,w=90,h=65,code=nextDir(4)}),
newButton({name="spin5", x=690,y=540,w=90,h=65,code=nextDir(5)}),
--newButton({name="spin6",x=825,y=540,w=90,h=65,code=nextDir(6)}),--Cannot rotate O
newButton({name="spin7", x=970,y=540,w=90,h=65,code=nextDir(7)}),
newButton({name="skinR", x=200,y=640,w=220,h=80,color="lPurple",font=35,
code=function()
@@ -490,10 +535,10 @@ local Widgets={
end
SFX.play("hold")
end}),
newButton({name="back", x=1140,y=640,w=170,h=80,color="white",font=40,code=BACK}),
newButton({name="back", x=1140,y=640,w=170,h=80,font=40,code=BACK}),
},
setting_touch={
newButton({name="default", x=520,y=80,w=200,h=80,color="white",font=35,
newButton({name="default", x=520,y=80,w=200,h=80,font=35,
code=function()
local D=virtualkeySet[sceneTemp.default]
for i=1,#VK_org do
@@ -512,15 +557,15 @@ local Widgets={
sceneTemp.default=sceneTemp.default%5+1
sceneTemp.sel=nil
end}),
newButton({name="snap", x=760,y=80,w=200,h=80,color="white",font=35,
newButton({name="snap", x=760,y=80,w=200,h=80,font=35,
code=function()
sceneTemp.snap=sceneTemp.snap%6+1
end}),
newButton({name="option", x=520,y=180,w=200,h=80,color="white",font=40,
newButton({name="option", x=520,y=180,w=200,h=80,font=40,
code=function()
SCN.go("setting_touchSwitch")
end}),
newButton({name="back", x=760,y=180,w=200,h=80,color="white",font=35,code=BACK}),
newButton({name="back", x=760,y=180,w=200,h=80,font=35,code=BACK}),
newSlider({name="size", x=450,y=265,w=460,unit=19,font=40,show="vkSize",
disp=function()
return VK_org[sceneTemp.sel].r/10-1
@@ -555,14 +600,14 @@ local Widgets={
newSwitch({name="b18", x=580, y=500, font=35,disp=VKAdisp(18),code=VKAcode(18)}),
newSwitch({name="b19", x=580, y=560, font=35,disp=VKAdisp(19),code=VKAcode(19)}),
newSwitch({name="b20", x=580, y=620, font=35,disp=VKAdisp(20),code=VKAcode(20)}),
newButton({name="norm", x=840, y=100, w=240,h=80,color="white",font=35,code=function()for i=1,20 do VK_org[i].ava=i<11 end end}),
newButton({name="pro", x=1120, y=100, w=240,h=80,color="white",font=35,code=function()for i=1,20 do VK_org[i].ava=true end end}),
newButton({name="norm", x=840, y=100, w=240,h=80, font=35,code=function()for i=1,20 do VK_org[i].ava=i<11 end end}),
newButton({name="pro", x=1120, y=100, w=240,h=80, font=35,code=function()for i=1,20 do VK_org[i].ava=true end end}),
newSwitch({name="hide", x=1170, y=200, font=40,disp=SETval("VKSwitch"),code=SETrev("VKSwitch")}),
newSwitch({name="track", x=1170, y=300, font=35,disp=SETval("VKTrack"),code=SETrev("VKTrack")}),
newSlider({name="sfx", x=800, y=380, w=180, font=40,change=function()SFX.play("virtualKey",setting.VKSFX)end,disp=SETval("VKSFX"),code=SETsto("VKSFX")}),
newSlider({name="vib", x=800, y=460, w=180,unit=2, font=40,change=function()VIB(setting.VKVIB)end,disp=SETval("VKVIB"),code=SETsto("VKVIB")}),
newSlider({name="sfx", x=800, y=380, w=180, font=35,change=function()SFX.play("virtualKey",setting.VKSFX)end,disp=SETval("VKSFX"),code=SETsto("VKSFX")}),
newSlider({name="vib", x=800, y=460, w=180,unit=2, font=35,change=function()VIB(setting.VKVIB)end,disp=SETval("VKVIB"),code=SETsto("VKVIB")}),
newSwitch({name="icon", x=850, y=300, font=40,disp=SETval("VKIcon"),code=SETrev("VKIcon")}),
newButton({name="tkset", x=1120, y=420, w=240,h=80,color="white",font=30,
newButton({name="tkset", x=1120, y=420, w=240,h=80,
code=function()
SCN.go("setting_trackSetting")
end,
@@ -570,76 +615,80 @@ local Widgets={
return not setting.VKTrack
end}),
newSlider({name="alpha", x=840, y=540, w=400,font=40,disp=SETval("VKAlpha"),code=SETsto("VKAlpha")}),
newButton({name="back", x=1140, y=640, w=170,h=80,color="white",font=40,code=BACK}),
newButton({name="back", x=1140, y=640, w=170,h=80,font=40,code=BACK}),
},
setting_trackSetting={
newSwitch({name="VKDodge", x=400, y=200, font=35, disp=SETval("VKDodge"),code=SETrev("VKDodge")}),
newSlider({name="VKTchW", x=140, y=310, w=1000, unit=10,font=35,disp=SETval("VKTchW"),code=function(i)setting.VKTchW=i setting.VKCurW=math.max(setting.VKCurW,i)end}),
newSlider({name="VKCurW", x=140, y=370, w=1000, unit=10,font=35,disp=SETval("VKCurW"),code=function(i)setting.VKCurW=i setting.VKTchW=math.min(setting.VKTchW,i)end}),
newButton({name="back", x=1140, y=640, w=170,h=80,color="white",font=40,code=BACK}),
newButton({name="back", x=1140, y=640, w=170,h=80,font=40,code=BACK}),
},
setting_lang={
newButton({name="chi", x=160, y=100,w=200,h=120,color="white",font=45,code=setLang(1)}),
newButton({name="chi2", x=380, y=100,w=200,h=120,color="white",font=45,code=setLang(2)}),
newButton({name="eng", x=600, y=100,w=200,h=120,color="white",font=45,code=setLang(3)}),
newButton({name="str", x=820, y=100,w=200,h=120,color="white",font=45,code=setLang(4)}),
newButton({name="yygq", x=1040, y=100,w=200,h=120,color="white",font=45,code=setLang(5)}),
newButton({name="back", x=640, y=600,w=200,h=80,color="white", font=35,code=BACK}),
newButton({name="chi", x=160, y=100,w=200,h=120,font=45,code=setLang(1)}),
newButton({name="chi2", x=380, y=100,w=200,h=120,font=45,code=setLang(2)}),
newButton({name="eng", x=600, y=100,w=200,h=120,font=45,code=setLang(3)}),
newButton({name="str", x=820, y=100,w=200,h=120,font=45,code=setLang(4)}),
newButton({name="yygq", x=1040, y=100,w=200,h=120,font=45,code=setLang(5)}),
newButton({name="back", x=640, y=600,w=200,h=80,font=35,code=BACK}),
},
help={
newButton({name="dict", x=1140, y=410,w=220,h=70, font=35,code=goScene("dict")}),
newButton({name="staff", x=1140, y=490,w=220,h=70, font=35,code=goScene("staff")}),
newButton({name="his", x=1140, y=570,w=220,h=70, font=35,code=goScene("history")}),
newButton({name="qq", x=1140, y=650,w=220,h=70, font=35,code=function()love.system.openURL("tencent://message/?uin=1046101471&Site=&Menu=yes")end,hide=mobileHide}),
newButton({name="back", x=640, y=600,w=170,h=80, font=35,code=BACK}),
},
dict={
newText({name="title", x=20,y=5,font=70,align="L"}),
newKey({name="keyboard", x=960,y=60,w=200,h=80, font=35,code=pressKey("kb")}),
newKey({name="link", x=1140,y=650,w=200,h=80, font=35,code=pressKey("link"),hide=function()return not(sceneTemp.url and sceneTemp.hideKB)end}),
newButton({name="back", x=1165,y=60,w=170,h=80, font=40,code=BACK}),
newKeyboard({name="kb", x=130,y=255,w=1120,h=440,hide=STPval("hideKB")}),
},
staff={
newButton({name="back", x=1140, y=640,w=170,h=80, font=40,code=BACK}),
},
history={
newKey({name="prev", x=1155, y=170,w=180, font=65,code=pressKey("up"),hide=STPeq("pos",1)}),
newKey({name="next", x=1155, y=400,w=180, font=65,code=pressKey("down"),hide=function()return sceneTemp.pos==#sceneTemp.text end}),
newButton({name="back", x=1140, y=640,w=170,h=80, font=40,code=BACK}),
},
stat={
newButton({name="path", x=980, y=620,w=250,h=80, font=25,code=function()love.system.openURL(love.filesystem.getSaveDirectory())end,hide=mobileHide}),
newButton({name="back", x=640, y=620,w=200,h=80, font=35,code=BACK}),
},
account={
newText({name="username", x=100,y=100,font=60}),
},
minigame={
newButton({name="p15", x=240, y=250,w=350,h=120,color="white",font=40,code=goScene("p15")}),
newButton({name="schulte_G",x=640, y=250,w=350,h=120,color="white",font=40,code=goScene("schulte_G")}),
newButton({name="pong", x=1040, y=250,w=350,h=120,color="white",font=40,code=goScene("pong")}),
newButton({name="back", x=1140, y=640,w=170,h=80,color="white", font=40,code=BACK}),
newButton({name="p15", x=240, y=250,w=350,h=120,font=40,code=goScene("p15")}),
newButton({name="schulte_G",x=640, y=250,w=350,h=120,font=40,code=goScene("schulte_G")}),
newButton({name="pong", x=1040, y=250,w=350,h=120,font=40,code=goScene("pong")}),
newButton({name="back", x=1140, y=640,w=170,h=80,font=40,code=BACK}),
},
p15={
newButton({name="reset", x=160,y=100,w=180,h=100,color="lGreen", font=40,code=pressKey("space")}),
newSlider({name="color", x=110,y=250,w=170,unit=4,show=false, font=30,disp=function()return sceneTemp.color end,code=function(v)if sceneTemp.state~=1 then sceneTemp.color=v end end,hide=function()return sceneTemp.state==1 end}),
newSwitch({name="blind", x=240,y=330,w=60, font=40,disp=function()return sceneTemp.blind end,code=pressKey("w"), hide=function()return sceneTemp.state==1 end}),
newSwitch({name="slide", x=240,y=420,w=60, font=40,disp=function()return sceneTemp.slide end,code=pressKey("e"), hide=function()return sceneTemp.state==1 end}),
newSwitch({name="pathVis", x=240,y=510,w=60, font=40,disp=function()return sceneTemp.pathVis end,code=pressKey("r"), hide=function()return sceneTemp.state==1 or not sceneTemp.slide end}),
newSwitch({name="revKB", x=240,y=600,w=60, font=40,disp=function()return sceneTemp.revKB end,code=pressKey("t"), hide=function()return sceneTemp.state==1 end}),
newButton({name="back", x=1140,y=640,w=170,h=80,color="white", font=40,code=BACK}),
newSlider({name="color", x=110,y=250,w=170,unit=4,show=false, font=30,disp=STPval("color"), code=function(v)if sceneTemp.state~=1 then sceneTemp.color=v end end,hide=STPeq("state",1)}),
newSwitch({name="blind", x=240,y=330,w=60, font=40,disp=STPval("blind"), code=pressKey("w"), hide=STPeq("state",1)}),
newSwitch({name="slide", x=240,y=420,w=60, font=40,disp=STPval("slide"), code=pressKey("e"), hide=STPeq("state",1)}),
newSwitch({name="pathVis", x=240,y=510,w=60, font=40,disp=STPval("pathVis"), code=pressKey("r"), hide=function()return sceneTemp.state==1 or not sceneTemp.slide end}),
newSwitch({name="revKB", x=240,y=600,w=60, font=40,disp=STPval("revKB"), code=pressKey("t"), hide=STPeq("state",1)}),
newButton({name="back", x=1140,y=640,w=170,h=80, font=40,code=BACK}),
},
schulte_G={
newButton({name="reset", x=160,y=100,w=180,h=100,color="lGreen", font=40,code=pressKey("space"),hide=function()return sceneTemp.state==0 end}),
newSlider({name="rank", x=130,y=250,w=150,unit=3,show=false, font=40,disp=function()return sceneTemp.rank-3 end, code=function(v)sceneTemp.rank=v+3 end,hide=function()return sceneTemp.state>0 end}),
newSwitch({name="blind", x=240,y=330,w=60, font=40,disp=function()return sceneTemp.blind end, code=pressKey("q"),hide=function()return sceneTemp.state==1 end}),
newSwitch({name="disappear",x=240,y=420,w=60, font=40,disp=function()return sceneTemp.disappear end, code=pressKey("w"),hide=function()return sceneTemp.state==1 end}),
newSwitch({name="tapFX", x=240,y=510,w=60, font=40,disp=function()return sceneTemp.tapFX end, code=pressKey("e"),hide=function()return sceneTemp.state==1 end}),
newButton({name="back", x=1140,y=640,w=170,h=80,color="white", font=40,code=BACK}),
newSwitch({name="blind", x=240,y=330,w=60, font=40,disp=STPval("blind"), code=pressKey("q"),hide=STPeq("state",1)}),
newSwitch({name="disappear",x=240,y=420,w=60, font=40,disp=STPval("disappear"), code=pressKey("w"),hide=STPeq("state",1)}),
newSwitch({name="tapFX", x=240,y=510,w=60, font=40,disp=STPval("tapFX"), code=pressKey("e"),hide=STPeq("state",1)}),
newButton({name="back", x=1140,y=640,w=170,h=80, font=40,code=BACK}),
},
pong={
newKey({name="reset", x=640,y=45,w=150,h=50,color="white", font=35,code=pressKey("r")}),
newKey({name="back", x=640,y=675,w=150,h=50,color="white", font=35,code=BACK}),
},
help={
newButton({name="dict", x=1140, y=410,w=220,h=70,color="white",font=35,code=goScene("dict")}),
newButton({name="staff", x=1140, y=490,w=220,h=70,color="white",font=35,code=goScene("staff")}),
newButton({name="his", x=1140, y=570,w=220,h=70,color="white",font=35,code=goScene("history")}),
newButton({name="qq", x=1140, y=650,w=220,h=70,color="white",font=35,code=function()love.system.openURL("tencent://message/?uin=1046101471&Site=&Menu=yes")end,hide=mobileHide}),
newButton({name="back", x=640, y=600,w=170,h=80,color="white",font=35,code=BACK}),
},
dict={
newKey({name="keyboard", x=960,y=60,w=200,h=80,color="white",font=35,code=pressKey("kb")}),
newKey({name="link", x=1140,y=650,w=200,h=80,color="white",font=35,code=pressKey("link"),hide=function()return not(sceneTemp.url and sceneTemp.hideKB)end}),
newButton({name="back", x=1165,y=60,w=170,h=80,color="white",font=40,code=BACK}),
newKeyboard({name="kb", x=130,y=255,w=1120,h=440,hide=function()return sceneTemp.hideKB end}),
},
staff={
newButton({name="back", x=1140, y=640,w=170,h=80,color="white",font=40,code=BACK}),
},
history={
newKey({name="prev", x=1155, y=170,w=180, color="white",font=65,code=pressKey("up"),hide=function()return sceneTemp.pos==1 end}),
newKey({name="next", x=1155, y=400,w=180, color="white",font=65,code=pressKey("down"),hide=function()return sceneTemp.pos==#sceneTemp.text end}),
newButton({name="back", x=1140, y=640,w=170,h=80,color="white",font=40,code=BACK}),
},
stat={
newButton({name="path", x=980, y=620,w=250,h=80,color="white",font=25,code=function()love.system.openURL(love.filesystem.getSaveDirectory())end,hide=mobileHide}),
newButton({name="back", x=640, y=620,w=200,h=80,color="white",font=35,code=BACK}),
newKey({name="reset", x=640,y=45,w=150,h=50, font=35,code=pressKey("r")}),
newKey({name="back", x=640,y=675,w=150,h=50, font=35,code=BACK}),
},
debug={
newButton({name="scrInfo", x=300,y=120,w=300,h=100,color="green", font=30,code=function()
newButton({name="scrInfo", x=300,y=120,w=300,h=100,color="green",code=function()
LOG.print("Screen Info:")
LOG.print("x y: "..scr.x.." "..scr.y)
LOG.print("w h: "..scr.w.." "..scr.h)
@@ -650,7 +699,7 @@ local Widgets={
end}),
newButton({name="reset", x=640,y=380,w=240,h=100,color="orange", font=40,
code=function()sceneTemp.reset=true end,
hide=function()return sceneTemp.reset end}),
hide=STPval("reset")}),
newButton({name="reset1", x=340,y=480,w=240,h=100,color="red", font=35,
code=function()
love.filesystem.remove("unlock.dat")
@@ -684,7 +733,7 @@ local Widgets={
SCN.back()
end,
hide=function()return not sceneTemp.reset end}),
newButton({name="back", x=640,y=620,w=200,h=80,color="white", font=40,code=BACK}),
newButton({name="back", x=640,y=620,w=200,h=80,font=40,code=BACK}),
},
}
return Widgets

View File

@@ -181,7 +181,7 @@ for k,v in next,_ do missionEnum[k]=v end
local function T(s,t)return love.graphics.newText(getFont(s),t)end
drawableText={
question=T(100,"?"),right=T(45,""),
question=T(100,"?"),
small=T(30,"<"),large=T(30,">"),
bpm=T(15,"BPM"),kpm=T(15,"KPM"),
@@ -211,14 +211,6 @@ drawableText={
gameover=T(100),pause=T(120),
D=T(100,"D"),C=T(100,"C"),B=T(100,"B"),A=T(100,"A"),S=T(100,"S"),
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),
dict=T(70),
preview=T(40),
keyboard=T(25),joystick=T(25),
ctrlSetHelp=T(30),
musicRoom=T(80),nowPlaying=T(50),
VKTchW=T(30),VKOrgW=T(30),VKCurW=T(30),
noScore=T(45),highScore=T(30),
}

View File

@@ -1397,14 +1397,14 @@ do--mode
end
end
end
do--custom_basic
function sceneInit.custom_basic()
do--customGame
function sceneInit.customGame()
destroyPlayers()
BG.set(customEnv.bg)
BGM.play(customEnv.bgm)
end
function keyDown.custom_basic(key)
function keyDown.customGame(key)
if key=="return"or key=="return2"then
if customEnv.opponent>0 then
if customEnv.opponent>5 and customEnv.seq=="fixed"then
@@ -1418,12 +1418,14 @@ do--custom_basic
SCN.push()
loadGame(key=="return"and"custom_clear"or"custom_puzzle",true)
elseif key=="tab"then
if kb.isDown("lshift","rshift")then
SCN.swapTo("custom_mission","swipeR")
else
SCN.swapTo("custom_rule","swipeL")
end
elseif key=="f"then
SCN.go("custom_field","swipeD")
elseif key=="s"then
SCN.go("custom_sequence","swipeD")
elseif key=="m"then
SCN.go("custom_mission","swipeD")
elseif key=="a"then
SCN.go("custom_advance","swipeD")
elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then
local str="Techmino Quest:"..copyQuestArgs().."!"
if #preBag>0 then str=str..copySequence()end
@@ -1468,42 +1470,14 @@ do--custom_basic
WIDGET.keyPressed(key)
end
end
function Pnt.custom_basic()
gc.setColor(1,1,1)
gc.draw(drawableText.custom,20,5)
gc.setColor(.7,.7,.7)
gc.draw(drawableText.basic,580,50)
end
end
do--custom_rule
function sceneInit.custom_rule()
do--custom_advance
function sceneInit.custom_advance()
destroyPlayers()
end
function keyDown.custom_rule(key)
if key=="tab"then
if kb.isDown("lshift","rshift")then
SCN.swapTo("custom_basic","swipeR")
else
SCN.swapTo("custom_seq","swipeL")
end
elseif key=="escape"then
SCN.back()
else
WIDGET.keyPressed(key)
end
end
function Pnt.custom_rule()
gc.setColor(1,1,1)
gc.draw(drawableText.custom,20,5)
gc.setColor(.7,.7,.7)
gc.draw(drawableText.rule,585,50)
end
end
do--custom_seq
function sceneInit.custom_seq()
do--custom_sequence
function sceneInit.custom_sequence()
sceneTemp={cur=#preBag,sure=0}
end
@@ -1517,7 +1491,7 @@ do--custom_seq
["1"]=8,["2"]=9,["3"]=19,["4"]=20,["5"]=14,["7"]=25,
z=8,s=9,t=14,j=19,l=20,i=25
}
function keyDown.custom_seq(key)
function keyDown.custom_sequence(key)
local S=sceneTemp
local preBag=preBag
if key=="left"then
@@ -1582,12 +1556,6 @@ do--custom_seq
else
LOG.print(text.dataCorrupted,color.red)
end
elseif key=="tab"then
if kb.isDown("lshift","rshift")then
SCN.swapTo("custom_rule","swipeR")
else
SCN.swapTo("custom_draw","swipeL")
end
elseif key=="escape"then
SCN.back()
elseif type(key)=="number"then
@@ -1604,16 +1572,15 @@ do--custom_seq
end
end
function Tmr.custom_seq()
function Tmr.custom_sequence()
if sceneTemp.sure>0 then sceneTemp.sure=sceneTemp.sure-1 end
end
function Pnt.custom_seq()
function Pnt.custom_sequence()
local S=sceneTemp
gc.setColor(1,1,1)
gc.draw(drawableText.custom,20,5)
--Draw frame
gc.setColor(1,1,1)
gc.setLineWidth(4)
gc.rectangle("line",100,110,1080,260)
@@ -1674,8 +1641,8 @@ do--custom_seq
end
end
end
do--custom_draw
function sceneInit.custom_draw()
do--custom_field
function sceneInit.custom_field()
sceneTemp={
sure=0,
pen=1,
@@ -1689,10 +1656,10 @@ do--custom_draw
a=12,s=13,d=14,f=15,g=16,h=17,
z=0,x=-1,
}
function mouseDown.custom_draw(x,y,k)
mouseMove.custom_draw(x,y)
function mouseDown.custom_field(x,y,k)
mouseMove.custom_field(x,y)
end
function mouseMove.custom_draw(x,y,dx,dy)
function mouseMove.custom_field(x,y,dx,dy)
local sx,sy=int((x-200)/30)+1,20-int((y-60)/30)
if sx<1 or sx>10 then sx=nil end
if sy<1 or sy>20 then sy=nil end
@@ -1701,7 +1668,7 @@ do--custom_draw
preField[sy][sx]=ms.isDown(1)and sceneTemp.pen or ms.isDown(2)and -1 or 0
end
end
function wheelMoved.custom_draw(x,y)
function wheelMoved.custom_field(x,y)
local pen=sceneTemp.pen
if y<0 then
pen=pen+1
@@ -1712,10 +1679,10 @@ do--custom_draw
end
sceneTemp.pen=pen
end
function touchDown.custom_draw(id,x,y)
mouseMove.custom_draw(x,y)
function touchDown.custom_field(id,x,y)
mouseMove.custom_field(x,y)
end
function touchMove.custom_draw(id,x,y,dx,dy)
function touchMove.custom_field(id,x,y,dx,dy)
local sx,sy=int((x-200)/30)+1,20-int((y-60)/30)
if sx<1 or sx>10 then sx=nil end
if sy<1 or sy>20 then sy=nil end
@@ -1724,7 +1691,7 @@ do--custom_draw
preField[sy][sx]=sceneTemp.pen
end
end
function keyDown.custom_draw(key)
function keyDown.custom_field(key)
local sx,sy,pen=sceneTemp.x,sceneTemp.y,sceneTemp.pen
if key=="up"or key=="down"or key=="left"or key=="right"then
if not sx then sx=1 end
@@ -1749,12 +1716,6 @@ do--custom_draw
if sx and sy then
preField[sy][sx]=pen
end
elseif key=="tab"then
if kb.isDown("lshift","rshift")then
SCN.swapTo("custom_seq","swipeR")
else
SCN.swapTo("custom_mission","swipeL")
end
elseif key=="escape"then
SCN.back()
elseif key=="k"then
@@ -1797,15 +1758,13 @@ do--custom_draw
sceneTemp.x,sceneTemp.y,sceneTemp.pen=sx,sy,pen
end
function Tmr.custom_draw()
function Tmr.custom_field()
if sceneTemp.sure>0 then sceneTemp.sure=sceneTemp.sure-1 end
end
function Pnt.custom_draw()
local sx,sy=sceneTemp.x,sceneTemp.y
gc.setColor(.7,.7,.7)
mText(drawableText.field,350,5)
function Pnt.custom_field()
local S=sceneTemp
local sx,sy=S.x,S.y
--Field
gc.translate(200,60)
@@ -1822,7 +1781,7 @@ do--custom_draw
local B=preField[y][x]
if B>0 then
gc.draw(blockSkin[B],30*x-30,600-30*y)
elseif B==-1 and not sceneTemp.demo then
elseif B==-1 and not S.demo then
gc.draw(cross,30*x-30,600-30*y)
end
end end
@@ -1833,7 +1792,7 @@ do--custom_draw
gc.translate(-200,-60)
--Pen
local pen=sceneTemp.pen
local pen=S.pen
if pen>0 then
gc.setLineWidth(13)
gc.setColor(SKIN.libColor[pen])
@@ -1846,8 +1805,8 @@ do--custom_draw
end
--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,1180,290)
end
@@ -1937,12 +1896,6 @@ do--custom_mission
else
LOG.print(text.dataCorrupted,color.red)
end
elseif key=="tab"then
if kb.isDown("lshift","rshift")then
SCN.swapTo("custom_draw","swipeR")
else
SCN.swapTo("custom_basic","swipeL")
end
elseif key=="escape"then
SCN.back()
elseif type(key)=="number"then
@@ -1976,10 +1929,6 @@ do--custom_mission
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)
@@ -2649,7 +2598,6 @@ do--setting_game
function Pnt.setting_game()
gc.setColor(1,1,1)
mText(drawableText.setting_game,640,15)
gc.draw(blockSkin[int(Timer()*2)%11+1],590,540,Timer()%6.28319,2,nil,15,15)
end
end
@@ -2660,11 +2608,6 @@ do--setting_video
function sceneBack.setting_video()
FILE.saveSetting()
end
function Pnt.setting_video()
gc.setColor(1,1,1)
mText(drawableText.setting_video,640,15)
end
end
do--setting_sound
function sceneInit.setting_sound()
@@ -2702,7 +2645,6 @@ do--setting_sound
function Pnt.setting_sound()
gc.setColor(1,1,1)
mText(drawableText.setting_sound,640,15)
local t=Timer()
local _=sceneTemp.jump
local x,y=800,340+10*sin(t*.5)+(_-10)*_*.3
@@ -2782,11 +2724,6 @@ do--setting_control
gc.line(550,530,550,630)
gc.line(950,530,950,630)
--Texts
gc.setColor(1,1,1)gc.draw(drawableText.setting_control,80,50)
setFont(50)
gc.printf(text.preview,320,540,200,"right")
--Testing O mino
_=blockSkin[setting.skin[6]]
local x=550+40*sceneTemp.pos
@@ -2898,13 +2835,6 @@ do--setting_key
)
--Selection rect
gc.setColor(1,.3,.3)
mText(drawableText.keyboard,340,30)
mText(drawableText.keyboard,940,30)
gc.setColor(.3,.3,1)
mText(drawableText.joystick,540,30)
mText(drawableText.joystick,1140,30)
gc.setColor(1,1,1)
setFont(26)
local b1,b2=keyMap[S.board],keyMap[S.board+2]
@@ -2927,14 +2857,13 @@ do--setting_key
gc.line(40,y,1240,y)
end
setFont(35)
gc.print(text.page..S.board,280,590)
gc.draw(drawableText.ctrlSetHelp,50,650)
gc.print(text.page..S.board,280,570)
end
end
do--setting_skin
local scs=spinCenters
function Pnt.setting_skin()
gc.setColor(1,1,1)gc.draw(drawableText.setting_skin,80,50)
gc.setColor(1,1,1)
for N=1,7 do
local face=setting.face[N]
local B=blocks[N][face]
@@ -3109,11 +3038,10 @@ do--music
end
function Pnt.music()
gc.setColor(1,1,1)gc.draw(drawableText.musicRoom,22,23)
gc.setColor(1,1,1)
gc.draw(drawableText.right,270,350+10)
setFont(50)
gc.print(BGM.list[sceneTemp],320,350+5)
gc.print(BGM.list[sceneTemp],320,355)
setFont(35)
if sceneTemp>1 then gc.print(BGM.list[sceneTemp-1],320,350-30)end
if sceneTemp<BGM.len then gc.print(BGM.list[sceneTemp+1],320,350+65)end
@@ -3123,7 +3051,6 @@ do--music
gc.draw(IMG.title,840,220,nil,1.5,nil,206,35)
if BGM.nowPlay then
gc.draw(drawableText.nowPlaying,700-drawableText.nowPlaying:getWidth(),500)
setFont(50)
gc.setColor(sin(Timer()*.5)*.2+.8,sin(Timer()*.7)*.2+.8,sin(Timer())*.2+.8)
gc.print(BGM.nowPlay,710,500)
@@ -3285,10 +3212,9 @@ do--dict
local scs={.5,1.5,.5,1.5,.5,1.5,.5,1.5,.5,1.5,1,1,0,2}
function Pnt.dict()
local S=sceneTemp
gc.setColor(1,1,1)
gc.draw(drawableText.dict,20,5)
gc.setLineWidth(4)
gc.setColor(1,1,1)
gc.rectangle("line",20,110,726,60)
setFont(40)
gc.print(S.input,35,110)