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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

cr_handpoint<br />

cr_size_all<br />

In particular, to hide the mouse cursor, use cr_none as value.<br />

window_get_cursor() Returns the cursor used in the window.<br />

window_set_color(color) Sets the color of the part of the window that is<br />

not used for displaying the room.<br />

window_get_color() Returns the window color.<br />

window_set_region_scale(scale,adaptwindow) If the window is larger<br />

than the actual room normally the room is displayed in a region centered in<br />

the window. It is though possible to indicate that it must be scaled to fill the<br />

whole or part of the window. A value of 1 is no scaling. If you use a value of 0<br />

the region will be scaled to fill the whole window. If you set it to a negative<br />

value it will be scaled to the maximal size inside the window while maintaining<br />

the aspect ratio (this is often what you want). adaptwindow indicates<br />

whether the window size must be adapted if the scaled room does not fit in.<br />

Adapting the window is only effective when the scale factor is positive.<br />

window_get_region_scale() Returns the scale factor for the drawing<br />

region.<br />

The window has a position on the screen and a size. (When we talk about position and size we<br />

always mean the client part of the window <strong>with</strong>out the borders.) You can change these<br />

although you hardly ever do from <strong>with</strong>in your game. Normally they are determined<br />

automatically or by the player. The following functions can be used to change the window<br />

position and size. Note that these functions deal <strong>with</strong> the windowed mode. If the window is in<br />

full screen mode they can still be used but will only have effect when switching full screen<br />

mode off.<br />

window_set_position(x,y) Sets the position of the (client part of the)<br />

window to the indicated position.<br />

window_set_size(w,h) Sets the size of the (client part of the) window to<br />

the indicated size. Note that is the indicated size is too small to fit the drawing<br />

region it is kept large enough for the region to fit it.<br />

window_set_rectangle(x,y,w,h) Sets the position and size of the<br />

window rectangle. (Does both previous routines in one step.)<br />

window_center() Centers the window on the screen.

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

Saved successfully!

Ooh no, something went wrong!