From f76e302908d1cd87cfb2f70ae931c9d33e544c43 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Tue, 11 Oct 2011 22:09:01 +0200 Subject: [PATCH] Map dialog transparency option Helpful when keeping the map dialog open while flying. --- gui/dialogs/map.xml | 90 ++++++++++++++++++++++++++++----------- gui/dialogs/stopwatch.xml | 30 +++++++++++++ 2 files changed, 96 insertions(+), 24 deletions(-) diff --git a/gui/dialogs/map.xml b/gui/dialogs/map.xml index c80efd179..d2d1f6dac 100644 --- a/gui/dialogs/map.xml +++ b/gui/dialogs/map.xml @@ -16,9 +16,31 @@ command interface /autopilot/route-manager/input: vbox true + + 0.41 + 0.4 + 0.42 + 1.0 + 1.0 + + - + var mapDialog = cmdarg(); + var setTransparency = func(updateDialog){ + var alpha = (getprop("/gui/map/transparent") or 0); + mapDialog.getNode("color/alpha").setValue(1-alpha*0.3); + mapDialog.getNode("color/red").setValue(0.41-alpha*0.2); + mapDialog.getNode("color/green").setValue(0.4-alpha*0.2); + mapDialog.getNode("color/blue").setValue(0.42-alpha*0.2); + var n = props.Node.new({ "dialog-name": "map" }); + if (updateDialog) + { + fgcommand("dialog-close", n); + fgcommand("dialog-show", n); + } + } + setTransparency(0); @@ -128,6 +150,19 @@ command interface /autopilot/route-manager/input: true + + + 100 + /gui/map/magnetic-headings + true + + dialog-apply + + + property-toggle + + + 100 @@ -155,9 +190,9 @@ command interface /autopilot/route-manager/input: - + 100 - /gui/map/magnetic-headings + /gui/map/transparent true dialog-apply @@ -165,11 +200,16 @@ command interface /autopilot/route-manager/input: property-toggle + + nasal + + true - + + property-adjust + /gui/map/zoom + 0 + -1 + + + Zoom %d @@ -222,17 +263,18 @@ command interface /autopilot/route-manager/input: + + property-adjust + /gui/map/zoom + 1 + 12 + + diff --git a/gui/dialogs/stopwatch.xml b/gui/dialogs/stopwatch.xml index a2154c1f5..95a5fff4f 100644 --- a/gui/dialogs/stopwatch.xml +++ b/gui/dialogs/stopwatch.xml @@ -7,6 +7,12 @@ 8 -5 5 + + 0.2 + 0.2 + 0.2 + 0.7 + @@ -104,6 +110,12 @@ Start true 47 + + 0.3 + 0.3 + 0.3 + 0.8 + nasal @@ -114,6 +126,12 @@ Stop true 47 + + 0.3 + 0.3 + 0.3 + 0.8 + nasal @@ -124,6 +142,12 @@ Reset Delete 47 + + 0.3 + 0.3 + 0.3 + 0.8 + nasal @@ -132,6 +156,12 @@