Gamestudio Links
Zorro Links
Newest Posts
phantom() not defined in indicators.c
by jcl. 08/07/26 11:45
Pause button for evaluation shell?
by jcl. 08/07/26 11:43
Accepting new programming clients
by AndrewAMD. 08/06/26 21:25
Fun Arcade Car Physics (nfs style)
by Ezzett. 08/02/26 21:11
ZorroGPT
by TipmyPip. 07/31/26 22:56
Wolfram Mathematica with Zorro
by TipmyPip. 07/30/26 02:07
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (AndrewAMD), 1,772 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
riggi89, shuhari, KD1990, Student_64151, Koti
19222 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 | 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