window_view_mouse_get_y( id );
Argument | Description |
---|---|
id | The id of the view to compare the mouse position to. |
Returns: Real
This function will return the mouse y position relative to the view selected. The following image illustrates how this works:
NOTE: For regular mouse functions see the section on Mouse Input.
if mouse_check_button_pressed(mb_left)
{
var xx, yy;
xx = window_view_mouse_get_x(0);
yy = window_view_mouse_get_y(0);
if xx > 0 && xx < 32 && yy
> 0 && yy < 32
{
b_press[0] = true;
}
}
The above code will check for a mouse button being pressed, and if it is it then gets the mouse position relative to the view[0] and compares it to see if a variable should be set to true.