API - draw inverted text mask

Help creating logic scripts for Air Manager Instruments

Moderators: Ralph, russ

Message
Author
Detlef
Posts: 94
Joined: Mon Nov 16, 2020 9:43 am
Location: Bavaria

Re: API - draw inverted text mask

#11 Post by Detlef » Wed Apr 28, 2021 9:10 pm

Hello Jacques,
Nice idea, I like your addressing of each lamp by indexes, that should save a lot of code.

Good work!

Jacques
thank you. I try to make use of the Lua language features. It is still a lot of work especially for the annunciators because it is hard to find out when a certain light must be on. I will search for myself first and then contact Carenado.

Detlef

JackZ
Posts: 1849
Joined: Mon Feb 22, 2016 1:02 pm

Re: API - draw inverted text mask

#12 Post by JackZ » Wed Apr 28, 2021 10:53 pm

Yes I know that’s the main problem. Good luck with Carenado, they have anotoriously crappy support.

Two solutions either ways: get the state of the annunciators via a Datarefs if able or emulate the behaviour of each annunciator from the data exceddance itself.

But for this you will need the FCOM of the plane, I’m afraid.
On the smartcockpit website, you’ll find a wealth of informations about the 340 systems. And you’ll be closer to the systems of the real plane, as Carenado addons are often using shortcuts or incompletely modeled systems.
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

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

Re: API - draw inverted text mask

#13 Post by Sling » Thu Apr 29, 2021 2:49 am

Detlef wrote:
Wed Apr 28, 2021 5:32 pm
I simple could not fill the same canvas twice. I wanted (1) a background image from a file and (2) a text mask from a file.
I don’t think you need the canvas for this but just for information when using the canvas you don’t fill it twice but simply redraw it with the new scheme. You can use conditionals within the draw function to decide what to draw. Alternatively you can just layer multiple canvasses.

Tony

Detlef
Posts: 94
Joined: Mon Nov 16, 2020 9:43 am
Location: Bavaria

Re: API - draw inverted text mask

#14 Post by Detlef » Thu Apr 29, 2021 5:55 pm

Sling wrote:
Thu Apr 29, 2021 2:49 am
Alternatively you can just layer multiple canvasses.

Tony
Tony,
layer multiple canvasses would probably have worked then. I have a different solution now.

Thank you
Detlef

Detlef
Posts: 94
Joined: Mon Nov 16, 2020 9:43 am
Location: Bavaria

Re: API - draw inverted text mask

#15 Post by Detlef » Thu Apr 29, 2021 6:01 pm

JackZ wrote:
Wed Apr 28, 2021 10:53 pm
Yes I know that’s the main problem. Good luck with Carenado, they have anotoriously crappy support.

Two solutions either ways: get the state of the annunciators via a Datarefs if able or emulate the behaviour of each annunciator from the data exceddance itself.

But for this you will need the FCOM of the plane, I’m afraid.
On the smartcockpit website, you’ll find a wealth of informations about the 340 systems. And you’ll be closer to the systems of the real plane, as Carenado addons are often using shortcuts or incompletely modeled systems.
Jacques,
I found some documentation on the aircraft on the smartcockpit website and used some of it. I finished this main warning panel today, for now. It behaves similar to the Carenado one with running and dying engines. I have to fly later to see if everything makes sense. I have not found datarefs for all lights until now but maybe later.

Thank vou
Detlef

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests