-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain_menu.ks
More file actions
32 lines (29 loc) · 1.07 KB
/
main_menu.ks
File metadata and controls
32 lines (29 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
runoncepath("lib_list_dialog").
runoncepath("lib_maneuvers").
set main_actions to list("Maneuver","Mission","Fueling","Exit").
set maneuver_actions to list("Launch","Sun orient","Approach","Dock","Exit").
until 0 {
set action to open_list_dialog("Select action", main_actions).
if main_actions[action] = "Exit" { break. }
if main_actions[action] = "Mission" {
if exists("mission.ks") {
runpath("mission.ks").
}
}
print "Action is " + action.
print "Actions: ".
print main_actions.
if action <= main_actions:length and main_actions[action] = "Maneuver" {
// standard submenu maneuvers
until 0 {
set maneuver to open_list_dialog("Select action", maneuver_actions).
if maneuver_actions[maneuver] = "Exit" { break. }
if maneuver_actions[maneuver] = "Launch" {
runpath("0:/generic_launch", 100000).
}
if maneuver_actions[maneuver] = "Sun orient" { sun_expose(). }
if maneuver_actions[maneuver] = "Approach" { runpath("approach.ks"). }
if maneuver_actions[maneuver] = "Dock" { runpath("dock.ks"). }
}
}
}