Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Stuck on this gauge/icon. Anyone help please?

Featured Replies

Hi. I know how to put icons into a/c cockpits which open up various windows in the panel.cfg file, and similarly basic stuff, using XML code - I'm not an expert here. But I now want to have an icon in the cockpit that would open up a window that is controlled by a keyboard command, (such as Ctrl+Shift+A, or similar). I started on this, then realised I was lost! Can anyone advise how to transfer such a keyboard command to an icon/XML gauge please?Many thanks,Martin

Martin Stebbing, EGLF (UK)

Hi. I know how to put icons into a/c cockpits which open up various windows in the panel.cfg file, and similarly basic stuff, using XML code - I'm not an expert here. But I now want to have an icon in the cockpit that would open up a window that is controlled by a keyboard command, (such as Ctrl+Shift+A, or similar). I started on this, then realised I was lost! Can anyone advise how to transfer such a keyboard command to an icon/XML gauge please?Many thanks,Martin
First of all, I'm not sure what you mean by "...that would open up a window that is controlled by a keyboard command,".FS has 9 events (Panel Window 1 - 9 ) to toggle a 2D window, resp. Window00 to Window08. Each event can be assigned to a keystroke (Default: Shift-1 to Shift-9).Secondly, you cannot (in XML) generate a keyboard command to toggle a window (or any keystroke for that matter; just events).However, to toggle a (any) 2D window from an Icon gauge, you can use the Ident function of FS.There are a number of predefined Idents in FS, but you can define your own as well.E.g.If you use theIdent=10000in a panel.cfg Window** section, and create an Icon gauge
Gauge Name="MyIcon" Version="1.0">   <Image Name="MyIcon.bmp"/>   <Mouse>	  <Tooltip ID="">Display/Hide My Window</Tooltip>	  <Cursor Type="Hand"/>	  <Click>		 10000 (>K:PANEL_ID_TOGGLE)	   </Click>   </Mouse></Gauge>

clicking the gauge toggles that window open/closed.Rob

  • Author

Rob,Many thanks for the reply. The reason I couldn't do this is because it seems (as I vaguely suspected) it's not possible! I was wanting to try putting an icon or clickspot into an a/c cockpit that would open up the Aerosoft AES menu window - this opens with a Ctrl+Shift+W keyboard command. When I looked at the XML syntax for this I saw I was totally lost - not surprising, since you say there isn't one.On the other hand though, how have people made, for instance, a gauge (icon) for cockpits which opens the FS navigator window (called up by F9). I assume, if it can't be done via XML coding, there must be another way?I have made a number of XML gauges which open the 2D windows, that's no problem..Thanks again,Martin

Martin Stebbing, EGLF (UK)

....On the other hand though, how have people made, for instance, a gauge (icon) for cockpits which opens the FS navigator window (called up by F9). I assume, if it can't be done via XML coding, there must be another way?
That can most probably be done via a C/C++-coded/compiled .gau gauge; not via an XML gauge .....But other people have to jump in on that, since I don't have that expertise..Rob
  • Commercial Member
BOOL FSAPI display_window_mcb( PPIXPOINT relative_point, FLAGS32 mouse_flags ){	if(mouse_flags & MOUSE_LEFTSINGLE)	{		if(is_panel_window_visible_ident(<ident_no>)==TRUE)panel_window_close_ident(<ident_no>);		else if(is_panel_window_visible_ident(<ident_no>)==FALSE)panel_window_open_ident(<ident_no>);	}	return FALSE;}

-where <ident_no> is the panel.cfg window ident.-Dai

  • Author

Ah, thanks. But what I need is a gauge that will operate a keyboard command (as above), rather than open a panel.cfg window - like the FSNavigator icon in some cockpits that functions on the F9 key: maybe this isn't possible..M.

Martin Stebbing, EGLF (UK)

  • 4 weeks later...
  • Author

I guess you are probably right - I really don't have sufficient interest to immerse myself programming to that extent. Never mind..M. :-)

Martin Stebbing, EGLF (UK)

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.