• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

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?
 
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.
Back
Top