diff --git a/Zenitha b/Zenitha index 3bc7ab47..cb1844b6 160000 --- a/Zenitha +++ b/Zenitha @@ -1 +1 @@ -Subproject commit 3bc7ab473f6c6f4ab90b52e7fe0aee5acd0ad69b +Subproject commit cb1844b6c2fb5c1245f184e0283232a72bd21c40 diff --git a/assets/language/lang_en.lua b/assets/language/lang_en.lua index 0bd0d660..c3a8f0d3 100644 --- a/assets/language/lang_en.lua +++ b/assets/language/lang_en.lua @@ -295,6 +295,7 @@ local L={ musicroom_recollection="Recollection is not a song", dial_enter="Instrument?", dial_password="Password correct", + menu_fastype="You seems enjoy typing", }, -- Level diff --git a/assets/language/lang_zh.lua b/assets/language/lang_zh.lua index 367fd566..624d85c9 100644 --- a/assets/language/lang_zh.lua +++ b/assets/language/lang_zh.lua @@ -294,6 +294,7 @@ local L={ musicroom_recollection="Recollection不是一首曲子", dial_enter="乐器?", dial_password="密码正确", + menu_fastype="看起来你很喜欢打字", }, -- Level diff --git a/assets/scene/main_out.lua b/assets/scene/main_out.lua index 8255cdae..4c12dd5c 100644 --- a/assets/scene/main_out.lua +++ b/assets/scene/main_out.lua @@ -7,8 +7,12 @@ local terminalName=GC.newText(FONT.get(35)) versionText:set(VERSION.appVer) terminalName:set(("TERM[%s]"):format(SYSTEM:sub(1,3):upper())) +local secretString="techmino" +local secretInput=0 + function scene.load() PROGRESS.applyEnv('exterior') + secretInput=0 end local function sysAction(action) @@ -30,7 +34,25 @@ function scene.keyDown(key,isRep) -- elseif key=='a' then playExterior('acry/test')() return true -- end if isRep then return true end - sysAction(KEYMAP.sys:getAction(key)) + if secretInput==0 then + if key==secretString:sub(1,1) then + secretInput=1 + elseif KEYMAP.sys:getAction(key) then + sysAction(KEYMAP.sys:getAction(key)) + end + else + if key==secretString:sub(secretInput+1,secretInput+1) then + secretInput=secretInput+1 + if secretInput>=#secretString then + PROGRESS.setSecret('menu_fastype') + SCN.go('fastype') + end + else + sysAction(KEYMAP.sys:getAction(key)) + secretInput=0 + end + end + print(secretInput) return true end diff --git a/assets/scene_app/typefast.lua b/assets/scene_app/fastype.lua similarity index 90% rename from assets/scene_app/typefast.lua rename to assets/scene_app/fastype.lua index bf489d1b..ed55239f 100644 --- a/assets/scene_app/typefast.lua +++ b/assets/scene_app/fastype.lua @@ -6,6 +6,8 @@ local levels={ Z_A="ZYXWVUTSRQPONMLKJIHGFEDCBA", Tech1="TECHMINOHAOWAN", Tech2="TECHMINOISFUN", + TG1="TECHMINOGALAXYHAOWAN", + TG2="TECHMINOGALAXYISFUN", KeyTest1="THEQUICKBROWNFOXJUMPSOVERALAZYDOG", KeyTest2="THEFIVEBOXINGWIZARDSJUMPQUICKLY", Hello="HELLOWORLD", @@ -125,7 +127,7 @@ function scene.draw() end scene.widgetList={ - WIDGET.new{type='selector',name='level',text='Text',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,visibleTick=function() return state==0 end}, + WIDGET.new{type='selector',name='level',text="",x=220,y=640,w=200,list={'A_Z','Z_A','Tech1','Tech2','TG1','TG2','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,visibleTick=function() return state==0 end}, WIDGET.new{type='button', x=160,y=100,w=180,h=100,color='lG',fontSize=60,text=CHAR.icon.retry,code=WIDGET.c_pressKey'space'}, WIDGET.new{type='button', name='keyboard',x=160,y=210,w=180,h=100,fontSize=60,text=CHAR.icon.keyboard,code=function() love.keyboard.setTextInput(true,0,select(2,SCR.xOy:transformPoint(0,500)),1,1) end}, WIDGET.new{type='button', pos={1,1},x=-120,y=-80,w=160,h=80,sound_trigger='button_back',fontSize=60,text=CHAR.icon.back,code=WIDGET.c_backScn()},