GPS doesn't respond to mouse events

Horst18519

Moderator
Staff member
Resource contributor
#1
I guess this is one more for Bill. :eek:

I implemented the GSP500 in my VC-Panel. Now I have 3D-buttons overlayed with mouse-rects attached. This looks like:

<PartInfo>
<Name>fw_GPS_Zoom_In</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>(L:FW Var,enum) 50 *</Code>
</Parameter>
</Animation>
<MouseRect>
<Cursor>DownArrow</Cursor>
<TooltipID>TOOLTIPTEXT_GPS_RANGE_Down</TooltipID>
<EventID>KEY_GPS_ZOOMIN_BUTTON</EventID>
</MouseRect>
</PartInfo>
But the GPS doesn't respond to mouse clicks. Why not? :confused:

EDIT: The Var is a placeholder only. It doesn't affect anything, I just wasn't sure if I'd get an error without an animation. As the buttons are rather small I don't need to animate them.


By the way:

I also have a GPS as 2D (shift+3), but this is also not affected. Could it be that 2D-GPS and 3D-GPS are 2 seperate instruments that dont affect each other (I seem to remember that from other aircraft with 3D-GPS included).
 
Last edited:

n4gix

Resource contributor
#2
But the GPS doesn't respond to mouse clicks. Why not? :confused:

I also have a GPS as 2D (shift+3), but this is also not affected. Could it be that 2D-GPS and 3D-GPS are 2 seperate instruments that dont affect each other (I seem to remember that from other aircraft with 3D-GPS included).
I know that the SDK is a bit confusing, but the column titled "Event ID" lists the C gauge syntax of the commands. The column titled "String Name" lists the XML command name syntax... :eek:

Remove the "KEY_" prefix as shown below:

<EventID>GPS_ZOOMIN_BUTTON</EventID>

Since you aren't animating the buttons though, might I ask why you're bothering with this at all? Why not simply use the GPS500 gauge's mouse points?
 

Horst18519

Moderator
Staff member
Resource contributor
#3
Thanks Bill. I really should start to learn reading... :D

The reason why I use this confusing method is that I created a 3D-GPS (a GNS430) with an underlying GPS500. I didn't want to program a completely new GPS, so I use the display of the GPS500 but hide the rest of it with 3D frame. So I have 3D-buttons with no animation.

Bit confusing, even if I try to describe it... :eek:

I'll try the XML IDs.:)
 
Top