diff --git a/gui/dialogs/display.xml b/gui/dialogs/display.xml deleted file mode 100644 index 0323457e9..000000000 --- a/gui/dialogs/display.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - display - false - vbox - 20 - - - hbox - 1 - - - - - - 1 - - - - - - - - vbox - center - 4 - - - left - - /sim/rendering/fps-display - - dialog-apply - - - - - left - - /sim/rendering/frame-latency-display - - dialog-apply - - - - - left - - /sim/multiplay/chat-display - - dialog-apply - - - - - left - - /sim/view-name-popup - - dialog-apply - - - - - left - - /sim/panel/visibility - - dialog-apply - - - - - left - - /sim/menubar/autovisibility/enabled - - dialog-apply - - - - - hbox - 0 - - - - /sim/mouse/hide-cursor - - dialog-apply - - - - - true - 40 - 10 - - /sim/mouse/hide-cursor - - /sim/mouse/cursor-timeout-sec - - dialog-apply - - - - - - - - - - - - - - - diff --git a/gui/dialogs/view.xml b/gui/dialogs/view.xml index 1bd235bd3..cfb398e68 100644 --- a/gui/dialogs/view.xml +++ b/gui/dialogs/view.xml @@ -2,8 +2,62 @@ view + + + + + + + + var group = gui.findElementByName(cmdarg(), "active-views"); + var ac = getprop("/sim/aircraft"); + group.removeChildren("checkbox"); + group.removeChildren("hrule"); + group.removeChildren("text"); + + var t = group.getChild("text", 0, 1); + t.getNode("label", 1).setValue("Standard Views"); + t.getNode("halign", 1).setValue("left"); + + + var mode = 0; + foreach (var v; view.views) { + var index = v.getIndex(); + var enabled = v.initNode("enabled", 1, "BOOL"); + var name = v.getNode("name"); + if (name != nil) { + if (index >= 200) { + if (mode != 2) { + mode = 2; + group.getChild("empty", 1, 1).getChild("stretch", 0, 1).setValue(1); + var t = group.getChild("text", 1, 1); + t.getNode("label", 1).setValue("Other Views"); + } + + } elsif (index >= 100) { + aircraft.data.add(enabled); + if (mode != 1) { + mode = 1; + group.getChild("empty", 0, 1).getChild("stretch", 0, 1).setValue(1); + var t = group.getChild("text", 1, 1); + t.getNode("label", 1).setValue("\"" ~ ac ~ "\" Specific Views"); + t.getNode("halign", 1).setValue("left"); + } + } + + var target = group.getChild("checkbox", index, 1); + props.copy(group.getNode("checkbox-template"), target); + target.getNode("label").setValue(name != nil ? name.getValue() : ("** unnamed view " ~ index ~ " **")); + target.getNode("property").setValue(enabled.getPath()); + } + } + + + false vbox + + hbox @@ -28,64 +82,137 @@ + + + hbox + + + vbox + + + + - - - + + vbox + center + active-views - - - var group = cmdarg().getChildren("group")[1]; - var ac = getprop("/sim/aircraft"); - group.removeChildren("checkbox"); - group.removeChildren("hrule"); - group.removeChildren("text"); - var mode = 0; - foreach (var v; view.views) { - var index = v.getIndex(); - var enabled = v.initNode("enabled", 1, "BOOL"); - var name = v.getNode("name"); - if (name != nil) { - if (index >= 200) { - if (mode != 2) { - mode = 2; - group.getChild("hrule", 1, 1); - var t = group.getChild("text", 1, 1); - t.getNode("label", 1).setValue("Other Views"); - } + + left + + + + + left + + + + dialog-apply + + + + + + + + + vbox + center + top + + + + - } elsif (index >= 100) { - aircraft.data.add(enabled); - if (mode != 1) { - mode = 1; - group.getChild("hrule", 0, 1); - var t = group.getChild("text", 0, 1); - t.getNode("label", 1).setValue("\"" ~ ac ~ "\" Specific Views"); - } - } + + left + + /sim/rendering/fps-display + + dialog-apply + + - var target = group.getChild("checkbox", index, 1); - props.copy(group.getNode("checkbox-template"), target); - target.getNode("label").setValue(name != nil ? name.getValue() : ("** unnamed view " ~ index ~ " **")); - target.getNode("property").setValue(enabled.getPath()); - } - } - - + + left + + /sim/rendering/frame-latency-display + + dialog-apply + + - - vbox - center + + left + + /sim/multiplay/chat-display + + dialog-apply + + - - left - - - - dialog-apply - - - + + left + + /sim/view-name-popup + + dialog-apply + + + + + left + + /sim/panel/visibility + + dialog-apply + + + + + left + + /sim/menubar/autovisibility/enabled + + dialog-apply + + + + + hbox + 0 + + + + /sim/mouse/hide-cursor + + dialog-apply + + + + + true + 40 + 10 + + /sim/mouse/hide-cursor + + /sim/mouse/cursor-timeout-sec + + dialog-apply + + + + + + + + + + + + diff --git a/gui/menubar.xml b/gui/menubar.xml index 3316872ec..c3c1852f4 100644 --- a/gui/menubar.xml +++ b/gui/menubar.xml @@ -80,14 +80,6 @@ view - - display-options - - dialog-show - display - - - rendering-options