08.11.2012 Views

Designing Games with Game Maker - YoYo Games

Designing Games with Game Maker - YoYo Games

Designing Games with Game Maker - YoYo Games

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Sometimes it is useful to get information about the position of the mouse on the display or to<br />

change this position. For this the following functions exist:<br />

display_mouse_get_x() Returns the x-coordinate of the mouse on the<br />

display.<br />

display_mouse_get_y() Returns the y-coordinate of the mouse on the<br />

display.<br />

display_mouse_set(x,y) Sets the position of the mouse on the display to<br />

the indicated values.<br />

The window<br />

The actual game happens in a window. This window has a number of properties, like whether<br />

it has a border, whether it is full screen, etc. Normally these are set in the <strong>Game</strong> Settings.<br />

But you can change then during the game. The following functions exist for this:<br />

window_set_visible(visible) Sets whether the game window is visible.<br />

Clearly you normally want the window to remain visible during the whole<br />

game. The program will not receive keyboard events when the window is<br />

invisible.<br />

window_get_visible() Returns whether the game window is visible.<br />

window_set_fullscreen(full) Sets whether the window is shown in full<br />

screen mode.<br />

window_get_fullscreen() Returns whether the window is shown in full<br />

screen mode.<br />

window_set_showborder(show) Sets whether the border around the<br />

window is shown. (In full screen mode it is never shown.)<br />

window_get_showborder() Returns whether the border around the window<br />

is shown in windowed mode.<br />

window_set_showicons(show) Sets whether the border icons (iconize,<br />

maximize, close) are shown. (In full screen mode these are never shown.)<br />

window_get_showicons() Returns whether the border icons are shown in<br />

windowed mode.<br />

window_set_stayontop(stay) Sets whether the window must always stay<br />

on top of other windows.<br />

window_get_stayontop() Returns whether the window always stays on top<br />

of other windows.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!