@@ -31,6 +31,7 @@
|
||||
#include "dialogxml/widgets/scrollbar.hpp"
|
||||
#include "boe.menus.hpp"
|
||||
#include "tools/cursors.hpp"
|
||||
#include "tools/keymods.hpp"
|
||||
#include "tools/prefs.hpp"
|
||||
#include "dialogxml/widgets/button.hpp"
|
||||
#include "tools/enum_map.hpp"
|
||||
@@ -323,6 +324,9 @@ void handle_one_event(const sf::Event& event) {
|
||||
|
||||
// What does this do and should it be here?
|
||||
clear_sound_memory();
|
||||
|
||||
// If it's just a modifier key, update the state
|
||||
if(kb.handleModifier(event)) return;
|
||||
|
||||
// Check if any of the event listeners want this event.
|
||||
for(auto & listener : event_listeners) {
|
||||
|
@@ -18,6 +18,7 @@
|
||||
#include "dialogxml/dialogs/strchoice.hpp"
|
||||
#include "fileio/fileio.hpp"
|
||||
#include "pc.menus.hpp"
|
||||
#include "tools/keymods.hpp"
|
||||
#include "tools/winutil.hpp"
|
||||
#include "tools/cursors.hpp"
|
||||
#include "fileio/resmgr/res_dialog.hpp"
|
||||
@@ -190,6 +191,9 @@ void handle_events() {
|
||||
|
||||
void handle_one_event (const sf::Event& event) {
|
||||
|
||||
// If it's just a modifier key, update the state
|
||||
if(kb.handleModifier(event)) return;
|
||||
|
||||
// Check if the menubar wants to handle this event.
|
||||
if(menuBarProcessEvent(event)) return;
|
||||
|
||||
|
@@ -29,6 +29,7 @@
|
||||
#include "tools/framerate_limiter.hpp"
|
||||
#include "tools/event_listener.hpp"
|
||||
#include "tools/drawable_manager.hpp"
|
||||
#include "tools/keymods.hpp"
|
||||
|
||||
#ifdef __APPLE__
|
||||
short menuChoiceId=-1;
|
||||
@@ -251,6 +252,9 @@ void handle_events() {
|
||||
|
||||
void handle_one_event(const sf::Event& event) {
|
||||
|
||||
// If it's just a modifier key, update the state
|
||||
if(kb.handleModifier(event)) return;
|
||||
|
||||
// Check if any of the event listeners want this event.
|
||||
for (auto& listener : event_listeners) {
|
||||
if(listener.second->handle_event(event)) return;
|
||||
|
Reference in New Issue
Block a user