Targetware: Customizing the User Interface


Widget Type: Panel

Panels are used to display rectangles of graphics, either a single sheet of color, or a texture provided by the the graphics file given in the "texture = " line. Panels can overlap each other, each succeeding panel will be drawn on top of the previous ones, if they overlap.

Sample Panel Code

  [Page 1 Widget 1]
# top
type = panel
pos = 0, 0
size = 800, 370
color = 255, 255, 255, 255
texture = pg1.tga
texcoord1 = 0, 0
texcoord2 = 0.781, 0.36133

This tells the game engine to draw a panel 800 pixels wide, 370 pixels tall, starting in the upper left hand corner of the screen. The panel is assigned a white color, but the game will only use that to set the brightness of the panel, the actual color itself will come from the texture we told it to use, the graphics found in the file "pg1.tga".

Special Function Panels

Some panels can be used to display game- and scenario- specific information:

    1 tpc chart
  2 current scenario splashscreen
100 scenario image
101 team image
102 mission image
103 unit image
104 handbook image

Scenario, Team, Mission, and Unit images must be specified by the scenario designer, in the scenario file. If a scenario is loaded with no images specified, and the user calls up the panel for Mission or Scenario visual briefing, the panel will be blank. The Pilot's Handbook image must be specified in the .acm file of the plane selected by the player in order for it to dispaly.