Initial first steps in pulling the SFML event processing out of the gui::fsm so that I can handle more complex things like drag and drop.
This commit is contained in:
parent
0674908e49
commit
5aa54d875f
9 changed files with 194 additions and 146 deletions
|
@ -282,9 +282,11 @@ namespace gui {
|
|||
|
||||
void FSM::handle_keyboard_mouse() {
|
||||
while(const auto ev = $window.pollEvent()) {
|
||||
auto gui_ev = $router.process_event(ev);
|
||||
|
||||
if(ev->is<sf::Event::Closed>()) {
|
||||
event(Event::QUIT);
|
||||
if(gui_ev != gui::Event::TICK) {
|
||||
event(gui_ev);
|
||||
continue;
|
||||
}
|
||||
|
||||
if(const auto* mouse = ev->getIf<sf::Event::MouseButtonPressed>()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue