video_window(VECTOR* pos,VECTOR* size,var style,STRING* title)
Changes the position, size, style or title of the engine window.
Parameters:
pos |
vector containing the new x and y position in pixels, or NULL for
no change |
size |
vector containing the new x and y size in pixels, or NULL for no
change |
title |
new title of the window, or NULL for no change |
style |
0 for no change, or a combination of the following modes:
1 |
no border |
2 |
thin border |
4 |
thick border
that allows resizing the window |
16 |
title bar and border |
32 |
close icon (requires title bar) |
64 |
minimize icon (requires close icon) |
128 |
maximize icon (requires close icon) A7.80 |
256 |
hide the window |
|
Remarks:
- Changing the window size does not change the engine resolution. Use
video_switch() or video_set() for changing
the engine resolution.
-
When the border style is changed, the size vector should also be set to the current engine resolution (screen_size). Otherwise the window will keep its previous size, but due to the changed border the inner client area has now a different size and will appear distorted.
-
Except for setting the window title, this function can not be called before the video device is initialized, which happens in the first frame under lite-C.
-
Resizing the window triggers the on_maximize, on_minimize, or on_resize event.
-
Clicking the close icon triggers the on_close event.
Speed:
Medium
Example:
// place the window at position (500,300) and remove the border
video_window(vector(500,300,0),vector(800,600,0),1,NULL);
See also:
video_switch, video_set,
window_pos
► latest
version online