save vbox 1 false 500 hbox true true table 0 0 0 1 0 2 save-slots 1 0 110 /sim/gui/dialogs/c172p/save/selected Slot 1 Slot 2 Slot 3 Slot 4 Slot 5 dialog-apply save-slots nasal dialog-update save-description 1 1 save-description fill true 200 100 0 true true false /sim/gui/dialogs/c172p/save/description 1 2 save-timestamp fill true 150 100 0 false true true /sim/gui/dialogs/c172p/save/timestamp 4 4 table 12 hbox 6 true var read_description = func { setprop("/save/description", ""); setprop("/save/timestring", ""); var string = ""; var sel_slot = getprop("/sim/gui/dialogs/c172p/save/selected"); if (sel_slot == "Slot 1") {string = "save1.xml";} else if (sel_slot == "Slot 2") {string = "save2.xml";} else if (sel_slot == "Slot 3") {string = "save3.xml";} else if (sel_slot == "Slot 4") {string = "save4.xml";} else if (sel_slot == "Slot 5") {string = "save5.xml";} c172p.read_state_from_file(string); var description = getprop("/save/description"); var timestamp = getprop("/save/timestring"); setprop("/sim/gui/dialogs/c172p/save/description", description); setprop("/sim/gui/dialogs/c172p/save/timestamp", timestamp); setprop("/sim/gui/dialogs/c172p/save/filename", string); }