diff --git a/gui/dialogs/replay.xml b/gui/dialogs/replay.xml index 4f34f6a0e..aa7056b54 100644 --- a/gui/dialogs/replay.xml +++ b/gui/dialogs/replay.xml @@ -9,6 +9,33 @@ + + + # Populate the view combo box with a list of the available views + var combo = cmdarg().getNode("group").getNode("combo"); + combo.removeChildren("value"); + + var current_view = getprop("/sim/current-view/view-number"); + var i = 0; + foreach (var v; view.views) { + + var name = "Unnamed view " ~ v.getIndex(); + + if (v.getNode("name") != nil) { + name = v.getNode("name").getValue(); + } + + # Pre-populate the combo box selected value + if (v.getIndex() == current_view) { + setprop("/sim/replay/view-name", name); + } + + combo.getNode("value[" ~ i ~ "]", 1).setValue(name); + i = i + 1; + } + + + table @@ -33,42 +60,79 @@ 11 left - /sim/replay/view - 0 - 1 - 4 + /sim/replay/view-name + + dialog-apply + - + + + + 20 + right + + - - - vbox - 0 - 6 - - - - - vbox - center - left - left - left - - - - + 21 + left /sim/replay/disable dialog-apply - + + + + + left + + + + + table + + + 10 + center + + + + + 11 + left + + + + + 20 + center + + + + + 21 + left + + + + + 30 + center + + + + + 31 + left + + + + + + hbox true @@ -79,6 +143,13 @@ dialog-apply + + nasal + + replay