Binding icons and Setting Alternate Images

From LinuxMCE
Revision as of 18:01, 11 August 2013 by Tschak909 (Talk | contribs)

Jump to: navigation, search

Orbiter has some facilities for dynamically changing the images displayed on an Orbiter screen. These essentially fall into two categories, Update Object Image and Binding Icons/Setting Alternate Images.

Bitmap DesignObj States

A Bitmap DesignObjType can have several image states:

  • Normal - This is the normal rendered image, and is always rendered by OrbiterGen.
  • Selected - This is the image that is shown for a moment while Activating a bitmap, either by pressing on the touch screen, or selecting with remote control. Nominally, this image is displayed for 0.5 seconds, and the delay time is not configurable.
  • Highlighted - When a DesignObj is marked with Is Tab Stop, this indicates that either arrow keys on a remote or a touch screen, can position a cursor over this Bitmap, and it is considered Highlighted.
  • Any number of Alternate Images - Can also be specified. OrbiterGen will render each of these states for this DesignObj, these are not normally activated by user action, but are activated by one of two methods below.

Set Graphic to Display

Orbiters can be sent a Set Graphic To Display, which takes two parameters

  • The DesignObj to change, either in short form, e.g. 6256, or in fully qualified screen form, 6255.0.0.6256
  • The Image to display, which can be one of the following:
# Description
0 Display the image specified by Graphic Filename(1). This is the normal, deselected state.
Display the selected state specified by Selected Graphic File(50).
Display the highlighted state specified by Highlighted Graphic File (59)
>0 Anything greater than 0 displays the specified Alternate graphic image. These are specified in order in the Alt Graphic File(51) field, delimited by semicolon.

Examples of Alternate Image use

PK_DesignObj Description Image What's used
3275 objHouseStatusIndicator ObjHouseStatusIndicator.png This Bitmap is used to indicate house status, there are 5 possible alternate images presented in the icoHouseStatus child inside this object, and these are selected by Set Bound Icon. the UI2 variant of this image also uses Highlighted and Selected states in one of the children to highlight the text part. See the note about UI2 below.
4781 butUserStatus ButUserStatus.png This Bitmap is used to convey each user's user mode. There are again, 5 possible alternative images presented in the icoUserMode, for each user mode. the UI2 variant of this image also uses Highlighted and Selected states in one of the children to highlight the text part. See the note about UI2 below.
5924 butP1KeypadSelect ButP1KeypadSelect.png This Bitmap is used as a radio button toggle between two buttons intended to select whether Player 1 or Player 2 uses a particular orbiter's keypad. There are no normal images, just alternate images which are set both at Startup and on load of the screen. This prevents the problem of odd rendering behavior when these buttons are selected.
6262 butWeatherNow ButWeatherNow.png This is part of a group of Bitmap buttons to indicate which weather screen is selected. A normal state is used for the deselected state, and one alternate image is used for the selected state. (Selected can't be used, because that is only when a Bitmap is activated, and Highlighted also can't be used, because it would change the moment any arrow buttons or keys were to be used.)