comparison engine/core/eventchannel/eventmanager.cpp @ 624:b312d170ab0c

* Removed the "trigger" system as it was not in use and very incomplete. I couldn't come up with a good reason why it should be part of event channel either. The trigger system is scheduled for a future release anyway.
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Fri, 01 Oct 2010 19:25:40 +0000
parents a1884665aa95
children ca1fcb96907d
comparison
equal deleted inserted replaced
623:684e5537eef7 624:b312d170ab0c
32 #include "eventchannel/key/ec_key.h" 32 #include "eventchannel/key/ec_key.h"
33 #include "eventchannel/key/ec_keyevent.h" 33 #include "eventchannel/key/ec_keyevent.h"
34 #include "eventchannel/key/ec_ikeyfilter.h" 34 #include "eventchannel/key/ec_ikeyfilter.h"
35 #include "eventchannel/mouse/ec_mouseevent.h" 35 #include "eventchannel/mouse/ec_mouseevent.h"
36 #include "eventchannel/command/ec_command.h" 36 #include "eventchannel/command/ec_command.h"
37 #include "eventchannel/trigger/ec_trigger.h"
38 37
39 #include "eventmanager.h" 38 #include "eventmanager.h"
40 39
41 namespace FIFE { 40 namespace FIFE {
42 41
380 break; 379 break;
381 } 380 }
382 if(has_next_event) 381 if(has_next_event)
383 event = next_event; 382 event = next_event;
384 } 383 }
385 pollTriggers();
386 } 384 }
387 385
388 void EventManager::processActiveEvent(SDL_Event event) { 386 void EventManager::processActiveEvent(SDL_Event event) {
389 if(dispatchSdlEvent(event)) 387 if(dispatchSdlEvent(event))
390 return; 388 return;
535 533
536 EventSourceType EventManager::getEventSourceType() { 534 EventSourceType EventManager::getEventSourceType() {
537 return ES_ENGINE; 535 return ES_ENGINE;
538 } 536 }
539 537
540 void EventManager::registerTrigger(Trigger& trigger){
541 m_triggers.push_back(&trigger);
542 }
543
544 void EventManager::unregisterTrigger(Trigger& trigger){
545 m_triggers.remove(&trigger);
546 }
547
548 void EventManager::pollTriggers(){
549 for (std::list<Trigger*>::iterator it = m_triggers.begin(); it!=m_triggers.end(); ++it) {
550 (*it)->pollTrigger();
551 }
552 }
553
554 void EventManager::setKeyFilter(IKeyFilter* keyFilter) { 538 void EventManager::setKeyFilter(IKeyFilter* keyFilter) {
555 m_keyfilter = keyFilter; 539 m_keyfilter = keyFilter;
556 } 540 }
557 } 541 }