Binding icons and Setting Alternate Images
From LinuxMCE
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.
Examples of Alternate Image use
PK_DesignObj | Description | Image | What's used |
---|---|---|---|
3275 | objHouseStatusIndicator | 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 | 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 | 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 | 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.) |