window_pos
Desktop position of the upper left corner of the engine window.
Remarks:
- This vector can be used to store window positions, or to move the engine
window with the mouse.
- Use video_window for changing
the window position.
- The xy components of this vector are 0 in fullscreen mode.
Range
0 .. desktop size
Type
VECTOR*, read-only
Example:
// Move the engine window by clicking anywhere on a panel and dragging it over the screen
// Assign this to a panel event
function kMoveWindow()
{
var vOldPos[3];
var vDiff[3];
vec_set(vOldPos,mouse_cursor);
// move the window so that the mouse is always at the same panel position
while(mouse_left && window_focus)
{
vec_diff(vDiff,mouse_cursor,vOldPos);
vec_add(vDiff,window_pos);
video_window(vDiff,NULL,0,NULL);
wait(1);
}
}
See also:
screen_size, video_window,
window_focus
► latest
version online