Targetware: Customizing the User Interface


Widget Type: Display

Displays are used to display text generated by the game, not by the user interface designer. Depending on the function number chosen, a display might show the player a list of available servers, a list of players online, or show a text briefing for a scenario, mission, team, or aircraft unit.

Supporting Double-Clicks

Making a display double-clickable is very easily. In the "function = x" line, list the display function you want shown, then add a comma-separated list of button functions you want to happen if the user double-clicks on a row in the display. For example: "function = config All, show EditWin". In this case, the display would show a list of all config settings, and when the user double-clicked one, the widget named "EditWin" would be displayed.

Sample Display Code

  [Game Widget 75]
# Select Unit - mission info - text
type = display
pos = 0.38, 0.05
pos_type = 2, 2
size = 0.6, 0.4
size_type = 2, 2
color = 255, 255, 255, 127
label_color = 0, 0, 0, 255
texture = paper.tga
texcoord1 = 0,0
texcoord2 = 1,1
hl_color = 0, 0, 255, 127
hl_texture =
hl_texcoord1 =
hl_texcoord2 =
disable = 0
emboss = 1
visible = 0
scroll_size = 10
function = 303

This display is used to show a user a text briefing for the mission they just selected. It uses a generic paper-like background which is 50% transparent, so that the player can see through it to whatever is showing in the background.

Display Functions

    1 server list
  2 server info
101 mod list
102 mod info
201 scenario list
202 scenario info
300 text file
301 scenario briefing
302 team briefing
303 mission briefing
304 unit briefing
305 pilot's handbook
400 metaserver mod list
500 calibration
501 player list