View Single Post
Old 03-01-2017, 12:04 AM   #1
Bobflip
Human being with feelings
 
Join Date: Nov 2016
Posts: 332
Default onMouseOut() not being called

I have this code, with mouseOver being initialised to FALSE, and draw() only draws lines for the crossfair if the mouseOver is TRUE. Moving the mouse over the control successfully activates the crosshair, but moving away from the control does not.

Code:
	void OnMouseOver(int x, int y, IMouseMod* pMod)
	{
		mouseOver = TRUE;
		crosshairX = x;
		crosshairY = y;
	}

	void onMouseOut()
	{
		mouseOver = FALSE;
	}
For testing, I commented out all of OnMouseOver and put the code into onMouseOut, and it's not being called at all! I called pGraphics->HandleMouseOver(true) when setting up the GUI, is there something else I'm missing?

Last edited by Bobflip; 03-02-2017 at 07:34 AM.
Bobflip is offline   Reply With Quote