• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Mouse click?

Status
Not open for further replies.
Level 3
Joined
Feb 20, 2007
Messages
32
I went over the API's, but is there any way to get a mouse click event, or check if either side of the mosue is depressed?
 
Level 21
Joined
Aug 3, 2004
Messages
710
With the next release, which is right around the corner, the MouseAPI will be upgraded with a two new natives:
JASS:
//===================================================
// Mouse API constants
//===================================================
globals
	constant integer 	EVENT_LMOUSEUP 			= 0
	constant integer 	EVENT_LMOUSEDOWN 		= 1
	constant integer 	EVENT_RMOUSEUP 			= 2
	constant integer 	EVENT_RMOUSEDOWN 		= 3
	constant integer 	EVENT_MMOUSEUP 			= 4
	constant integer 	EVENT_MMOUSEDOWN 		= 5
	constant integer 	EVENT_MOUSEWHEEL 		= 6
endglobals
native TriggerRegisterMouseEvent takes trigger whichTrigger, integer eventtype returns nothing
native GetTriggerWheelDelta takes nothing returns integer

If you use the EVENT_MOUSEWHEEL, you can use the GetTriggerWheelDelta afterwards, to see what way the wheel scrolled, it's positive if up, and negative if down.
 
Status
Not open for further replies.
Top