Hide the cursor?
Posted 22 September 2010 - 07:25 PM
One object. Global Left Down is "window_set_cursor(cr_none);", Global Left Release is "window_set_cursor(cr_default);"
Expected behaviour: When I click in the window, the cursor disappears until I release the mouse button.
What happened: Bugger all. The cursor did not disappear.
Posted 22 September 2010 - 07:38 PM
Posted 22 September 2010 - 07:41 PM
I've added the following to the Draw event of my test object (which I remind you is all alone in the game, the only object in the room): "draw_text(0,0,window_get_cursor());" - it corrctly shows the value of cr_default and cr_none as needed. But the cursor is not disappearing.
EDIT: I unchecked "Show cursor" in the global game settings. window_get_cursor returns -1 (cr_none) and the cursor is gone. Then I click. When I release the mouse, the cursor value becomes 0 (cr_default) and the cursor appears, but doesn't disappear again on the next click.
ANOTHER EDIT: I've added this to the Step event:
if(mouse_x > 200) window_set_cursor(cr_none);The cursor disappears as it should.
The object info is now:
Information about object: object0 Sprite: <no sprite> Solid: false Visible: true Depth: 0 Persistent: false Parent: <no parent> Mask: <same as sprite> Step Event: execute code: if(mouse_x > 200) window_set_cursor(cr_none); else window_set_cursor(cr_default); Mouse Event for Glob Left Pressed: execute code: window_set_cursor(cr_none); Mouse Event for Glob Left Released: execute code: window_set_cursor(cr_default); Draw Event: execute code: draw_text(0,0,window_get_cursor());It appears to have something to do with clicking...
Edited by Kolink, 22 September 2010 - 07:47 PM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users