How do I disable hiding mouse cursor after pressing ALT key

Get help using Construct 2

Post » Mon Aug 17, 2015 11:09 am

My game is exported in NW. I'd like to add ALT+ENTER control (switching between windowed and fullscreen mode).
So I made it like this:
Image

But after using ALT+ENTER mouse cursor dissappears (game has focus as I can use keyboard controls but there's no cursor visible). To show it again I have to press ESC or ALT+TAB.
Can I disable hiding mouse cursor after pressing ALT key?
B
55
S
14
G
10
Posts: 287
Reputation: 7,677

Post » Mon Aug 17, 2015 10:04 pm

Maybe try using a sprite mouse cursor?
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,414
Reputation: 4,822

Post » Tue Aug 18, 2015 8:03 am

I don't uderstand how that could solve my problem. Could you tell me more?
B
55
S
14
G
10
Posts: 287
Reputation: 7,677

Post » Tue Aug 18, 2015 5:28 pm

Under the Mouse object, you can set the cursor to a sprite object. That might bypass the inherent browser behavior.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,414
Reputation: 4,822

Post » Wed Aug 19, 2015 10:39 am

Unfortunately this doesn't help.
After pressing ALT+ENTER my game behaves like ALT was never released (in fact it was). So I'm not getting mouse position info (mouse.x and mouse.y), and game doesn't react on mouse clicks.
B
55
S
14
G
10
Posts: 287
Reputation: 7,677

Post » Wed Aug 19, 2015 2:58 pm

You could do a super hack and just have a sprite that looks like a mouse cursor and set it to Mouse.AbsoluteX and Mouse.AbsoluteY every tick. Kind of like a 'virtual' mouse cursor.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,414
Reputation: 4,822


Return to How do I....?

Who is online

Users browsing this forum: zsoldiers and 11 guests