fixed main fucntion bug
Signed-off-by: Ebbe Baß <ebbe.bass>
This commit is contained in:
+48
-48
@@ -317,57 +317,57 @@ end
|
|||||||
-- Main menu
|
-- Main menu
|
||||||
|
|
||||||
function main()
|
function main()
|
||||||
local resultTable = MessageBox(
|
if args then
|
||||||
{
|
local cues = SelectedSequence():Children()
|
||||||
title = "Song Tool - Main Menu",
|
local spCues = {}
|
||||||
message = "Select what you want to do:",
|
|
||||||
message_align_h = Enums.AlignmentH.Left,
|
|
||||||
message_align_v = Enums.AlignmentV.Top,
|
|
||||||
commands = {
|
|
||||||
{value = 2, name = "Create a song"},
|
|
||||||
{value = 1, name = "Entry Point"},
|
|
||||||
{value = 3, name = "Install"},
|
|
||||||
{value = 0, name = "Exit"}
|
|
||||||
},
|
|
||||||
backColor = "Global.Default",
|
|
||||||
icon = "logo_small",
|
|
||||||
titleTextColor = "Global.Text",
|
|
||||||
messageTextColor = "Global.Text"
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
local m_selection = resultTable.result
|
for i = 1, tablelength(cues), 1 do
|
||||||
if m_selection == 0 then
|
cue = cues[i]:Children()[1]
|
||||||
do return end
|
cueNo = cues[i].no
|
||||||
elseif m_selection == 1 then
|
if cue.appearance then
|
||||||
StartPointMenu()
|
if cue.appearance.name == "Start Point" then
|
||||||
elseif m_selection == 2 then
|
table.insert(spCues, tonumber(cueNo))
|
||||||
CreatorMenu()
|
end
|
||||||
elseif m_selection == 3 then
|
|
||||||
Installer()
|
|
||||||
else
|
|
||||||
do return end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if args then
|
|
||||||
local cues = SelectedSequence():Children()
|
|
||||||
local spCues = {}
|
|
||||||
|
|
||||||
for i = 1, tablelength(cues), 1 do
|
|
||||||
cue = cues[i]:Children()[1]
|
|
||||||
cueNo = cues[i].no
|
|
||||||
if cue.appearance then
|
|
||||||
if cue.appearance.name == "Start Point" then
|
|
||||||
table.insert(spCues, tonumber(cueNo))
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
for i = 1, 10, 1 do
|
||||||
for i = 1, 10, 1 do
|
if args == "goto_sp"..tostring(i) then
|
||||||
if args == "goto_sp"..tostring(i) then
|
Cmd("Goto Cue "..tostring(spCues[i]/1000))
|
||||||
Cmd("Goto Cue "..tostring(spCues[i]/1000))
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
local resultTable = MessageBox(
|
||||||
|
{
|
||||||
|
title = "Song Tool - Main Menu",
|
||||||
|
message = "Select what you want to do:",
|
||||||
|
message_align_h = Enums.AlignmentH.Left,
|
||||||
|
message_align_v = Enums.AlignmentV.Top,
|
||||||
|
commands = {
|
||||||
|
{value = 2, name = "Create a song"},
|
||||||
|
{value = 1, name = "Entry Point"},
|
||||||
|
{value = 3, name = "Install"},
|
||||||
|
{value = 0, name = "Exit"}
|
||||||
|
},
|
||||||
|
backColor = "Global.Default",
|
||||||
|
icon = "logo_small",
|
||||||
|
titleTextColor = "Global.Text",
|
||||||
|
messageTextColor = "Global.Text"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
local m_selection = resultTable.result
|
||||||
|
if m_selection == 0 then
|
||||||
|
do return end
|
||||||
|
elseif m_selection == 1 then
|
||||||
|
StartPointMenu()
|
||||||
|
elseif m_selection == 2 then
|
||||||
|
CreatorMenu()
|
||||||
|
elseif m_selection == 3 then
|
||||||
|
Installer()
|
||||||
|
else
|
||||||
|
do return end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
|
||||||
return main
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return main
|
||||||
Reference in New Issue
Block a user