修复录像菜单添加第一个录像/删除最后一个录像后按钮显示状态没变 close #736
This commit is contained in:
@@ -62,14 +62,17 @@ local function _playRep(fileName)
|
||||
end
|
||||
end
|
||||
|
||||
function scene.sceneInit()
|
||||
BG.set()
|
||||
listBox:setList(REPLAY)
|
||||
local function _updateButtonVisibility()
|
||||
local hide=listBox:getLen()==0
|
||||
for i=3,5 do
|
||||
scene.widgetList[i].hide=hide
|
||||
end
|
||||
end
|
||||
function scene.sceneInit()
|
||||
BG.set()
|
||||
listBox:setList(REPLAY)
|
||||
_updateButtonVisibility()
|
||||
end
|
||||
|
||||
function scene.keyDown(key)
|
||||
if key=='return' or key=='kpenter' then
|
||||
@@ -101,6 +104,7 @@ function scene.keyDown(key)
|
||||
if rep.available then
|
||||
if saveFile(fileData,fileName,'-d') then
|
||||
table.insert(REPLAY,1,rep)
|
||||
_updateButtonVisibility()
|
||||
MES.new('info',text.importSuccess)
|
||||
end
|
||||
else
|
||||
@@ -121,6 +125,7 @@ function scene.keyDown(key)
|
||||
break
|
||||
end
|
||||
end
|
||||
_updateButtonVisibility()
|
||||
SFX.play('finesseError',.7)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user