diff engine/core/eventchannel/base/ec_inputevent.h @ 2:e84dccee1bb7

* add myself to authors * fix missing break in guimanager * when an event occurs over an guichan window the event is marked as consumedByGuichan, but the event is still distributed to all event listeners, those can check via event.isConsumedByGuichan...
author spq@33b003aa-7bff-0310-803a-e67f0ece8222
date Tue, 01 Jul 2008 17:43:35 +0000
parents 4a0efb7baf70
children 6387bbc0c2d5
line wrap: on
line diff
--- a/engine/core/eventchannel/base/ec_inputevent.h	Mon Jun 30 16:59:25 2008 +0000
+++ b/engine/core/eventchannel/base/ec_inputevent.h	Tue Jul 01 17:43:35 2008 +0000
@@ -45,6 +45,7 @@
 		*/
 		InputEvent(): 
 			Event(), 
+			m_consumedbyguichan(false), 
 			m_isshiftpressed(false), 
 			m_iscontrolpressed(false), 
 			m_isaltpressed(false), 
@@ -73,6 +74,11 @@
 		 */
 		virtual bool isShiftPressed() const { return m_isshiftpressed; }
 		virtual void setShiftPressed(bool pressed) { m_isshiftpressed = pressed; }
+		
+		/** Marks events as consumed by guichan. 
+		 */
+		virtual void consumedByGuichan() { m_consumedbyguichan = true; }
+		virtual bool isConsumedByGuichan() const { return m_consumedbyguichan; }
 
 		virtual void consume() { Event::consume(); }
 		virtual bool isConsumed() const { return Event::isConsumed(); }
@@ -101,6 +107,7 @@
 
 
 	private:
+		bool m_consumedbyguichan;
 		bool m_isshiftpressed;
 		bool m_iscontrolpressed;
 		bool m_isaltpressed;