Board index FlightGear Development Aircraft Cockpit development

Tooltip update by two properties?  Topic is solved

Discussion about creating 2d and 3d cockpits.

Tooltip update by two properties?

Postby benih » Fri Sep 07, 2018 5:38 pm

Hello,
i have a tooltip with nasal mapping here, that computes a string based on two properties.
How can i configure it so the nasal code is triggered if either one of the two changes?
Adding a second <property> tag did not work...
User avatar
benih
 
Posts: 1710
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: Tooltip update by two properties?

Postby wlbragg » Fri Sep 07, 2018 6:13 pm

Can you show an example of what you already have, I can't follow by your description alone.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7609
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Tooltip update by two properties?

Postby Thorsten » Fri Sep 07, 2018 6:44 pm

Tie it to a third property, attach listeners to your two original properties which each adjust the third one as needed?
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Tooltip update by two properties?

Postby benih » Sat Sep 08, 2018 5:38 pm

Code example herehttps://github.com/HHS81/c182s/comm ... 527096f8ed

Tie a third property should do the trick :)
User avatar
benih
 
Posts: 1710
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: Tooltip update by two properties?  

Postby wlbragg » Sat Sep 08, 2018 8:21 pm

Tie it to a third property, attach listeners to your two original properties which each adjust the third one as needed?


You could also do that part with a filter.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7609
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070


Return to Cockpit development

Who is online

Users browsing this forum: No registered users and 1 guest