Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Mouse Button Always Down

Author
Message
Vlad
18
Years of Service
User Offline
Joined: 5th Oct 2005
Location:
Posted: 29th Dec 2005 16:51
Hi

I'm building a puzzle game where I want the player to click the piece they want to choose. The problem I'm having is that it is possible for the player for keep the mouse clicked and drag the mouse around

The maths behind the calcs of this game are not very complicated so the loops are very fast, at "eye" speed, it's instant, so the player can simply click the mouse and drag it around clearing a level quite fast and not even having to think about it.

How can I make this click and drag behaviour be prevented?

Thank you in advance

V

I'm pretty sure I know everything. Doubts are something rare in me and I am never wrong, as this signature can prove.
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 29th Dec 2005 16:59
Have a state that is set to one, on first mouse click and when your action has finished, and 0 when released. Thus you then do the selection when the mouse is clicked, and state is 0, and ignore anthing where the mouse is down and the state is 1.

Vlad
18
Years of Service
User Offline
Joined: 5th Oct 2005
Location:
Posted: 29th Dec 2005 17:04 Edited at: 29th Dec 2005 17:09
It's so obvious I feel dumb now. For some weird reason I was looking for some weird solution within the SDK that it's not really needed.

Thank you mate... I'm going to hide in some hole now.

V

EDIT:

This helps too and keeps the motion going if there are animations or something going on.



I'm pretty sure I know everything. Doubts are something rare in me and I am never wrong, as this signature can prove.

Login to post a reply

Server time is: 2024-05-06 13:29:33
Your offset time is: 2024-05-06 13:29:33