pan_setwindow(PANEL*, var num, var x, var y, var dx, var dy, BMAP* bmap, var* px, var*py)
Adds or modifies a window element on a panel. LC
Parameters:
PANEL* |
Panel pointer. |
num |
Number of an existing window element (1 = first window of the panel) or 0 for adding a new window to the panel. |
x, y, ... |
Parameters similar to the window element,
but with the parameter types given above. |
Returns:
Number of the element, or 0 if the element could not be found or created.
Example (lite-C):
var altitude = 0;
function main()
{
PANEL* my_panel = pan_create(NULL,0);
my_panel.bmap = bmap_create("frame.pcx");
pan_setwindow(my_panel,0,40,10,178,160,bmap_create("height.pcx"),0,altitude);
set(my_panel,SHOW);
for (altitude = 0; altitude < 200; altitude += time_step) wait(1);
for (altitude = 200; altitude > 0; altitude -= time_step) wait(1);
}
See also:
PANEL, window, pan_setbutton, pan_setslider, pan_setdigits, pan_setpos
► latest version online