September 28, 200916 yr 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)
September 29, 200916 yr 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,MartinFirst 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 gaugeGauge 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
September 30, 200916 yr 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)
September 30, 200916 yr ....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
October 4, 200916 yr 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
October 4, 200916 yr 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)
October 30, 200916 yr Commercial Member Yes.... but you'll need to do some serious DirectInput programming to get it to work. It really is not an easy thing to do unless you already have templates set up for this type of work and ATM I don't... sorry :( -Dai
October 31, 200916 yr 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