Jump to content
Sign in to follow this  
Guest bartels

Panel Control Icons

Recommended Posts

I know that it is possible to get around the 0-9 panel limit using XML code, by using "ident" in the code, e.g.:225 (>K:PANEL_ID_TOGGLE)The question is whether it is possible to duplicate this in C gauges? I'd really rather avoid having to use XML for panel control, but don't see anyway to implement this scheme in C...


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Bill,The answer is yes. Have a look near the bottom of GAUGES.H, in the same block of code where "check_named_variable" and "set_named_variable_value" functions are defined. I think the name of the function is "panel_window_id_toggle". I will verify when I get home from work if you don't find it...DougEdit:Curiousity got the better of me - I looked them up: BOOL (FSAPI *is_panel_window_visible_ident) (UINT32 panel_id); BOOL (FSAPI *panel_window_toggle) (UINT32 panel_id); BOOL (FSAPI *panel_window_close_ident) (UINT32 panel_id); BOOL (FSAPI *panel_window_open_ident) (UINT32 panel_id);

Share this post


Link to post
Share on other sites

>Edit:>Curiousity got the better of me - I looked them up:>> BOOL (FSAPI *is_panel_window_visible_ident) (UINT32>panel_id);> BOOL (FSAPI *panel_window_toggle) (UINT32 panel_id); > BOOL (FSAPI *panel_window_close_ident) (UINT32>panel_id); > BOOL (FSAPI *panel_window_open_ident) (UINT32>panel_id); Thanks, I already figured it out (once I entered the engage-brain-before-mouth mode)... ;)However, your reply has already answered another question I had, specifically: "Is it possible to determine whether a specific panel is open?"is_panel_window_visible_ident will do just fine!I am building a "control gauge" that will, as the final step "auto pop-up" a subpanel whenever the user switches to Spot View, providing all other conditions are met... :)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

>However, your reply has already answered another question I>had, specifically: "Is it possible to determine whether a>specific panel is open?">>is_panel_window_visible_ident will do just fine!>>I am building a "control gauge" that will, as the final step>"auto pop-up" a subpanel whenever the user switches to Spot>View, providing all other conditions are met... :)"Actually, on reflection this won't 'do just fine' at all!" I lament, as I dejectedly walk down the long, cold, dark corridor in my desperate quest for a light at the end of the tunnel... *:-* :-sword


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

My first thought was "Well why not???" Then it struck me that in the situation you describe, the panel window has to be opened undocked, or it will disappear along with the rest of the panel when the user switches views. Probably do-able, but 'how?' is a pretty good question!Is this the problem?Doug

Share this post


Link to post
Share on other sites

>My first thought was "Well why not???" Then it struck me>that in the situation you describe, the panel window has to be>opened undocked, or it will disappear along with the rest of>the panel when the user switches views. Probably do-able, but>'how?' is a pretty good question!>Is this the problem?Yep, that's precisely the problem. When the simpilot panics, and decides his/her only option is to deploy the CAPS, a hidden mouseclick will bring up a CAPS sub-panel with control gauge.1st click removes cover2nd click removes safety pin w/tag3rd click lowers handle and cocks firing system4th click simulates pulling the handle and firing the ballistic rocket(note that this could also be done from the VC version of the same gauge)At this point in the sequence, the pilot will likely switch to Spot View to enjoy the blown hatch cover, the rocket deployment, etc. and will remain there throughout the descent, so they can "enjoy" the cool effects...The problem being, of course, that since switching views from VC or 2d means the CAPS sub-panel is now not displayed.I was hoping that I could realize my goal thusly:if (panel not open) and (spot view active) then (open panel)This is important, because there's another series of sub-actions that the gauge will control, such as displaying the "after deployment checklist" as well as a "repair the CAPS system" button. ;)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Solution found! See new message thread for details... ;)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest bartels

Just for the sake of completeness: ALL ... (>K:...) constructs are always replicable with C gauges by using trigger_key_event or send_key_event.E.g.:trigger_key_event(KEY_PANEL_ID_TOGGLE,225);ortrigger_key_event(KEY_PANEL_ID_TOGGLE,IDENT_GPS_PANEL);The fucctions mentioned by Doug do also work of course. The event KEY_PANEL_ID_TOGGLE was introduced with FS2002, the functions "panel_window_close_ident" and "panel_window_open_ident" were introduced with Fs2000. "panel_window_toggle" is older.Arne Bartels

Share this post


Link to post
Share on other sites

On a related note, is there a way in XML to determine if a particular panel is currently open?CheersBob ScottATP IMEL Gulfstream II-III-IV-VSantiago de Chile


Bob Scott | President and CEO, AVSIM Inc
ATP Gulfstream II-III-IV-V

System1 (P3Dv5/v4): i9-13900KS @ 6.0GHz, water 2x360mm, ASUS Z790 Hero, 32GB GSkill 7800MHz CAS36, ASUS RTX4090
Samsung 55" JS8500 4K TV@30Hz,
3x 2TB WD SN850X 1x 4TB Crucial P3 M.2 NVME SSD, EVGA 1600T2 PSU, 1.2Gbps internet
Fiber link to Yamaha RX-V467 Home Theater Receiver, Polk/Klipsch 6" bookshelf speakers, Polk 12" subwoofer, 12.9" iPad Pro
PFC yoke/throttle quad/pedals with custom Hall sensor retrofit, Thermaltake View 71 case, Stream Deck XL button box

Sys2 (MSFS/XPlane): i9-10900K @ 5.1GHz, 32GB 3600/15, nVidia RTX4090FE, Alienware AW3821DW 38" 21:9 GSync, EVGA 1000P2
Thrustmaster TCA Boeing Yoke, TCA Airbus Sidestick, 2x TCA Airbus Throttle quads, PFC Cirrus Pedals, Coolermaster HAF932 case

Portable Sys3 (P3Dv4/FSX/DCS): i9-9900K @ 5.0 Ghz, Noctua NH-D15, 32GB 3200/16, EVGA RTX3090, Dell S2417DG 24" GSync
Corsair RM850x PSU, TM TCA Officer Pack, Saitek combat pedals, TM Warthog HOTAS, Coolermaster HAF XB case

Share this post


Link to post
Share on other sites

Hi Bob,Not directly.But Doug Dawson (who else :-) ) made a gauge that let's you define several panelwindow numbers (= Window Idents) that you can monitor in XML L:vars; it's called dsd_window_status.gau.Since there are several versions around (a.o. for FS9 and FSX), you best contact Doug for the latest one, since I don't think he upoloaded this gauge to the library.Cheers, Rob Barendregt

Share this post


Link to post
Share on other sites

Thanks Rob...I think I'll give this one a try in C rather than XML.CheersBob ScottATP IMEL Gulfstream II-III-IV-VSantiago de Chile


Bob Scott | President and CEO, AVSIM Inc
ATP Gulfstream II-III-IV-V

System1 (P3Dv5/v4): i9-13900KS @ 6.0GHz, water 2x360mm, ASUS Z790 Hero, 32GB GSkill 7800MHz CAS36, ASUS RTX4090
Samsung 55" JS8500 4K TV@30Hz,
3x 2TB WD SN850X 1x 4TB Crucial P3 M.2 NVME SSD, EVGA 1600T2 PSU, 1.2Gbps internet
Fiber link to Yamaha RX-V467 Home Theater Receiver, Polk/Klipsch 6" bookshelf speakers, Polk 12" subwoofer, 12.9" iPad Pro
PFC yoke/throttle quad/pedals with custom Hall sensor retrofit, Thermaltake View 71 case, Stream Deck XL button box

Sys2 (MSFS/XPlane): i9-10900K @ 5.1GHz, 32GB 3600/15, nVidia RTX4090FE, Alienware AW3821DW 38" 21:9 GSync, EVGA 1000P2
Thrustmaster TCA Boeing Yoke, TCA Airbus Sidestick, 2x TCA Airbus Throttle quads, PFC Cirrus Pedals, Coolermaster HAF932 case

Portable Sys3 (P3Dv4/FSX/DCS): i9-9900K @ 5.0 Ghz, Noctua NH-D15, 32GB 3200/16, EVGA RTX3090, Dell S2417DG 24" GSync
Corsair RM850x PSU, TM TCA Officer Pack, Saitek combat pedals, TM Warthog HOTAS, Coolermaster HAF XB case

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...