n4gix Posted December 23, 2007 Share Posted December 23, 2007 Opening and closing windows or popup panels: The method isn't really difficult, and is listed in the SDK key_events: trigger_key_event (KEY_PANEL_ID_OPEN,nn) ; trigger_key_event (KEY_PANEL_ID_CLOSE,nn) ; trigger_key_event (KEY_PANEL_ID_TOGGLE,nn) ; where nn is the panel ident number/name For example, to open 80 and close 90, the following would be in your mouse callback: { trigger_key_event (KEY_PANEL_ID_OPEN,80) ; trigger_key_event (KEY_PANEL_ID_CLOSE,90) ; } The above would be used to "swap panels." For a simple "popup window" you would use the TOGGLE version: trigger_key_event (KEY_PANEL_ID_TOGGLE,100) ; or trigger_key_event (KEY_PANEL_ID_TOGGLE,IDENT_GPS_PANEL) ; A full list of all the "predefined panel idents" is listed in the gauges.h file: // Panel identifiers #define IDENT_MAIN_PANEL 0 #define IDENT_THROTTLE_PANEL 10 #define IDENT_RADIO_STACK_PANEL 50 #define IDENT_COMPASS_PANEL 75 #define IDENT_MINI_CONTROLS_PANEL 100 #define IDENT_ANNUNCIATOR_PANEL 125 #define IDENT_ANNUNCIATOR2_PANEL 150 #define IDENT_IFR_MAIN_PANEL 175 #define IDENT_COLLECTIVE_PANEL 200 #define IDENT_GPS_PANEL 225 #define IDENT_OVERHEAD_PANEL 250 #define IDENT_USER 10000 #define IDENT_USER_MAX 19999 #define IDENT_AIRCRAFT_HUD_3D_PANEL 20000 #define IDENT_HELICOPTER_HUD_3D_PANEL 20001 #define IDENT_CONTROLS_HUD_3D_PANEL 20002 #define IDENT_TEXT_HUD_3D_PANEL 20003 #define IDENT_DAMAGE_HUD_3D_PANEL 20004 #define IDENT_SCORE_HUD_3D_PANEL 20005 #define IDENT_LSO_WINDOW 22000 Bill Leaming http://smileys.sur-la-toile.com/repository/Combat/0054.gif Gauge Programming - 3d Modeling Military Visualizations Flightsim.com Panels & Gauges Forum Moderator Flightsim Rig: Intel Core i7-2600K - 8GB DDR3 1333 - EVGA GTX770 4GB - Win7 64bit Home Premium Development Rig1: Intel Core i7-3770k - 16GB DDR3 - Dual Radeon HD7770 SLI 1GB - Win7 64bit Professional Development Rig2: Intel Core i7-860 - 8GB DDR3 Corsair - GeForce GTS240 1GB - Win7 64bit Home Premium NOTE: Unless explicitly stated in the post, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined... Link to comment Share on other sites More sharing options...
turbofire Posted March 21, 2008 Share Posted March 21, 2008 Bill, What FS are you using this on? Would it work in FS2000? Just wanna know before going to all the trouble to do it. LOL [sIGPIC][/sIGPIC] TurboFIRE "No accidents in one year" Link to comment Share on other sites More sharing options...
n4gix Posted March 22, 2008 Author Share Posted March 22, 2008 The above is valid for both FS2004 and FSX. I no longer have the SDK for FS2000, so I cannot provide a definitive answer. I suspect that it will still work though. Bill Leaming http://smileys.sur-la-toile.com/repository/Combat/0054.gif Gauge Programming - 3d Modeling Military Visualizations Flightsim.com Panels & Gauges Forum Moderator Flightsim Rig: Intel Core i7-2600K - 8GB DDR3 1333 - EVGA GTX770 4GB - Win7 64bit Home Premium Development Rig1: Intel Core i7-3770k - 16GB DDR3 - Dual Radeon HD7770 SLI 1GB - Win7 64bit Professional Development Rig2: Intel Core i7-860 - 8GB DDR3 Corsair - GeForce GTS240 1GB - Win7 64bit Home Premium NOTE: Unless explicitly stated in the post, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined... Link to comment Share on other sites More sharing options...
Recommended Posts