Page 1 of 1
Expression widget
Posted: 21 Oct 2018 13:10
by Rafi4
Hi
I want to know about expression with overlay widget visibility. Is this possible? If yes? How?
Re: Expression widget
Posted: 21 Oct 2018 14:38
by digitalstone
Just use a script:
overlay=true
Re: Expression widget
Posted: 22 Oct 2018 03:57
by Rafi4
Hi
Digitalstone I am using an overlay name = 44 for example and the script is [44= true] is not working as I wish.any modification?
Re: Expression widget
Posted: 22 Oct 2018 07:28
by digitalstone
No i mean you should create a custom boolean variable to be able to evaluate if your overlay is on/off.
Re: Expression widget
Posted: 22 Oct 2018 08:40
by Rafi4
Hi Digitalstone
Please give me one example.
Re: Expression widget
Posted: 22 Oct 2018 10:30
by digitalstone
Place your widget overlay action.
Connect that to a script action in which you type something like: global_overlay-name = true
Then, whenever you want to check anywhere if that widget overlay is on or off, you can now just place a condition in which you type the name of your overlay variable.
Re: Expression widget
Posted: 22 Oct 2018 12:28
by Desmanto
It has been requested as feature before, to check whether an overlay is being shown or not :
viewtopic.php?f=4&t=7142
The new feature probably can query using condition "Overlay SSown". The field can have multiple overlay checkbox, support global pattern. then there is invert checkbox to reverse the logic. (needed because sometimes we want to define all other widget besides the selected ones)
As for now, use glovar to store your widget state. (sorry to rephrase digitalstone post, I have typed this finish before the post) Add action script after you have show the widget.
Then after hiding it, add script
Later you can query the glovar to check widget visibility.
Code: Select all
global_widget_callbutton; //widget is being shown?
//or global_widget_callbutton == true, above is the shortened version.
You can use glovar map type, so you don't waste so many glovar solely for this. Create a glovar to store the state of the overlay you use frequently. At glovar, create global_widget as map type. Then at the script use
Code: Select all
global_widget["callbutton"] = true; // or false when hiding it.
There you can create as many overlay state you want (example : global_widget["network stats"], global_widget["shutter button"], etc), and you only require single glovar to store all of them.