Panel scripting - use of button and visibility

Help creating logic scripts for Air Manager Instruments

Moderators: russ, Ralph

Message
Author
SimPassion
Posts: 5346
Joined: Thu Jul 27, 2017 12:22 am

Re: Panel scripting - use of button and visibility

#41 Post by SimPassion »

Good example and idea Keith

Gilles

User avatar
Sling
Posts: 5241
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Panel scripting - use of button and visibility

#42 Post by Sling »

Right. So having a transparent window in a panel works only for non AM apps below but not for another instrument or panel below. I think this is why it confused me. If it could be made to work for the later case I agree it would be a good enhancement for AM.

Tony

User avatar
Corjan
Posts: 2941
Joined: Thu Nov 19, 2015 9:04 am

Re: Panel scripting - use of button and visibility

#43 Post by Corjan »

Hi,


Well, it can go through instruments when there is no node at all.
It won't go through if it finds any node type, so also images (the problem in this case).

I think this should be changed. But I'm not going to make this change in AM 3.7, since it might break stuff.

My idea is to change the default behavior in AM 4.0, andalso expand mouse_setting/touch_setting so you can configure if a node should consume the mouse/touch event.


Corjan

User avatar
Sling
Posts: 5241
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Panel scripting - use of button and visibility

#44 Post by Sling »

That would be good Corjan. Thanks for the update.

User avatar
Sling
Posts: 5241
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Panel scripting - use of button and visibility

#45 Post by Sling »

Well I have had a little play with this and come up with a workable solution that makes all 3 of my methods work as expected. It involves tricking windows, Well kinda. What i did was add a small button sized canvas in the panel script before the button. I then set this canvas to an opacity of 0.01. To the eye Its as good as transparent but because its not totally transparent windows does not try to click through and therefore my button works with all methods. A bit hacky but totally workable.

Unfortunately the only method I can see for the instrument on top of another instrument issue is to split the top instrument in to multiple pieces so it does not cover the instrument below. Not at all ideal. Especially with am analog cockpit panel that has lots of instrument with controls. Waiting for the AM 4 solution would probably be best in this instance.

Tony

Post Reply