MOUSE_X_RIGHT_UP()

MOUSE_X_RIGHT_UP(N)

RETURNS MOUSE X-POSITION WHEN RIGHT BUTTON OF MOUSE IS RELEASED ON THE SYSTEM OBJECT NUMBER N

  • Type: Function
  • Parameter: 1
  • Group: Mouse

ACTION

The function MOUSE_X_RIGHT_UP(N) returns the position of the mouse on the X-axis of the system object number N, at the moment when mouse right button is released.

The position 0 is the position of upper left corner of The system object.

SYNTAX: Result=MOUSE_X_RIGHT_UP(N)

  • N = system object number (integer or real). Must be greater than or equal to 0 and less than or equal to the allowed maximum number of system objects.

USE

  • The function MOUSE_X_RIGHT_UP() is used to know the position of mouse on a system object when mouse right button is released, in 2D and 3D games.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of system objects.
  • If number N is less than 0.
  • If system object number N does not exist.
  • If the object number N is of type : MAIN_MENU, SUB_MENU, SOUND, OPEN_DIALOG, SAVE_DIALOG, DLIST, TIMER, MAIN_MENU_POP,
  • OPEN_DIALOG_PIC, SAVE_DIALOG_PIC, SERIAL.

EXAMPLE

picture 1

rem print X and Y positions of the mouse when the right button is released on picture1

if mouse_right_up(1)=1

print mouse_x_right_up(1)

print mouse_y_right_up(1)

end_if

SEE ALSO

MOUSE_X_POSITION()

MOUSE_Y_POSITION()

MOUSE_RIGHT_UP()

MOUSE_RIGHT_DOWN()

MOUSE_LEFT_UP()

MOUSE_LEFT_DOWN()

MOUSE_X_RIGHT_DOWN()

MOUSE_Y_RIGHT_UP()

MOUSE_Y_RIGHT_DOWN()

MOUSE_X_LEFT_UP()

MOUSE_X_LEFT_DOWN()

MOUSE_Y_LEFT_UP()

MOUSE_Y_LEFT_DOWN()