Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (Akow), 1,403 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to receive mouse release events? #188130
03/12/08 14:12
03/12/08 14:12
Joined: Feb 2008
Posts: 23
Sjlver Offline OP
Newbie
Sjlver  Offline OP
Newbie

Joined: Feb 2008
Posts: 23
Hello,

Is there a simple way in gamestudio to receive an event when a mouse button is released? In our game, we want to select multiple entities by dragging a rectangle with the mouse, much like in AOE, Warcraft, Windows Explorer etc.

I reckon it's possible to detect a release by checking the state of the mouse buttons in each frame, but that's not very elegant is it?

Greetings and thanks for help,
Jonas

Slightly off-topic PS: As for selecting the entities afterwards, I was thinking of using vec_to_screen() for each entity position, then checking if they are inside the rectangle (and the distance is not toooo big). This is rather slow, though, especially with many entities. Any simpler idea?

Re: How to receive mouse release events? [Re: Sjlver] #188131
03/12/08 14:45
03/12/08 14:45
Joined: Aug 2007
Posts: 44
QLD, Australia
Serex Offline
Newbie
Serex  Offline
Newbie

Joined: Aug 2007
Posts: 44
QLD, Australia
Vadim647 converted some old c&c code to lite-c which does what you are looking for. Can be found here


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1