1
0
Fork 0

Correction of the arrangement of controls for "Devel extensions" dialog

This commit is contained in:
Roman Ludwicki 2022-09-27 21:10:56 +02:00
parent 1a495a8ba9
commit fc60ae32c9

View file

@ -4,6 +4,8 @@
<name>devel-extensions</name>
<modal>false</modal>
<layout>vbox</layout>
<default-padding>5</default-padding>
<nasal>
<open>
<![CDATA[
@ -14,27 +16,28 @@
[3, "+ Camera"],
[4, "+ Viewer Scene"],
];
var osg_stats = cmdarg().getChildren("group")[1].getChildren("combo")[0];
var osg_stats = cmdarg().getChildren("group")[1].getChildren("group")[0].getChildren("combo")[0];
var i = 0;
foreach (var s; osg_debug) {
var nm = s[0] ~ " " ~ s[1];
# print("setting node to ", nm);
osg_stats.getNode("value[" ~ i ~ "]", 1).setValue(nm);
if (i == getprop("/sim/rendering/on-screen-statistics"))
if (i == getprop("/sim/rendering/on-screen-statistics")) {
setprop("/sim/gui/dialogs/devel-extensions/on-screen-statistics", nm);
}
i += 1;
}
var updateOSG_stats = func(n) {
var sel_mode = n.getValue();
if( sel_mode == nil ) return;
if (sel_mode == nil) {
return;
}
print("\nupdate OSG debug ", sel_mode);
foreach (var s; osg_debug)
{
if(s[0] == sel_mode)
{
foreach (var s; osg_debug) {
if (s[0] == sel_mode) {
print(" >> ", s[1]);
setprop("/sim/gui/dialogs/devel-extensions/on-screen-statistics", s[0] ~ " " ~ s[1]);
gui.dialog_update("devel-extensions", "OSGdebug");
@ -66,10 +69,36 @@
osg debug (0,1,2,3,4)
reload shaders.-->
<!-- Title bar with close button -->
<group>
<layout>hbox</layout>
<default-padding>1</default-padding>
<empty>
<stretch>true</stretch>
</empty>
<text>
<label>Configure Development Extensions</label>
</text>
<empty>
<stretch>true</stretch>
</empty>
<button>
<legend/>
<key>Esc</key>
<pref-width>16</pref-width>
<pref-height>16</pref-height>
<border>2</border>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
<hrule/>
<group>
@ -93,16 +122,13 @@
<command>dialog-apply</command>
</binding>
</checkbox>
</group>
<group>
<layout>vbox</layout>
<!--muultiplayer debug checkboxes
loopback
log outgoing properties 2
dump & 4
trace incoming properties.-->
<halign>center</halign>
<halign>left</halign>
<checkbox>
<halign>left</halign>
<label>Local loopback of model</label>
@ -121,13 +147,22 @@
</binding>
</checkbox>
<group>
<layout>table</layout>
<halign>left</halign>
<text>
<row>0</row>
<col>0</col>
<label>OSG statistics</label>
<halign>right</halign>
</text>
<combo>
<row>5</row>
<row>0</row>
<col>1</col>
<pref-width>300</pref-width>
<halign>left</halign>
<name>OSGdebug</name>
<label>OSG statistics</label>
<property>/sim/gui/dialogs/devel-extensions/on-screen-statistics</property>
<editable>false</editable>
<binding>
@ -145,13 +180,19 @@
</script>
</binding>
</combo>
<text>
<row>1</row>
<col>0</col>
<label>OSG log level</label>
<halign>right</halign>
</text>
<combo>
<row>5</row>
<col>2</col>
<row>1</row>
<col>1</col>
<pref-width>300</pref-width>
<halign>left</halign>
<name>OSGLog</name>
<label>OSG log level</label>
<property>/sim/rendering/osg-notify-level</property>
<value>DEBUG_FP</value>
<value>DEBUG_INFO</value>
@ -165,13 +206,19 @@
<object-name>OSGLog</object-name>
</binding>
</combo>
<text>
<row>2</row>
<col>0</col>
<label>FG log level</label>
<halign>right</halign>
</text>
<combo>
<row>5</row>
<col>3</col>
<row>2</row>
<col>1</col>
<pref-width>300</pref-width>
<halign>left</halign>
<name>SGLogging</name>
<label>FG log</label>
<property>/sim/logging/priority</property>
<value>alert</value>
<value>warn</value>
@ -185,9 +232,12 @@
</binding>
</combo>
</group>
</group>
<group>
<layout>hbox</layout>
<halign>center</halign>
<halign>left</halign>
<button>
<legend>New Canvas Map</legend>
<binding>
@ -196,10 +246,15 @@
</binding>
</button>
</group>
<group>
<layout>hbox</layout>
<layout>table</layout>
<halign>left</halign>
<button>
<row>0</row>
<col>0</col>
<halign>fill</halign>
<legend>Reload GUI</legend>
<name>reload-gui</name>
<binding>
@ -207,7 +262,11 @@
<subsystem>gui</subsystem>
</binding>
</button>
<button>
<row>0</row>
<col>1</col>
<halign>fill</halign>
<name>reload-input</name>
<legend>Reload Input</legend>
<binding>
@ -217,6 +276,9 @@
</button>
<button>
<row>0</row>
<col>2</col>
<halign>fill</halign>
<name>reload-hud</name>
<legend>Reload Hud</legend>
<binding>
@ -226,17 +288,20 @@
</button>
<button>
<row>0</row>
<col>3</col>
<halign>fill</halign>
<name>reload-panel</name>
<legend>Reload Panel</legend>
<binding>
<command>panel-load</command>
</binding>
</button>
</group>
<group>
<layout>hbox</layout>
<halign>let</halign>
<button>
<row>1</row>
<col>0</col>
<halign>fill</halign>
<name>reload-autopilot</name>
<legend>Reload Autopilot</legend>
<binding>
@ -246,6 +311,9 @@
</button>
<button>
<row>1</row>
<col>1</col>
<halign>fill</halign>
<name>reload-network</name>
<legend>Reload Network</legend>
<binding>
@ -255,6 +323,9 @@
</button>
<button>
<row>1</row>
<col>2</col>
<halign>fill</halign>
<name>reload-model</name>
<legend>Reload Aircraft Model</legend>
<binding>
@ -263,18 +334,21 @@
</binding>
</button>
</group>
<group>
<layout>hbox</layout>
<halign>left</halign>
<button>
<row>1</row>
<col>3</col>
<halign>fill</halign>
<name>reload-shaders</name>
<legend>Reload Shaders</legend>
<binding>
<command>reload-shaders</command>
</binding>
</button>
<button>
<row>2</row>
<col>0</col>
<halign>fill</halign>
<name>reload-materials</name>
<legend>Reload Materials</legend>
<binding>
@ -283,7 +357,9 @@
</button>
<button>
<width>20</width>
<row>2</row>
<col>1</col>
<halign>fill</halign>
<name>reload-scenery</name>
<legend>Reload Scenery</legend>
<binding>
@ -293,14 +369,17 @@
</button>
<button>
<row>2</row>
<col>2</col>
<halign>fill</halign>
<name>reload-compositor</name>
<legend>Reload Compositor</legend>
<binding>
<command>reload-compositor</command>
</binding>
</button>
</group>
<button>
<legend>Close</legend>
<default>true</default>