From f31f09e4d58f77817ea0bb381ea2eff10c0a039e Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sun, 9 Oct 2011 20:23:16 +0200 Subject: [PATCH 1/2] replay system: gui update --- gui/dialogs/replay.xml | 201 ++++++++++++++++++++++++++++++----------- 1 file changed, 148 insertions(+), 53 deletions(-) diff --git a/gui/dialogs/replay.xml b/gui/dialogs/replay.xml index acaef886c..d584a4c83 100644 --- a/gui/dialogs/replay.xml +++ b/gui/dialogs/replay.xml @@ -20,14 +20,40 @@ new : func( dlgRoot ) { var obj = { parents: [ReplayDialogController] }; obj.dlgRoot = dlgRoot; + obj.initViews(1); return obj; }, + # Populate the view combo box with a list of the available views + initViews : func(update) { + var combo = me.findElementByName( me.dlgRoot, "view-selector" ); + if (update) + 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 (i == current_view) { + setprop("/sim/replay/view-name", name); + } + if (update) + combo.getNode("value[" ~ i ~ "]", 1).setValue(name); + i = i + 1; + } + }, + open : func { var replaySlider = me.findElementByName( me.dlgRoot, "replay-time-slider" ); me.maxProp = replaySlider.getChild("max"); me.minProp = replaySlider.getChild("min"); - me.maxListenerId = setlistener( "/sim/speed-up", func(n) { me.updateListener(n); }, 1, 1 ); + me.speedUpListenerId = setlistener( "/sim/speed-up", func(n) { me.updateListener(n); }, 1, 1 ); + me.viewListenerId = setlistener( "/sim/current-view/view-number", func(n) { me.updateListener(n); }, 1, 1 ); if (getprop("/sim/replay/end-time")!=nil) { # update max/min range of replay-time slider @@ -45,10 +71,12 @@ SpeedUp = "1/" ~ SpeedUp; } setprop("/sim/gui/dialogs/replay/time-factor","" ~ SpeedUp ~ "x"); + me.initViews(0); }, close : func { - #removelistener( me.maxListenerId ); + removelistener( me.speedUpListenerId ); + removelistener( me.viewListenerId ); }, findElementByName : func(base,name) { @@ -66,6 +94,8 @@ var controller = ReplayDialogController.new( cmdarg() ); controller.open(); + if (props.globals.getNode("/rotors",0)!=nil) + setprop("/sim/replay/disable-my-controls",1); ]]> 1 - + + 80 + - + + + + + From 4280185393356ce9b060498ab86bcb0e11e9fefc Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sun, 9 Oct 2011 21:26:19 +0200 Subject: [PATCH 2/2] set "dme-fallback-to-loc" initial value if /sim/realism/dme-fallback-to-loc is true or absent, LOC will be treated as DME (realism is off) if /sim/realism/dme-fallback-to-loc is false, LOC will be NOT be treated as DME (realism is on) --- preferences.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/preferences.xml b/preferences.xml index f9bd58988..41e014afe 100644 --- a/preferences.xml +++ b/preferences.xml @@ -785,6 +785,9 @@ Started September 2000 by David Megginson, david@megginson.com /Aircraft/Generic/flightrecorder/generic-piston-propeller-4.xml + + false +