Panel Configuration File

The folder used by the Panel system is the Panel folder. The Panel folder contains the panel background image (.bmp) files and panel configuration file (Panel.cfg).

If you have more than one version of an aircraft that each requires a different panel layout, you will have more than one Panel folder. The name of the default Panel folder is Panel. Additional Panel folders must have the name Panel.xxx, where xxx is an identifying key. The identification key is found in the Aircraft configuration file.

When Flight Simulator 98 loads an aircraft, it also loads the panel configuration file. The file location is determined by the rules discussed in the Overview topic. The following example is a panel configuration file (Panel.cfg) used in Flight Simulator 98.

[Window Titles]

window00=Schweizer

window01=Minicontrols

[Window00]

file=Schweizer2_32.bmp

size_mm=515

window_size_ratio=1.0

position=7

visible=1

ident=0

gauge00=Schweizer.Compass,0,165

gauge01=Schweizer.Com-Radio,214,161

gauge02=Schweizer.Master,298,35

gauge03=Schweizer.Altimeter,17,78

gauge04=Schweizer.Airspeed,106,31

gauge05=Schweizer.Vertical-Speed,396,85

[Window01]

file=Minicontrols.bmp

size_mm=100

position=0

visible=0

ident=100

gauge00=Minicontrols, 0, 0

[8 Bit Colors]

color00= 99, 107, 123

color01=148, 156, 148

color02=148, 156, 123

color03=181, 181, 140

color04=239, 239, 198

color05=255, 255, 214

color06=189, 189, 165

color07=231, 222, 173

color08=156, 148, 107

color09=173, 165, 132

color10=222, 206, 148

color11=123, 115,  99

color12=173, 148, 107

color13= 74,  66,  57

color14=222, 181, 140

color15= 49,  41,  33

color16=107,  90,  74

color17=140, 123, 107

color18=148, 107,  82

color19=198, 123,  82

color20=222, 148, 115

color21=206,  99,  66

color22=107,  57,  41

color23=148,  66,  41

color24= 66,  33,  24

color25=181,  99,  74

color26= 99,  33,  16

color27=173,  74,  49

color28=123,  41,  24

color29= 24,  16,  16

color30= 33,  24,  24

color31= 66,  49,  49

[Default View]

X=0

Y=0

SIZE_X=8191

SIZE_Y=4890

The Panel system creates the aircraft's panel windows by using the [Window Titles] section. The Panel system starts from window00, creating panel windows until it reaches window63 or until it finds a break in the progression. For each windowXX variable in this section, the Panel system creates a panel window. When creating the panel window it looks for a corresponding [WindowXX] section. The variables in this section are used to set the initial state of each panel window. After the panel window is created, the gauges listed in the [WindowXX] section are loaded.

The gauges are specified by the gauge00 through gauge63 in the [WindowXX] section. The Panel system starts loading gauges, starting from gauge00 until it reaches gauge63, or until it finds a break in the progression.

When the bitmap background and gauge images are loaded, the image colors are mapped to the closest Flight Simulator colors listed in the Color Mapping Table topic. In addition to the colors listed in the color table, there are 32 panel-specific colors (the values for these colors are listed in the Panel.cfg file example, earlier in this topic) that can be set in the panel configuration file. If the panel-specific colors are set, they are also used during the color mapping process. The panel-specific-colors are set in the [8 bit colors] section of the Panel.cfg file.

Tip: The .bmp file used for the panel window background must be an 8-bit color image. There will be a "hole" in the panel window anywhere index 0 (transparency) is used in the background image. Using index 0 is a great technique for giving the panel windows a distinctive shape other than rectangular. For example, you could use index 0 on corners, making the corners transparent and giving a rounded appearance.

The following table shows the sections of the Panel.cfg file, including the variables used in each section, and describes how each section effects the panel.

Section and variable Description
[Window Titles]
window00window63 Window00=Schweizer
Title displayed for the panel window when it's undocked. Also displayed as an item included in the list when you click Instrument Panel on the Views menu.
[Window00][Window63]
File File = Schweizer2_32.bmp
Bitmap file to load and use for the panel window background. The .bmp file should be in the same directory as the Panel.cfg file.
size_mm Size_MM = 515
Size of the panel window, in millimeters.
Window_size_ratio Window_size_ratio = 0.8
Optional. Determines the width of panel window as a ratio of the client area of Flight Simulator main window.  If not specified, 1.0 is the default.
Position Position = 7
The relative position of a panel window to the main window. Position is designated by a number from 0 to 8 described as follows:
0 = upper-left corner
1 = upper-middle side
2 = upper-right corner
3 = middle-left side
4 = middle
5 = middle-right side
6 = lower-left corner
7 = lower-middle side
8 = lower-right corner
If not specified, 7 is the default.
Visible Visible = 1
Specifies the initial visible state of the panel window
1 = visible
0 = hidden
If not specified, 1 is the default.
Ident Ident = 100
A unique numeric identifier used by some Panel system APIs.
gauge00gauge63 Gauge00=Sopwith.Altimeter, 211, 113
A comma-delimited variable that specifies the gauge DLL file to load and the X, Y position of the gauge, in millimeters.
[8 Bit Colors]
color00–color31 Color00 = 128,128,0
These can be used to add up to thirty-two extra colors to the palette. The additional colors are used to display gauges and window background.
[Default View]
X X = 0
Specifies the X position of the default 3D window.
Y Y = 0
Specifies the Y position of the default 3D window.
SIZE_X SIZE_X = 8191
Specifies the width of the default 3D window.
SIZE_Y SIZE_Y = 3370
Specifies the height of the default 3D window.