第一次启动会自动进入语言设置菜单 close #150
This commit is contained in:
5
main.lua
5
main.lua
@@ -27,6 +27,7 @@ MOBILE=SYSTEM=='Android'or SYSTEM=='iOS'
|
|||||||
SAVEDIR=fs.getSaveDirectory()
|
SAVEDIR=fs.getSaveDirectory()
|
||||||
|
|
||||||
--Global Vars & Settings
|
--Global Vars & Settings
|
||||||
|
FIRSTLAUNCH=false
|
||||||
DAILYLAUNCH=false
|
DAILYLAUNCH=false
|
||||||
|
|
||||||
--System setting
|
--System setting
|
||||||
@@ -265,6 +266,10 @@ end
|
|||||||
do
|
do
|
||||||
local needSave
|
local needSave
|
||||||
|
|
||||||
|
if not fs.getInfo('conf/data')then
|
||||||
|
FIRSTLAUNCH=true
|
||||||
|
needSave=true
|
||||||
|
end
|
||||||
if type(STAT.version)~='number'then
|
if type(STAT.version)~='number'then
|
||||||
STAT.version=0
|
STAT.version=0
|
||||||
needSave=true
|
needSave=true
|
||||||
|
|||||||
@@ -144,9 +144,14 @@ end
|
|||||||
|
|
||||||
function scene.mouseDown()
|
function scene.mouseDown()
|
||||||
if LOADED then
|
if LOADED then
|
||||||
|
if FIRSTLAUNCH then
|
||||||
|
SCN.push('main')
|
||||||
|
SCN.swapTo('lang')
|
||||||
|
else
|
||||||
SCN.swapTo(SETTING.simpMode and'main_simple'or'main')
|
SCN.swapTo(SETTING.simpMode and'main_simple'or'main')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
scene.touchDown=scene.mouseDown
|
scene.touchDown=scene.mouseDown
|
||||||
function scene.keyDown(key)
|
function scene.keyDown(key)
|
||||||
if key=="escape"then
|
if key=="escape"then
|
||||||
|
|||||||
Reference in New Issue
Block a user