Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 28, 2005, 3:24:48 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: event listener/ handler now work together, events are being transmitted to the receivers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/event/event_handler.cc

    r4364 r4365  
    3838  this->listeners = new EventListener**[ES_NUMBER];
    3939  for(int i = 0; i < ES_NUMBER; ++i)
    40     this->listeners[i] = new EventListener*[SDLK_LAST];
     40    this->listeners[i] = new EventListener*[EV_NUMBER];
    4141
    4242  /* now initialize them all to zero */
     
    282282      PRINT(0)("\n==========================| EventHandler::Process () |===\n");
    283283      PRINT(0)("=  Got Event nr%i\n, for state %i", event.type, this->state); 
    284       PRINT(0)("=======================================================\n");
    285284     
    286285      listener = this->listeners[this->state][event.key.keysym.sym];
    287       //if( listener != NULL)
    288       //listener->process();
    289      
    290     }
    291 }
     286      if( listener != NULL)
     287        {
     288          listener->process(ev);
     289          PRINTF(0)("=  Event dispatcher msg: This event has been consumed\n");
     290        }
     291      else
     292        {
     293          PRINTF(0)("=  Event dispatcher msg: This event has NOT been consumed\n");
     294        }
     295
     296      PRINT(0)("=======================================================\n");     
     297    }
     298}
Note: See TracChangeset for help on using the changeset viewer.