fixed main fucntion bug

Signed-off-by: Ebbe Baß <ebbe.bass>
This commit is contained in:
Ebbe Baß
2024-10-26 15:02:03 +02:00
parent 406ebe73c2
commit 29c06df5fe
+50 -50
View File
@@ -317,57 +317,57 @@ end
-- Main menu
function main()
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()
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
for i = 1, 10, 1 do
if args == "goto_sp"..tostring(i) then
Cmd("Goto Cue "..tostring(spCues[i]/1000))
end
end
else
do return end
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
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
for i = 1, 10, 1 do
if args == "goto_sp"..tostring(i) then
Cmd("Goto Cue "..tostring(spCues[i]/1000))
end
end
else
return main
end
return main