Swipe, pinch and drag functions

Let Sim Innovations know about your Air Manager experience and let us know about your dream feature addition

Moderators: russ, Ralph

Post Reply
Message
Author
User avatar
Keith Baxter
Posts: 4671
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Swipe, pinch and drag functions

#1 Post by Keith Baxter »

Yes you know why. :lol:

Also to be able to capture a node on a screen by clicking on the node proximity.

@Corjan Let me explain that better...

If I have aircraft indicating and moving within an instrument. Not necessarily a map. But within a canvas. I want to be able to click on that moving aircraft/node, say the node represents a # for instance and display data.
So the moving node/aircraft/# becomes a moving button.

Am I making sense ???


Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Keith Baxter
Posts: 4671
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Swipe, pinch and drag functions

#2 Post by Keith Baxter »

Corjan,

About two to three years ago you showed me a map concept.

There you grabbed waypoints and moved them. I think that is the feature I would like expanded if possable.

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
WillemijnL
Posts: 107
Joined: Sat Jan 30, 2016 1:14 pm

Re: Swipe, pinch and drag functions

#3 Post by WillemijnL »

If I understand you right, some things you want are already possible with the existing Air Manager functions. Just combine that with some (advanced) Lua options. I'm now working on the Instrument Switcher Panel which is almost finished. The buttons you see in the screenshots are managed by data from a configuration file. No pre-made graphics are used. The buttons are a combination of a canvas and a transparent button. I have created a text button class to handle everything in a conveniant way. This class will be added to a new open source toolbox I'm starting with. The idea is to make the toolbox community driven. This way we can create our own components for Air Manager to make common and complex things (more) easy and make it available to everyone to use them in instruments and panels.

The text button class has a nice option. You can attach data to the button that is available in the callback function. This way you can use one callback function for many (similar) buttons. The callback "knows" which button is clicked/touched. This can be usefull to create i.e. a keypad. When you attach data indicating the specific key (function), you can handle the whole keypad with only one callback function.

Back to your question, with this basis we can create new classes for different purposes, such as a "overlayButton" or a "clickableNode" or things like that. If you attach data to the instance with the type (waypoint, vor, aircraft, airport, etc) and the code, with only one callback function you can lookup the data of all nodes and present it. This simplifies your code. Examples of attached data: {type="airport", icao=""EHAM"} or {type="aircraft"} or {type="waypoint", icao="XYZ"}. With this data you can get/lookup the related data to show on the screen. Also a "move" method can be added, that moves both the node and the related button with one call. And the node and related button can be centered automatically.

If the data would be presented in a popup window, also a popup window class could be made, handling the base window layout and window closing options out of the box.

I have plans to make a generic glass cockpit instrument with popup windows etc for which I need similar general components/classes. We could create these components together and with everyone else who like to cooperate.

Post Reply