# panel.cfg {{< image-center src="images/2_DevMode/simobject_editor/cfg/cfg_tab_18_panel.png" alt="The Panel Tab Of The SimObject Editor" >}} The `panel.cfg` a *mandatory* file for aircraft SimObjects that are meant to be available to the user to fly, and is not used for any other SimObject category. This file can be considered as a critical file when it comes to defining aircraft, and would go in the `panel` folder in the root directory for the aircraft (along with the `model`, `sound`, etc... folders). This file is used to create the different *virtual cockpit* elements by referencing one or more [XML](../../modular-simobjects/aircraft/instruments/panel-xml-properties/), [HTML](../../programming-apis/javascript/js-gauge-tutorial/setting-up-for-html-js-css-instruments/), or [C/C++](../../programming-apis/wasm/creating-wasm-gauges/) gauges. {{< callout context="note" title="NOTE" icon="outline/bulb" >}} If the aircraft can be selected by the user for flying, it **must** have a `panel.cfg` file as well. If this file is not present, the simulation will automatically flag it as a **passive** aircraft, and it will not be visible in the hangar for selection and flying. {{< /callout >}} If the `panel.cfg` file is for a livery or a variation, then it's worth noting that it should go in a folder that has been named using the following convention: `panel.`, where `` is an identifier for your livery/variation. {{< image-center src="images/5_Content_Config/SimObj/panel_livery.png" alt="Livery Identifiers Appended Onto Folders" >}} This file will also need to be referenced in the [`aircraft.cfg`](../aircraft.cfg/) under the [`[FLTSIM.N]`](../aircraft.cfg/#fltsimn) section `panel` parameter, eg: ``` cpp [FLTSIM.0] title = "My Aircraft Variant" model = "01" panel = "01" sound = "01" ``` Below you can find information on the different sections used in the `panel.cfg` file when creating **liveries** as well as what parameters and values are expected within them. - [Dynamic Liveries](../../models-and-textures/modeling/aircraft/airframe/liveries/dynamic-liveries/) - [Static Liveries](../../models-and-textures/modeling/aircraft/airframe/liveries/static-liveries/) ### [VARIATION] This section is only used when you are creating an aircraft that references another "base" aircraft, for example when creating a livery. Basically the `panel.cfg` file for a livery/variation will follow these three rules: - if the livery/variation doesn't include a `panel.cfg` file then the "base" `panel.cfg` file will be inherited and used. - if the livery *does* have a `panel.cfg` file, and *doesn't* have the `override_base_container` parameter (or the `override_base_container` parameter is set to 1) then it needs to contain ALL the required data as it will override everything in the "base" `panel.cfg`. - if the livery has a `panel.cfg` and *also* has `override_base_container` set to 0, then it will use the "base" file and add in the extra sections from the livery/variation (or overwrite any sections that already exist in the "base" file). {{< table-wrapper "200px" "" "150px" "100px" >}} | Parameter | Description | Type | Required | |---|---|---|:---:| | {{< anchor id="override_base_container" />}}`override_base_container` | Whether to override the "base" panel config file or not. By default this is 1 (TRUE). | Integer | No | {{< /table-wrapper >}} ### [Window Titles] This section permits you to give a title to each of the different panel windows defined in the config file. Windows are numbered from 0, and each `[WindowNN]` section should have it's own corresponding title parameter in `[Window Titles]`. The parameters available to this section are as follows: {{< table-wrapper "200px" "" "150px" "100px" >}} | Parameter | Description | Type | Required | |---|---|---|:---:| | {{< anchor id="WindowNN" />}}`WindowNN` | The name (title) of the panel window defined in the config file for the aircraft. This string is used as the display name for the panel in various places within Microsoft Flight Simulator 2020 so you should ensure that the label you use for each window is appropriate. Also note that the order in which you assign panel windows does not matter, so long as you start with `Window00`. | String | Yes | {{< /table-wrapper >}} ### [WindowNN] This section permits you define a panel window for gauges within an aircraft. `NN`is the window number (numbered from 00) and each new window section should increment by 1 (so `Window00`, `Window01`, `Window02`, etc...). Available parameters are: {{< table-wrapper "200px" "" "200px" "100px" >}} | Parameter | Description | Type | Required | |---|---|---|:---:| | {{< anchor id="file_1024" />}}`file_1024` | The bitmap file to use when the screen width has been set by the user to more than 800. | String | No | | {{< anchor id="size_mm-WindowNN" />}}`size_mm` | A definition of the unit size used for placing and sizing gauges on this panel. For example, if the `size_mm` is 200 x 200 and a gauge's size is 50, 50, it will take up 1/16th (¼ x ¼) of the panel window. If no `size_mm` is defined, the size of the panel's background bitmap (*not*the gauge's background bitmap) will be used. If no background bitmap is defined, a default size of 100 x 100 is used.If `window_size` is not specified, the size of the window on screen will be `size_mm` divided by the `size_mm` for the first window specified in the `panel.cfg`. For example, if the `size_mm` for a given panel is 200, 200 and the `size_mm` for the first panel in the `panel.cfg` is 1024 x 768, the given panel would occupy 19% of the screen in the `x` dimension and 26% in the `y` dimension, or a total of 5% of the total screen area. | [List](../../cfg-files-general-information/#list) of 2 Floats | No | | {{< anchor id="window_size" />}}`window_size` | The percentage of the screen to be taken up by window, from 0 to 1. If this is set, the size of the main panel is ignored for this panel and `size_mm` becomes irrelevant for determining the size of the panel window (note that `size_mm` is still used for calculating the relative sizes of the gauges within the window). | Float | Yes | | {{< anchor id="windowsize_ratio" />}}`windowsize_ratio` | Determines the width of a panel window as a ratio of the client area of the main window. If not specified, 1.0 is the default. | Float | No | | {{< anchor id="visible" />}}`visible` | Set to 0 if the panel is not visible by default. The default is 1 (visible). | Bool | No | | {{< anchor id="update_rate" />}}`update_rate` | This parameter can be used to change the default update rate, in hertz. The default update rate is 18hz, and note that this is the default rate for the *whole* panel, and this can be overridden by the update rate for individual gauges. | Float | No | | {{< anchor id="position" />}}`position` | Specifies the relative position of a panel window to the main window, expressed as an integer value. Default value is 7. | Integer:{{< params/smallfont-list >}}0 = upper-left corner1 = upper-middle side2 = upper-right corner3 = middle-left side4 = middle5 = middle-right side6 = lower-left corner7 = lower-middle side8 = lower-right corner.{{< /params/smallfont-list >}} | No | | {{< anchor id="background_color-WindowNN" />}}`background_color` | Use for a background created with no background bitmap. Use 0,0,0 for a transparent background. | [List](../../cfg-files-general-information/#list) of 3 Floats | No | | {{< anchor id="alpha_blend" />}}`alpha_blend` | The percentage (from 0.0 to 1.0) to blend the panel window with the background scene when the panel is docked. | Float | No | | {{< anchor id="ident" />}}`ident` | Specifies a unique identifier to define the panel window. If your panel windows description does not fit any of the enum values listed, use any number between 10000 and 19999 (lower and higher numbers are used internally). There should be a `MAIN_PANEL` for every aircraft, otherwise other panels may not be rendered correctly. | Enum:{{< params/smallfont-list >}}MAIN_PANELMAIN_PANEL_ALT*N*(where *N* is 1 to 9)THROTTLE_PANELRADIO_STACK_PANELCOMPASS_PANELMINI_CONTROLS_PANELANNUNCIATOR_PANELANNUNCIATOR2_PANELIFR_MAIN_PANELCOLLECTIVE_PANELGPS_PANELOVERHEAD_PANELPARKING_BRAKE_PANELFLAPS_TRIM_PANELFUEL_PANELELECTRICAL_PANELTRIM_PANELLANDING_GEAR_PANELMISC_POPUP_*N*(where *N* is 1 to 10)MINIPANEL{{< /params/smallfont-list >}} | Yes | | {{< anchor id="gaugeNN-WindowNN" />}}`gaugeNN` | Specifies which gauge file to load and the X,Y position of the gauge. The Panel system starts loading gauges from gauge00 until it reaches gauge99. After that, it loads gauge100, gauge101, and so on until it finds a break in the progression. This comma-delimited parameter exists primarily to specify which gauge DLL file to load and the X, Y position of the gauge, in millimeters. This will override the `size_mm` setting.The basic format is:`gaugeNN = gaugefile!gaugename, X, Y, W, H, parameters`Where:{{< params/smallfont-list >}}`gaugeNN` indicates the order in which the gauge is loaded`gaugefile!` indicates the specific `*.xml` file in which the gauge is found.`gaugename` displays the name of the gauge you assign in your gauge code via the `GAUGE_NAME` variable (C based), or the file name (XML based).`X`, `Y` indicates the X and Y position of the gauge, in millimeters, relative to the panel background.`W` indicates the width of the gauge in millimeters.`H` indicates the height of the gauge in millimeters.Parameters are passed to the gauge as a text string argument.{{< /params/smallfont-list >}}Note that if you have set `size_mm` to be **1024**, the above values are *also* the pixel values, which can be much easier to deal with. | [List](../../cfg-files-general-information/#list) of mixed values | Yes | | {{< anchor id="draw_orderNN" />}}`draw_orderNN` | Instructs the renderer to draw certain sets of gauges in a specific order. In any draw order list, the gauges are drawn in that order.For example:`draw_order00 = gauge50, gauge60`This simply means gauge50 is drawn before gauge60. | [List](../../cfg-files-general-information/#list) of Floats | No | | {{< anchor id="zorder" />}}`zorder` | Determines the order of appearance of the panels on the screen. Takes values from 0 (bottom) to 100 (top). | Integer | No | {{< /table-wrapper >}} ### [VCockpitN] The `[VCockpit*N*]` sections provide you with a way to define the different virtual cockpit panels. Each panel should have a single `[VCockpit*N*]` entry, where N starts at 1 and each new entry increments it by one, without skipping any values. Note that for a correct VCockpit setup, each entry must have *at least* one `gaugeNN` or `htmlgaugeNN` parameter set up. The parameters available in this section are as follows: {{< table-wrapper "200px" "" "150px" "100px" >}} | Parameter | Description | Type | Required | |---|---|---|:---:| | {{< anchor id="size_mm-VCockpitN" />}}`size_mm` | A definition of the unit size used for placing and sizing gauges on this panel. For example, if the size_mm is 200 x 200 and a gauge's size is 50, 50, it will take up 1/16th (¼ x ¼) of the panel window. If no size_mm is defined, the size of the panel's background bitmap (not the gauge's background bitmap) will be used.If no background bitmap is defined, a default size of 100 x 100 is used. | [List](../../cfg-files-general-information/#list) of 2 Floats | Yes | | {{< anchor id="pixel_size-VCockpitN" />}}`pixel_size` | Sets size of window in pixels. If not set, and sizeable is false, window pixel size will be set to background image size. If size y is set to 0, it will be generated from the aspect ratio of background file. If no background file is used y will be set equal to x. | [List](../../cfg-files-general-information/#list) of 2 Floats | Yes | | {{< anchor id="texture-VCockpitN" />}}`texture` | This is the material ID of the screen where the instrument will be drawn. To create a gauge that has no render context use "NO_TEXTURE" as the material ID (see the [Note For Invisible Gauges](#note-for-invisible-gauges) for more information).**IMPORTANT!** In previous versions of the simulation this string needed to be preceded with a `$` sign. However in Microsoft Flight Simulator 2024 **this should not be used** as it is now used to indicate to the engine that the material is a collision material, which is obviously not the case for gauges. | String | Yes | | {{< anchor id="background_color-VCockpitN" />}}`background_color` | Use for a background created with no background bitmap. Use 0,0,0 for a transparent background. | [List](../../cfg-files-general-information/#list) of 3 Floats | Yes | | {{< anchor id="hud" />}}`hud` | This parameter provides a way to offset the HUD texture UVs on the quad mesh that displays it. The parameter requires 5 input values in the following format:`hud = is_hud, yaw_offset (or displace_x), pitch_offset (or displace_y, width_angle (or width), height_angle (or height)`{{< params/smallfont-list >}}`is_hud`: When set to 1 or 2, this specifies that the panel is a HUD. If it is 1 then it uses the **legacy shader** for rendering. When set to 2, it uses the **modern shader**. All new aircraft should set this value to 2 if using a HUD, and the legacy value is only there to preserve backwards compatibility with older aircraft.{{< /params/smallfont-list >}}When the `is_hud` value is **2** the other values are:{{< params/smallfont-list >}}`yaw_offset`: This can be used to displace the HUD texture around the X axis, (a float, in degrees).`pitch_offset`: This can be used to displace the HUD texture around the Y axis (a float, in degrees).`width_angle`: Set the angular width of the HUD element (a float, in degrees).`height_angle`: Set the angular height of the HUD element (a float, in degrees).{{< /params/smallfont-list >}}When the `is_hud` value is **1** the other values are:{{< params/smallfont-list >}}`displace_x`: displace the HUD texture along the X axis (a float).`displace_y`: displace the HUD texture along the Y axis (a float).`width`: the HUD texture width (in pixels, a float).`height`: the HUD texture height (in pixels, a float).{{< /params/smallfont-list >}} | [List](../../cfg-files-general-information/#list) of 5 Floats | No | | {{< anchor id="render_on_screen" />}}`render_on_screen` | This parameter provides - when supplied - a way to render the VCockpit panel directly to the screen at a given position. The parameter requires 7 input values in the following format:`render_on_screen = posX, posY, width, height, xoffset, yoffset, cameraFlag, hideInVR`{{< params/smallfont-list >}}`posX`: This is a float value between 0 and 1, where 0 is the left edge of the screen and 1 is the right.`posY`: This is a float value between 0 and 1, where 0 is the top edge of the screen and 1 is the bottom.`width`: This is a float value between 0 and 1 and is used to set the width of the panel as a percentage of the screen width. For example, 0.5 would set the panel to be 50% of the screen width.`height`: This is a float value between 0 and 1 and is used to set the height of the panel as a percentage of the screen height. For example, 0.5 would set the panel to be 50% of the screen height.`offsetX`: This is a float value between 0 and 1 and is the offset for the panel "origin", where 0 is the left side of the panel and 1 is the right side.`offsetY`: This is a float value between 0 and 1 and is the offset for the panel "origin", where 0 is the top of the panel and 1 is the bottom.`cameraFlag`: This is an integer value that sets on which camera set the panel should be displayed. The following values are permitted: {{< params/smallfont-list >}}0 = none1 = cockpit only2 = outside only3 = both cockpit and outside{{< /params/smallfont-list >}}`hideInVR`: This can be used to hide the panel when in VR by setting it to 1 (true). The default value is 0 (false), meaning the panel will be be visible and follow the camera in VR.{{< /params/smallfont-list >}}The following example would be used to display a panel in the center of the screen when using the cockpit camera:`render_on_screen = 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 1, 1`**NOTE**: The width/height should be set to a 16:9 aspect ratio to ensure correct support in VR. | [List](../../cfg-files-general-information/#list) of 6 Floats and 2 Integers | No | | {{< anchor id="emissive" />}}`emissive` | Specify whether the gauge is emissive or not. This is set to 1 (TRUE) by default, so use 0 (FALSE) to disable. | Bool | No | | {{< anchor id="backlight" />}}`backlight` | Specify whether the gauge is back-lit or not, and whether it can be controlled through XML or not. The possible values are:{{< params/smallfont-list >}}**0** - Not backlit**1** - Backlit using the emissive value assigned in the texture.**2** - Backlit using the emissive value assigned in the texture, with the ability to mosulate this though XML.{{< /params/smallfont-list >}} | Integer | No | | {{< anchor id="gaugeNN-VCockpitN" />}}`gaugeNN` | Specifies which XML/{{< glossterm >}}WASM{{< /glossterm >}} gauge file to load and the X,Y position of the gauge. The Panel system starts loading gauges, starting from gauge00 until it reaches gauge99. After that, it loads gauge100, gauge101, and so on until it finds a break in the progression. This comma-delimited variable exists primarily to specify which gauge file to load and the X, Y position of the gauge, in millimeters. This will override the `size_mm` setting.The basic format is:`gaugeNN = gaugefile!gaugename, X, Y, W, H, parameters`Where:{{< params/smallfont-list >}}`gaugeNN`: indicates the order in which the gauge is loaded`gaugefile!`: indicates the specific file in which the gauge is found.`gaugename`: displays the name of the gauge you assign in your gauge code via the `GAUGE_NAME` variable (C based), or the file name (XML based).`X`, `Y`: indicates the X and Y position of the gauge, in millimeters, relative to the panel background.`W`: indicates the width of the gauge in millimeters.`H`: indicates the height of the gauge in millimeters.`parameters`: these are passed to the gauge as a text string argument.{{< /params/smallfont-list >}}Note that if you have set `size_mm` to be **1024**, the above values are *also* the pixel values, which can be much easier to deal with. | [List](../../cfg-files-general-information/#list) of mixed values | No(Yes if no `htmlgaugeNN` is specified) | | {{< anchor id="htmlgaugeNN" />}}`htmlgaugeNN` | Specifies which HTML gauge file to load and the X,Y position of the gauge. The Panel system starts loading gauges, starting from htmlgauge00 until it reaches htmlgauge99. After that, it loads htmlgauge100, htmlgauge101, and so on until it finds a break in the progression. This comma-delimited variable exists primarily to specify which gauge file to load and the X, Y position of the gauge, in millimeters. This will override the `size_mm` setting.The basic format is:`htmlgaugeNN = [html_file_path]?optionalParameter, X, Y, W, H, wasmParameter`Where:{{< params/smallfont-list >}}`htmlgaugeNN`: indicates the order in which the gauge is loaded`[html_file_path]`: indicates the specific `*.html` file in which the gauge is found.`?optionalParameter`: Additional HTML parameters are passed to the gauge.`X`, `Y`: indicates the X and Y position of the gauge, in millimeters, relative to the panel background.`W`: indicates the width of the gauge in millimeters.`H`: indicates the height of the gauge in millimeters.`wasmParameter`: if the gauge is part of a WASM module then you may also supply an additional parameter as the last argument. This parameter is a styring and will be passed to the gauge when it is created, where it is up to you what you do with it.{{< /params/smallfont-list >}}Note that if you have set `size_mm` to be **1024**, the above values are *also* the pixel values, which can be much easier to deal with. | String | No(Yes if no `gaugeNN` is specified) | {{< /table-wrapper >}} #### Note For Invisible Gauges It is possible to create an "invisible" gauge context that will not be rendered - but will still run - by providing "NO_TEXTURE" as the material code for the texture and by setting the size to (1,1), as shown in the example below: ``` cpp [VcockpitNN] size_mm = 1,1 pixel_size = 1,1 texture = NO_TEXTURE htmlgauge00 = MyGauges/MyGaugeManagers/Manager.html, 0, 0, 1, 1 ``` This is useful for creating "manager" or "data" gauges which only exist as a means to monitor something, or to move and process data, and which do not require any visual representation within the virtual cockpit displays. ### [VPaintingN] This section controls the drawing of registration numbers by the aircraft livery. Available parameters are: {{< table-wrapper "200px" "" "150px" "100px" >}} | Parameter | Description | Type | Required | |---|---|---|:---:| | {{< anchor id="size_mm-VPaintingN" />}}`size_mm` | The size of the texture to use, given as `width,height`. 1mm corresponds to 1 pixel of the texture image. | [List](../../cfg-files-general-information/#list) of 2 Floats | No | | {{< anchor id="texture-VPaintingN" />}}`texture` | This is the material ID of the texture to use for the livery painting.**IMPORTANT!** Previously - in FSX - this string needed to be preceeded with a $ sign. However in Microsoft Flight Simulator 2024 **this should not be used** as it is now used to indicate to the engine that the material is a collision material, which is obviously not the case for livery text. | String | No | | {{< anchor id="location" />}}`location` | Where the texture should be located on the aircraft. | Enum:{{< params/smallfont-list >}}exteriorinterior{{< /params/smallfont-list>}} | No | | {{< anchor id="paintingNN" />}}`paintingNN` | The path to the HTML that defines the number look/layout. To use the default settings, please use the following path:`Registration/Registration.html`At it's most basic the full path should look like this:`paintingNN=[html_file_path]?optionalParameter, X, Y, W, H`Here you give the path, then a comma separated list for the dimensions of the area to paint. The area is defined using the relative (x,y) coordinates to draw from, plus a width and a height . Note that the maximum for the width/height values should be the values defined in the `size_mm` parameter.Additional settings can be added to the path like this:`painting00 = Registration/Registration.html?font_color=0xe6ed01&stroke_size=120&stroke_color=0x3be0db, 0, 0, 2048, 512`The full list of settings that can be added in this way are:{{< params/smallfont-list >}} - `font_style` - can be one of: "bold", "italic", "bold-italic" - `font_color` - this is the color of the font - `font_scale` - this is a scale multiplier to be applied to the text - `stroke_size` - this is the text outline size - `stroke_color` - this is the text outline color - `back_color` - this is the color of a rectangular background under the text{{< /params/smallfont-list >}}All colours can be either a CSS predefined color like "red", "black, "blue" or a hexadecimal color code like "0xFF00FF". | String | No | {{< /table-wrapper >}} ### [Default View] This section controls the default view for the default 3D window. Available parameters are: {{< table-wrapper "200px" "" "150px" "100px" >}} | Parameter | Description | Type | Required | |---|---|---|:---:| | {{< anchor id="X" />}}`X` | Specifies the X position of the default 3D window. | Float | No | | {{< anchor id="Y" />}}`Y` | Specifies the Y position of the default 3D window. | Float | No | | {{< anchor id="SIZE_X" />}}`SIZE_X` | Specifies the width of the default 3D window. | Float | No | | {{< anchor id="SIZE_Y" />}}`SIZE_Y` | Specifies the height of the default 3D window. | Float | No | {{< /table-wrapper >}} ### [Color] This section controls the default color lighting settings. The `Day` and `Night` colors effectively determine the maximum and minimum brightness of the panel. The `Luminous` value specifies the color that can be applied to the luminous sections of the gauges. Available parameters are: {{< table-wrapper "200px" "" "150px" "100px" >}} | Parameter | Description | Type | Required | |---|---|---|:---:| | {{< anchor id="Day" />}}`Day` | The lighting color applied during daytime (comma separated list where each item is a colour component from 0 to 255: R,G,B). | [List](../../cfg-files-general-information/#list) of 3 Floats | No | | {{< anchor id="Night" />}}`Night` | The lighting color applied at night (comma separated list where each item is a colour component from 0 to 255: R,G,B). | [List](../../cfg-files-general-information/#list) of 3 Floats | No | | {{< anchor id="Luminous" />}}`Luminous` | The lighting color applied to gauges that are luminous (comma separated list where each item is a colour component from 0 to 255: R,G,B). | [List](../../cfg-files-general-information/#list) of 3 Floats | No | {{< /table-wrapper >}} ### [EFB] This section can be used to set certain parameters to be used by the {{< glossterm >}}EFB{{< /glossterm >}}. Available parameters are as follows: {{< table-wrapper "200px" "" "150px" "100px" >}} | Parameter | Description | Type | Required | |---|---|---|:---:| | {{< anchor id="size_mm-EFB" />}}`size_mm` | The size of the texture to use, given as `width,height`. 1mm corresponds to 1 pixel of the texture image. | [List](../../cfg-files-general-information/#list) of 2 Floats | Yes | | {{< anchor id="pixel_size-EFB" />}}`pixel_size` | This the pixel `width` and `height` to be displayed within the space defined by size_mm. Normally the values here match those given in the size_mm parameter, but they may be different if you require a higher pixel density. | [List](../../cfg-files-general-information/#list) of 2 Floats | Yes | | {{< anchor id="orientation" />}}`orientation` | This takes a string that is used to define the initial orientation of the EFB display (it can later be changed by the user). | String:{{< params/smallfont-list >}} - horizontal - vertical{{< /params/smallfont-list >}} | Yes | | {{< anchor id="texture-EFB" />}}`texture` | This is the material ID of the texture to use for the EFB display. | String | Yes | {{< /table-wrapper >}}