From 8c9e45ade3b738d31ffbcdc4f43a39f37927971e Mon Sep 17 00:00:00 2001 From: Julian Smith Date: Sun, 3 Oct 2021 08:23:57 +0100 Subject: [PATCH] Added simple highlighting dialogue on the 'Help' menu. gui/dialogs/highlighting.xml Enable/disable highlighting dialog, plus shows highlighted dialog names etc. gui/menubar.xml Added link to highlight dialog to help menu. --- gui/dialogs/highlighting.xml | 88 ++++++++++++++++++++++++++++++++++++ gui/menubar.xml | 9 ++++ 2 files changed, 97 insertions(+) create mode 100644 gui/dialogs/highlighting.xml diff --git a/gui/dialogs/highlighting.xml b/gui/dialogs/highlighting.xml new file mode 100644 index 000000000..cedbc3d06 --- /dev/null +++ b/gui/dialogs/highlighting.xml @@ -0,0 +1,88 @@ + + + + + highlighting + vbox + true + 6 + + + + hbox + 1 + + + + + + 1 + + + + + + + + + 0 + 0 + sim/highlighting/enabled + + + dialog-apply + + + + + + + + property-list + 200 + 200 + fill + fill + true + /sim/highlighting/current-ptr + true + + dialog-apply + property-list + + + + + + printf("open"); + var self = cmdarg(); + var dlgname = self.getNode("name").getValue(); + var dlg = props.globals.getNode("/sim/gui/dialogs/" ~ dlgname, 1); + var update_interval = 0.5; + + var update = func(w) { + self.setValues({ "dialog-name": dlgname, "object-name": w }); + fgcommand("dialog-update", self); + } + var auto_update = func { + update("property-list"); + if (update_interval) + settimer(auto_update, update_interval, 1); + } + auto_update(); + + + update_interval = 0; + + + + diff --git a/gui/menubar.xml b/gui/menubar.xml index cc37ad4e4..a8a7c4b12 100644 --- a/gui/menubar.xml +++ b/gui/menubar.xml @@ -1049,6 +1049,15 @@ + + highlighting + + + dialog-show + highlighting + + + false