How do I detect mouse clicks?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Hsyenoh05
Posts: 5
Joined: Tue Oct 18, 2022 12:29 pm

How do I detect mouse clicks?

Post by Hsyenoh05 »

I am not an expert when it comes to the event receiver, I would like to know how i can detect mouse clicks/position since I tried to make my own and failed.
Seven
Posts: 1034
Joined: Mon Nov 14, 2005 2:03 pm

Re: How do I detect mouse clicks?

Post by Seven »

derive something from IEventReceiver
set it as the event receiver
and detect the mouse event during the OnEvent(const SEvent & e) call.

Code: Select all

class myEventHandler : public IEventReceiver
{
public:
       virtual bool OnEvent(const SEvent &e)
       {
		switch (e.EventType)
		{
		  case EEVENT_TYPE::EET_MOUSE_INPUT_EVENT: 
                  {
  	   	     switch (e.MouseInput.Event)
		     {
		         case EMIE_LMOUSE_PRESSED_DOWN:
		         {
                              printf("Left Mouse Button Pressed at position X = %d  Y = %d/n", e.MouseInput.X, e.MouseInput.Y );
                              return true;
 		         } break;
                      }                  
                  }
		}

		// we did not handle this event
		return false;             
       }
}
the mouseinput event structure has lots of information in it.

Code: Select all

	//! Any kind of mouse event.
	struct SMouseInput
	{
		//! X position of mouse cursor
		s32 X;

		//! Y position of mouse cursor
		s32 Y;

		//! mouse wheel delta, often 1.0 or -1.0, but can have other values < 0.f or > 0.f;
		/** Only valid if event was EMIE_MOUSE_WHEEL */
		f32 Wheel;

		//! True if shift was also pressed
		bool Shift:1;

		//! True if ctrl was also pressed
		bool Control:1;

		//! A bitmap of button states. You can use isButtonPressed() to determine
		//! if a button is pressed or not.
		//! Currently only valid if the event was EMIE_MOUSE_MOVED
		u32 ButtonStates;

		//! Is the left button pressed down?
		bool isLeftPressed() const { return 0 != ( ButtonStates & EMBSM_LEFT ); }

		//! Is the right button pressed down?
		bool isRightPressed() const { return 0 != ( ButtonStates & EMBSM_RIGHT ); }

		//! Is the middle button pressed down?
		bool isMiddlePressed() const { return 0 != ( ButtonStates & EMBSM_MIDDLE ); }

		//! Type of mouse event
		EMOUSE_INPUT_EVENT Event;
	};
Seven
Posts: 1034
Joined: Mon Nov 14, 2005 2:03 pm

Re: How do I detect mouse clicks?

Post by Seven »

here is the eventhandler that I use. It parses all events into function calls. anything that can receive events is then derived from this class and I override the individual function calls as needed .

Code: Select all

#pragma once

#include "_IGE_Defines.h"
#include "_IGE_Utils.h"

/*
*	parse SEvents into funciton calls
*/

namespace IGE
{
	enum keyStatesENUM { UP, DOWN, PRESSED, RELEASED };

	class IGE_API IGE_EventHandler : public IEventReceiver
	{
	private:
		IGE_VARIABLE_SETGET(int,HandlerId,-1);								// id for logging
		IGE_VARIABLE_SETGET(stringc, HandlerName,IGE_DEFAULT_STRING);		// name for logging 	
		IGE_VARIABLE_SETGET(bool, DefaultGUIReturnValue,false);					// what to return if not overridden
		IGE_VARIABLE_SETGET(bool, DefaultMouseReturnValue,false);					// what to return if not overridden
		IGE_VARIABLE_SETGET(bool, DefaultKeyboardReturnValue,false);					// what to return if not overridden	
		IGE_VARIABLE_SETGET(bool, DefaultUserReturnValue,false);					// what to return if not overridden

		// Keyboard key states.
		keyStatesENUM keyState[KEY_KEY_CODES_COUNT];

	public:
		// logging functions and variables
		static	long gEventLoggingFlags;
		bool isEventFlagged(DWORD flag) { return gEventLoggingFlags & flag; }
		void setEventFlag(DWORD flag) { gEventLoggingFlags |= flag; }
		void resetEventFlag(DWORD flag) { gEventLoggingFlags &= ~flag; }
		void toggleEventFlag(DWORD flag) { if (isEventFlagged(flag)) resetEventFlag(flag); else setEventFlag(flag); }

	public:
		// empty class contrutor / destructor
		// use initilize, create and cleanup instead
		IGE_EventHandler();
		virtual ~IGE_EventHandler();

		// main irrlicht event arrives here first and gets parsed into function calls below
		virtual bool OnEvent(const SEvent& e);

		// top level event parsing
		virtual bool onEventGUI(const SEvent& e);
		virtual bool onEventMOUSE(const SEvent& e);
		virtual bool onEventKEYBOARD(const SEvent& e);
		virtual bool onEventLOG(const SEvent& e);
		virtual bool onEventTOUCH(const SEvent& e);
		virtual bool onEventJOYSTICK(const SEvent& e);
		virtual bool onEventUSER(const SEvent& e);

		// special case - we return false on these to make sure they cascade regardless of what we do
		virtual bool onElementFocusLost(const SEvent& e) { return false; }
		virtual bool onElementFocused(const SEvent& e) { return false; }
		virtual bool onElementHovered(const SEvent& e) { return false; }
		virtual bool onElementLeft(const SEvent& e) { return false; }
		virtual bool onElementClosed(const SEvent& e) { return false; }

		// parsed gui events
		virtual bool onButtonClicked(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onScrollbarChanged(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onCheckboxChanged(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onListboxChanged(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onListboxSelectedAgain(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onFileSelected(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onDirectorySelected(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onFileChooseDialogCancelled(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onMessageboxYes(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onMessageboxNo(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onMessageboxOK(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onMessageboxCancel(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onEditboxEnter(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onEditboxChanged(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onEditboxMarkingChanged(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onTabChanged(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onMenuitemSelected(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onComboboxChanged(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onSpinboxChanged(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onTableChanged(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onTableHeaderChanged(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onTableSelectedAgain(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onTreeviewNodeDeselect(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onTreeviewNodeSelect(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onTreeviewNodeExpand(const SEvent& e) { return m_DefaultGUIReturnValue; }
		virtual bool onTreeviewNodeCollapse(const SEvent& e) { return m_DefaultGUIReturnValue; }

		//  parsed mouse events
		virtual bool onMouseMoved(const SEvent& e) { return m_DefaultMouseReturnValue; }
		virtual bool onMouseWheel(const SEvent& e) { return m_DefaultMouseReturnValue; }
		virtual bool onLMouseButtonDown(const SEvent& e) { return m_DefaultMouseReturnValue; }
		virtual bool onRMouseButtonDown(const SEvent& e) { return m_DefaultMouseReturnValue; }
		virtual bool onMMouseButtonDown(const SEvent& e) { return m_DefaultMouseReturnValue; }
		virtual bool onLMouseButtonUp(const SEvent& e) { return m_DefaultMouseReturnValue; }
		virtual bool onRMouseButtonUp(const SEvent& e) { return m_DefaultMouseReturnValue; }
		virtual bool onMMouseButtonUp(const SEvent& e) { return m_DefaultMouseReturnValue; }
		virtual bool onLMouseDoubleClick(const SEvent& e) { return m_DefaultMouseReturnValue; }
		virtual bool onRMouseDoubleClick(const SEvent& e) { return m_DefaultMouseReturnValue; }
		virtual bool onMMouseDoubleClick(const SEvent& e) { return m_DefaultMouseReturnValue; }
		virtual bool onLMouseTripleClick(const SEvent& e) { return m_DefaultMouseReturnValue; }
		virtual bool onRMouseTripleClick(const SEvent& e) { return m_DefaultMouseReturnValue; }
		virtual bool onMMouseTripleClick(const SEvent& e) { return m_DefaultMouseReturnValue; }

		//  parsed keyboard events
		virtual bool onKeyPressed(const SEvent& e) { return m_DefaultKeyboardReturnValue; }
		virtual bool onKeyUp(const SEvent& e) { return m_DefaultKeyboardReturnValue; }
		virtual bool IsKeyPressed(EKEY_CODE keycode) { return (keyState[keycode] == PRESSED); }
		virtual bool IsKeyDown(EKEY_CODE keycode) { return (keyState[keycode] == DOWN || keyState[keycode] == PRESSED); }
		virtual bool IsKeyUp(EKEY_CODE keycode) { return (keyState[keycode] == UP || keyState[keycode] == RELEASED); }
		virtual bool IsKeyReleased(EKEY_CODE keycode) { return (keyState[keycode] == RELEASED); }

		//  parsed user events
		// you can add whatever events you want here
		// make sure that the text field in the User event is filled in with something
		virtual bool onScreenResized(const SEvent& e) { return m_DefaultUserReturnValue; }

		virtual bool onLevelAdded(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onLevelDestroyed(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onLevelChangeRequested(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onLevelChangeComplete(const SEvent& e) { return m_DefaultUserReturnValue; }

		virtual bool onObjectDestroyed(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onObjectRemoved(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onObjectAdded(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onObjectSelected(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onObjectpreSelected(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onFileNew(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onFileSave(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onFileSaveAs(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onFileOpen(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onInvAdd(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onInvRemove(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onInvUpdate(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onPropertyChanged(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onIntroTimerComplete(const SEvent& e) { return m_DefaultUserReturnValue; }

		virtual bool onFileDropped(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onMouseFirst(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onMouseLeave(const SEvent& e) { return m_DefaultUserReturnValue; }

		virtual bool onEditorModifiedObject(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onEditorTranslate(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onEditorRotate(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onEditorScale(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onEditorPositionOffset(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onEditorRotationOffset(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onEditorScaleOffset(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onEditorBBOffset(const SEvent& e) { return m_DefaultUserReturnValue; }

		virtual bool onMessage(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onActiveWeaponChanged(const SEvent& e) { return m_DefaultUserReturnValue; }
		virtual bool onActiveSkillChanged(const SEvent& e) { return m_DefaultUserReturnValue; }
	};

} // end namespace

Code: Select all

// include the needed heder files
#include "IGE_EventHandler.h"
#include "IGE_Logger.h"

// unclutter the global namespace
namespace IGE
{
	long IGE_EventHandler::gEventLoggingFlags = IGE_DEFAULT_EVENTLOGGINGFLAGS;

	IGE_EventHandler::IGE_EventHandler() : IEventReceiver()
	{
	}

	IGE_EventHandler::~IGE_EventHandler()
	{
	}

	bool IGE_EventHandler::OnEvent(const SEvent &e)
	{
		switch (e.EventType)
		{
		case EEVENT_TYPE::EET_GUI_EVENT: return onEventGUI(e); break;
		case EEVENT_TYPE::EET_JOYSTICK_INPUT_EVENT: return onEventJOYSTICK(e); break;
		case EEVENT_TYPE::EET_KEY_INPUT_EVENT: return onEventKEYBOARD(e); break;
		case EEVENT_TYPE::EET_LOG_TEXT_EVENT: return onEventLOG(e); break;
		case EEVENT_TYPE::EET_MOUSE_INPUT_EVENT: return onEventMOUSE(e); break;
		case EEVENT_TYPE::EET_TOUCH_INPUT_EVENT: return onEventTOUCH(e); break;
		case EEVENT_TYPE::EET_USER_EVENT: return onEventUSER(e); break;
		}

		// we did not handle this event
		return IGE_FAILURE;
	}

	bool IGE_EventHandler::onEventLOG(const SEvent& e)
	{
		return false;
	}

	bool IGE_EventHandler::onEventTOUCH(const SEvent& e)
	{
		return false;
	}

	bool IGE_EventHandler::onEventGUI(const SEvent& e)
	{
		EGUI_EVENT_TYPE et = e.GUIEvent.EventType;

		switch (et)
		{
		case EGET_ELEMENT_FOCUS_LOST:
		case EGET_ELEMENT_FOCUSED:
		case EGET_ELEMENT_HOVERED:
		case EGET_ELEMENT_LEFT:
		case EGET_ELEMENT_CLOSED:
			if (isEventFlagged(ELF_GUI_HOVER))	IGE_LOG_EVENT(m_HandlerId, m_HandlerName, e);
			break;
		default: if (isEventFlagged(ELF_GUI))	IGE_LOG_EVENT(m_HandlerId, m_HandlerName, e);
		}

		bool result = false;

		switch (et)
		{
		case EGET_ELEMENT_FOCUS_LOST: result = onElementFocusLost(e); break;
		case EGET_ELEMENT_FOCUSED: result = onElementFocused(e); break;
		case EGET_ELEMENT_HOVERED: result = onElementHovered(e); break;
		case EGET_ELEMENT_LEFT: result = onElementLeft(e); break;
		case EGET_ELEMENT_CLOSED: result = onElementClosed(e); break;
		case EGET_BUTTON_CLICKED: result = onButtonClicked(e); break;
		case EGET_SCROLL_BAR_CHANGED: result = onScrollbarChanged(e); break;
		case EGET_CHECKBOX_CHANGED: result = onCheckboxChanged(e); break;
		case EGET_LISTBOX_CHANGED: result = onListboxChanged(e); break;
		case EGET_LISTBOX_SELECTED_AGAIN: result = onListboxSelectedAgain(e); break;
		case EGET_FILE_SELECTED: result = onFileSelected(e); break;
		case EGET_DIRECTORY_SELECTED: result = onDirectorySelected(e); break;
		case EGET_FILE_CHOOSE_DIALOG_CANCELLED: result = onFileChooseDialogCancelled(e); break;
		case EGET_MESSAGEBOX_YES: result = onMessageboxYes(e); break;
		case EGET_MESSAGEBOX_NO: result = onMessageboxNo(e); break;
		case EGET_MESSAGEBOX_OK: result = onMessageboxOK(e); break;
		case EGET_MESSAGEBOX_CANCEL: result = onMessageboxCancel(e); break;
		case EGET_EDITBOX_ENTER: result = onEditboxEnter(e); break;
		case EGET_EDITBOX_CHANGED: result = onEditboxChanged(e); break;
		case EGET_EDITBOX_MARKING_CHANGED: result = onEditboxMarkingChanged(e); break;
		case EGET_TAB_CHANGED: result = onTabChanged(e); break;
		case EGET_MENU_ITEM_SELECTED: result = onMenuitemSelected(e); break;
		case EGET_COMBO_BOX_CHANGED: result = onComboboxChanged(e); break;
		case EGET_SPINBOX_CHANGED: result = onSpinboxChanged(e); break;
		case EGET_TABLE_CHANGED: result = onTableChanged(e); break;
		case EGET_TABLE_HEADER_CHANGED: result = onTableHeaderChanged(e); break;
		case EGET_TABLE_SELECTED_AGAIN: result = onTableSelectedAgain(e); break;
		case EGET_TREEVIEW_NODE_DESELECT: result = onTreeviewNodeDeselect(e); break;
		case EGET_TREEVIEW_NODE_SELECT: result = onTreeviewNodeSelect(e); break;
		case EGET_TREEVIEW_NODE_EXPAND: result = onTreeviewNodeExpand(e); break;
		case EGET_TREEVIEW_NODE_COLLAPSE: result = onTreeviewNodeCollapse(e); break;
		}

		return result;
	}

	bool IGE_EventHandler::onEventMOUSE(const SEvent& e)
	{
		if (isEventFlagged(ELF_MOUSE))
		{
			if (e.MouseInput.Event == EMIE_MOUSE_MOVED)
			{
				if (isEventFlagged(ELF_MOUSEMOVE)) IGE_LOG_EVENT(m_HandlerId, m_HandlerName, e);
			}
			else IGE_LOG_EVENT(m_HandlerId, m_HandlerName, e);
		}

		bool result = false;
		switch (e.MouseInput.Event)
		{
		case EMIE_LMOUSE_PRESSED_DOWN:
		{
			if (keyState[KEY_LBUTTON] != DOWN) keyState[KEY_LBUTTON] = PRESSED;	else keyState[KEY_LBUTTON] = DOWN;
			result = onLMouseButtonDown(e);
		} break;
		case EMIE_RMOUSE_PRESSED_DOWN:
		{
			if (keyState[KEY_RBUTTON] != DOWN) keyState[KEY_RBUTTON] = PRESSED;	else keyState[KEY_RBUTTON] = DOWN;
			result = onRMouseButtonDown(e);
		} break;
		case EMIE_MMOUSE_PRESSED_DOWN:
		{
			if (keyState[KEY_MBUTTON] != DOWN) keyState[KEY_MBUTTON] = PRESSED;	else keyState[KEY_MBUTTON] = DOWN;
			result = onMMouseButtonDown(e);
		} break;
		case EMIE_LMOUSE_LEFT_UP:
		{
			keyState[KEY_LBUTTON] = UP;
			result = onLMouseButtonUp(e);
		} break;
		case EMIE_RMOUSE_LEFT_UP:
		{
			keyState[KEY_RBUTTON] = UP;
			result = onRMouseButtonUp(e);
		} break;
		case EMIE_MMOUSE_LEFT_UP:
		{
			keyState[KEY_MBUTTON] = UP;
			result = onMMouseButtonUp(e);
		} break;
		case EMIE_MOUSE_MOVED: result = onMouseMoved(e); break;
		case EMIE_MOUSE_WHEEL: result = onMouseWheel(e); break;
		case EMIE_LMOUSE_DOUBLE_CLICK: result = onLMouseDoubleClick(e); break;
		case EMIE_RMOUSE_DOUBLE_CLICK: result = onRMouseDoubleClick(e); break;
		case EMIE_MMOUSE_DOUBLE_CLICK: result = onMMouseDoubleClick(e); break;
		case EMIE_LMOUSE_TRIPLE_CLICK: result = onLMouseTripleClick(e); break;
		case EMIE_RMOUSE_TRIPLE_CLICK: result = onRMouseTripleClick(e); break;
		case EMIE_MMOUSE_TRIPLE_CLICK: result = onMMouseTripleClick(e); break;
		}
		return result;
	}

	bool IGE_EventHandler::onEventKEYBOARD(const SEvent& e)
	{
		if (isEventFlagged(ELF_KEYBOARD)) IGE_LOG_EVENT(m_HandlerId, m_HandlerName, e);

		bool result = false;

		if (e.KeyInput.PressedDown == true)
		{
			if (keyState[e.KeyInput.Key] != DOWN)
				keyState[e.KeyInput.Key] = PRESSED;
			else
				keyState[e.KeyInput.Key] = DOWN;
		}
		else
			if (keyState[e.KeyInput.Key] != UP)
				keyState[e.KeyInput.Key] = RELEASED;

		if (e.KeyInput.PressedDown == true)
		{
			if (onKeyPressed(e)) result = true;
		}
		else
		{
			if (onKeyUp(e)) result = true;
		}
		return result;

	}

	bool IGE_EventHandler::onEventJOYSTICK(const SEvent& e)
	{
		if (isEventFlagged(ELF_JOYSTICK)) IGE_LOG_EVENT(m_HandlerId, m_HandlerName, e);
		return false;
	}

	bool IGE_EventHandler::onEventUSER(const SEvent& e)
	{
		if (isEventFlagged(ELF_USER)) IGE_LOG_EVENT(m_HandlerId, m_HandlerName, e);

		bool result = false;

		return result;
	}

} // end namespace
Seven
Posts: 1034
Joined: Mon Nov 14, 2005 2:03 pm

Re: How do I detect mouse clicks?

Post by Seven »

example use :

derive myApplication class from IGE_EventHandler.
set the application instance as the primary event receiver.
the application instance receives all events and parses them into function calls.

if myLevel class wants events too, then it is derived from IGE_EventHandler and registers with the application instance to receive events.

this makes handing irrlicht events very easy.

Code: Select all

	/*
		the primary application class
		responsible for the creation, management and destruction of all high level instances
	*/
	class IGE_API IGE_Application : public IGE_EventHandler
	{
	public:		
            virtual bool OnEvent(const SEvent& e);
        };

	bool IGE_Application::OnEvent(const SEvent& e)
	{
		if ((getActiveLevel()) && getActiveLevel()->OnEvent(e)) return true;
		return IGE_EventHandler::OnEvent(e);
	}



	class IGE_API IGE_Level : public IGE_EventHandler, public IGE_PysXWorld_Callback
	{
	public:
            virtual bool OnEvent(const SEvent& e);

		virtual bool onMouseMoved(const SEvent& e) { printf("level received mouse move event\n"); return true; }
		virtual bool onMouseWheel(const SEvent& e) { printf("level received mouse wheel event\n");return true; }
		virtual bool onLMouseButtonDown(const SEvent& e) { printf("level received mouse L Button Down event\n");return true; }
        };

Seven
Posts: 1034
Joined: Mon Nov 14, 2005 2:03 pm

Re: How do I detect mouse clicks?

Post by Seven »

sorry for the length of code posted, but this is one of the things that I use extensively.
the application, the levels, the game objects and the gui stuff all make very heavy use of this and it allows me to let even game objects be aware of events as they come in.

for example, if the screen is resized, i create a UserEvent and send it through the system. every single thing that wants to know about the screen being resized is informed automatically. works like a charm :)
Post Reply