void AllegroEventInterpreter::interpretEvent(ALLEGRO_EVENT event ) { /*for( auto &oneListener : listeners_) { interpretEvent(oneListener, event); }*/ for (int i = 0; i < listeners_.size(); ++i) { interpretEvent(listeners_[i], event); } }
/*-------------------------------------------------------------------------------- Function : InventoryScreen::eventLoop Description : Event loop for the inventory screen. Inputs : None Outputs : Results of the player's actions in the inventory. Return : bool (whether the action costs a turn) --------------------------------------------------------------------------------*/ bool InventoryScreen::eventLoop() { EventHandler eventHandler; EventType event; do { update(); event = eventHandler.getPlayerInput(); interpretEvent(event); } while(keepRunning); return false; }