PANEL* name = { ... }
Panels are the basic elements for 2D games as well as for the user interface
- the GUI - of 3D games. They are rectangular areas with a simple
image oder more complex elements like texts, numbers, instruments, buttons
or other controls. They move over the screen and can be
used for cockpits, dashboards, inventories and inventory items,
buttons,
background screens
or 2D sprites.
Example:
PANEL* aircraft_pan =
{
pos_x = 4; pos_y = 4;
digits(0,0,4,digit_font,1000,player._rpm);
digits(60,0,4,digit_font,1,player._speed);
digits(120,0,4,digit_font,1,my_height);
window(200,0,40,20,"compass.pcx",compass_pos.x,compass_pos.y);
flags = VISIBLE;
}
Remarks:
- Global antialiasing
settings in the 3D card
settings menu can make panels and bitmap fonts look blurry, depending
on the 3D hardware and driver version.
Use d3d_antialias for scene antialiasing.
-
The PANEL struct is defined in include\atypes.h.
See also:
bmap, layer, pos_x,
pos_y, alpha, flags, button, vslider, hslider, window, digits, mouse_map, event,
pan_create
► latest
version online