September 18, 200421 yr Hi all!I started with gauge design lately doing very basic things.I use FSpanel studio a lot, but even though I read a lot of stuff I'm still stuck with many xml code.I have made a new windows in one of the panels an Autopilot window accessed through the View - Instruments menu, it works OK, but I want to make a switch to show the Autopilot window on and off.I tried to modify simple switches code but no joy.I can't get the click code correct to address the window.Any help?Thanks allregardsbahri
September 18, 200421 yr The key is making the mouse click reference the panel window ID that you want to show. Make sure that your panel window has an ident window identifier:Example:[Window05]Background_color=0,0,0 size_mm=125,25window_size_ratio=1.000 position=0visible=1ident=125window_size= 0.600, 0.160window_pos= 0.200, 0.030gauge00=HUDT!Annunciator_Panel, 1,5,104,12Notice the ident=125This is the window identifier.Now in the switch code for the mouse click, reference that Ident like this: 125 (>K:PANEL_ID_TOGGLE) Which says......every time I click it will turn on/off window ident 125.Hope this helps.Steve
September 18, 200421 yr Hi!Thanks a lot Steve, this was very helpfull and now the switch works.However the bmp is not changing always showing the bitmap for the on state. May be you could spare another monent and help me out.Regardsbahri
September 19, 200421 yr OKSo add your own variable in the click line that will change the state of the switch bitmap. An L var bool can be triggered to a state of either 1 or 0 with the same mouse click that changes the panels, so in the mouse area, make your own L:Var,bool and then use that boolean to change the bitmaps:(L:Changebitmap,bool)Element> 125 (>K:PANEL_ID_TOGGLE) (L:Changebitmap,bool) ! (>L:Changebitmap,bool)You can make the L:Var any thing you want to call it.(L:Changebitmap,bool) ! changes the state of (L:Changebitmap,bool) to a 1 or a 0 every time you click the mose, then the state of it is loaded into (>L:Changebitmap,bool) and read by the Value tag in the switch.Hope that makes sense?Steve
Create an account or sign in to comment