Targetware: Customizing the User Interface


Widget Type: Menu

This class of widget is somewhat different from the others. There are only 2 options, in-flight and pre-flight, but each type has it's own sub-section of code that sets out the text and functionality of its menu items. You can add separator lines to the menu items by using sequentially numberd "-sepx" lines, where "x" is the number of the separator.

Sample Menu Code

  [Game Widget 10]
# pre-flight menu
type = menu
pos = 10, 10
pos_type = 1, 1
size =
label = Main Menu
label_color = 0, 0, 0, 255
color = 127, 127, 127, 127
texture =
texcoord1 =
texcoord2 =
hl_color = 0, 0, 255, 127
hl_texture =
hl_texcoord1 =
hl_texcoord2 =
disable_text_color =
disable_color =
disable_texture =
disable_texcoord1 =
disable_texcoord2 =
visible = 0
center = 0
disable = 0
emboss = 1
function = 1

[Game Widget 10 Menu Items]
Start Flight = 1015
-sep1
Select Unit = 510, 412
Select Options = 510, 413
Select Skin = 510, 414
-sep2
Scenario Briefing = 510, 415, 417, 419
Team Briefing = 510, 420, 422, 424
Mission Briefing = 510, 465, 467, 469
Unit Briefing = 510, 425, 427, 429
Pilot's Handbook = 510, 430, 432, 434
-sep3
Player List = 510, 435, 436
-sep4
Hide Menu = 510
Disconnect = 1017

This is the Pre-Flight Menu from the default Targetware User Interface. For the menu items, the text for the menu items is added from top to bottom. The menu item text is given on the left, on the right is a button function number (or numbers) that will be executed when the user selects that menu item.

Menu Functions

The numbers corresponding to Pre-Flight and In-Flight menus are as below:

  1 Pre-Flight
2 In-Flight