size_x
size_y
Horizontal and vertical size of a panel or view, in pixels.
Range:
0 .. screen size
Type:
var
Remarks:
- The panel size is multiplied with the panel scale. It determines the area within which the panel reacts on mouse clicks.
- If no size is given in a panel definition, the panel is set to the size of the panel bitmap. If neither a size nor a bitmap is given, the panel is set to the size of its largest element (f.i. a button). If no size is given in a view definition, the view is set to the size of
its render target.
- If the panel size is smaller than the panel bitmap, the bitmap is clipped. If the size is larger, the bitmap is repeated on the panel background, and thus can be used for a background pattern. Repeated or tiled textures must fulfil the size restrictions mentioned under File Formats, i.e. a power of two in size, with a minimum size of 8.
Example:
PANEL* red_square =
{
size_x = 100;
size_y = 100;
red = 255;
green = 0;
blue = 0;
flags = LIGHT | SHOW;
}
See also:
PANEL, VIEW, pos_x, scale_x
► latest version online