Search the archive:
YaBB - Yet another Bulletin Board
 
   
 
Page Index Toggle Pages: 1
Send Topic Print
Gauge Hot Spots (Read 181 times)
Nov 16th, 2005 at 12:09pm

FS_Pilot   Offline
Colonel
Helicopter Pilots Beat
the Air into Submission
Victoria, Australia

Gender: male
Posts: 328
*****
 
I would like to creat a panel with hot spots on some of the gauges so as to display them larger for easier reading. Can anyone please tell me how to do it?
Thanks Allen
 

Pentium 4, 2.4 GHZ Processor&&Gigabyte GA-8SR533 Motherboard&&1280mb DDR Ram&&256 GeFORCE 7600GS Video Card 17 MagView monitor. Saitek X45 Joystick
IP Logged
 
Reply #1 - Nov 16th, 2005 at 2:36pm

Gypsy_Baron   Offline
Colonel
USS Dewey DGL-14 &  VX-8
Daly City, California

Gender: male
Posts: 467
*****
 
[quote author=FS_Pilot  link=1132160944/0#0 date=1132160944]I would like to creat a panel with hot spots on some of the gauges so as to display them larger for easier reading. Can anyone please tell me how to do it?
Thanks Allen[/quote]

Well, with XML gauges it's pretty simple to do. You just define
the X,Y locations of the left, right, top and bottom of the area
you wish to define as a "hot spot"....

Here is a sample of XML code from a fuel tank selector switch
gauge that I created for a panel:

   <Mouse>
     <Area Left="0" Right="13" Top="12" Bottom="26">
     <Tooltip>Left Aux</Tooltip>
     <Cursor Type="Hand"/>
     <Click>5 (>L:Fuel Selector 1,enum) 12 (>K:FUEL_SELECTOR_SET)</Click>
     </Area>

     <Area Left="0" Right="17" Top="0" Bottom="11">
     <Tooltip>Left Main</Tooltip>
     <Cursor Type="Hand"/>
     <Click>3 (>L:Fuel Selector 1,enum) 4 (>K:FUEL_SELECTOR_SET)</Click>
     </Area>

     <Area Left="18" Right="34" Top="0" Bottom="12">
     <Tooltip>ALL</Tooltip>
     <Cursor Type="Hand"/>
     <Click>2 (>L:Fuel Selector 1,enum) 1 (>K:FUEL_SELECTOR_SET)</Click>
     </Area>

     <Area Left="35" Right="53" Top="0" Bottom="12">
     <Tooltip>Right Main</Tooltip>
     <Cursor Type="Hand"/>
     <Click>4 (>L:Fuel Selector 1,enum) 5 (>K:FUEL_SELECTOR_SET)</Click>
     </Area>

     <Area Left="35" Right="53" Top="13" Bottom="27">
     <Tooltip>Right Aux</Tooltip>
     <Cursor Type="Hand"/>
     <Click>6 (>L:Fuel Selector 1,enum) 11 (>K:FUEL_SELECTOR_SET)</Click>
     </Area>

     <Area Left="35" Right="53" Top="28" Bottom="43">
     <Tooltip>Fuel OFF</Tooltip>
     <Cursor Type="Hand"/>
     <Click>1 (>L:Fuel Selector 1,enum) 0 (>K:FUEL_SELECTOR_SET)</Click>
     </Area>

     <Area Left="0" Right="39" Top="33" Bottom="52">
     <Tooltip>Engine 1 Fuel Tank Select</Tooltip>
     <Cursor Type="Hand"/>
     </Area>

     <Area Left="14" Right="39" Top="13" Bottom="32">
     <Tooltip>Engine 1 Fuel Tank Select</Tooltip>
     <Cursor Type="Hand"/>
     </Area>

   </Mouse>

  Note that these specifications use the "<Tooltip>" specification
to display text when the cursor is over the defined Area, and also
uses the <Click> specification to enable some action(s) to be taken
when the mouse button is activated in that Area.

All four area specs...left,right,top,bottom need not be present
is, for instance, you only have two "hot spots" on a gauge
seperated vertically. Then you just specify the left and right
parameters and the spots will extend from the top to bottom
of the gauge.

Id you only need one "hot spot" on a gauge, covering the entire
gauge, then something like this will work:

   <Mouse>
     <Help ID="HELPID_GAUGE_LIGHT_SWITCH_TAXI"/>
     <Cursor Type="Hand"/>
     <Click Event="TOGGLE_TAXI_LIGHTS"/>
   </Mouse>

To make the gauge larger, you could create a window with the
gauge specified to be larger than the main panel gauge.
The hot spots would then cause the panel(s) to open or close
when clicked upon.

here's a sample of XML code for opening an "IFR" window:

<Gauge Name="IFR" Version="1.0">
   <Image Name="Icon_IFR.bmp" ImageSizes="19,19"/>
   <Mouse>
     <Cursor Type="Hand"/>
     <Click>175 (&gt;K:PANEL_ID_TOGGLE)</Click>
        <Tooltip ID="">Display/Hide IFR Panel</Tooltip>
        <Help ID=""/>
   </Mouse>
</Gauge>

In this case I used an Icon as the "hot spot" to toggle panel ID 175.
This could just as easily been embedded in a gauge on the main panel
and panel ID175 a window containing only the "expanded" gauge.

A similar "hot spot" would also be embeded in the expanded gauge
to close the window.

Each expanded gauge window would use a different ID, specified
in the panel.cfg [Windowxx] section:

ident=175

Hope this answers your question.

    Paul

 

...
IP Logged
 
Reply #2 - Nov 17th, 2005 at 12:24am

FS_Pilot   Offline
Colonel
Helicopter Pilots Beat
the Air into Submission
Victoria, Australia

Gender: male
Posts: 328
*****
 
Thanks Paul
It looks complicated but i will give it a go. thanks for the tip.
Allen
 

Pentium 4, 2.4 GHZ Processor&&Gigabyte GA-8SR533 Motherboard&&1280mb DDR Ram&&256 GeFORCE 7600GS Video Card 17 MagView monitor. Saitek X45 Joystick
IP Logged
 
Reply #3 - Nov 17th, 2005 at 2:12am

Gypsy_Baron   Offline
Colonel
USS Dewey DGL-14 &  VX-8
Daly City, California

Gender: male
Posts: 467
*****
 
Quote:
Thanks Paul
It looks complicated but i will give it a go. thanks for the tip.
Allen


You're welcome. It may LOOK complicated but it's not, really.

Once you get the hang of the various XML code options it's
pretty easy to make panels/guages come and go Smiley

I suggest having a look at alot of different .cab folders
and see how others do things. A utility like Powerarchiver 2000
or other UNZIP type program will extract the .cab contents
into a folder and you can then examine the XML gauge code
using Notepad.

    Paul

 

...
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print