1
0
Fork 0

change global dynamic-view flag from /sim/view[0]/dynamic/enabled to

/sim/current-view/dynamic-view. There are additionally <dynamic-view>
settings per view, but those only enable it for that view if it's
globally turned on.
This commit is contained in:
mfranz 2007-11-03 14:08:39 +00:00
parent 67a850560b
commit 99bcbe8ea5
3 changed files with 4 additions and 6 deletions

View file

@ -323,7 +323,7 @@ view_manager.default_helicopter = func {
# Update loop for the whole dynamic view manager. It only runs if
# /sim/view[0]/dynamic/enabled is true.
# /sim/current-view/dynamic-view is true.
#
var main_loop = func(id) {
id == loop_id or return;
@ -427,7 +427,7 @@ _setlistener("/sim/signals/nasal-dir-initialized", func {
}
settimer(func {
setlistener("/sim/view/dynamic/enabled", func(n) {
setlistener("/sim/current-view/dynamic-view", func(n) {
dynamic_view = n.getBoolValue();
loop_id += 1;
view.resetView();

View file

@ -109,7 +109,7 @@
<binding>
<command>nasal</command>
<script>
var p = "/sim/view/dynamic/enabled";
var p = "/sim/current-view/dynamic-view";
setprop(p, var i = !getprop(p));
gui.popupTip("Dynamic View " ~ (i ? "enabled" : "disabled"));
</script>

View file

@ -167,6 +167,7 @@ Started September 2000 by David Megginson, david@megginson.com
<current-view>
<field-of-view type="double">55.0</field-of-view>
<aspect-ratio-multiplier type="double">1.0</aspect-ratio-multiplier>
<dynamic-view type="bool" userarchive="y">false</dynamic-view>
</current-view>
<panel>
<path>Aircraft/Generic/Panels/generic-vfr-panel.xml</path>
@ -280,9 +281,6 @@ Started September 2000 by David Megginson, david@megginson.com
<front-right-direction-deg type="double">315</front-right-direction-deg>
<dynamic-view type="bool">true</dynamic-view>
</config>
<dynamic>
<enabled type="bool" userarchive="y">false</enabled>
</dynamic>
</view>
<view>