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 -- 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, for i = 1, tablelength(cues), 1 do
message_align_v = Enums.AlignmentV.Top, cue = cues[i]:Children()[1]
commands = { cueNo = cues[i].no
{value = 2, name = "Create a song"}, if cue.appearance then
{value = 1, name = "Entry Point"}, if cue.appearance.name == "Start Point" then
{value = 3, name = "Install"}, table.insert(spCues, tonumber(cueNo))
{value = 0, name = "Exit"} end
}, end
backColor = "Global.Default", end
icon = "logo_small", for i = 1, 10, 1 do
titleTextColor = "Global.Text", if args == "goto_sp"..tostring(i) then
messageTextColor = "Global.Text" Cmd("Goto Cue "..tostring(spCues[i]/1000))
} end
) end
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 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
end end
if args then return main
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