fix: container:setInterval in menu screen
This commit is contained in:
parent
7fc3703ad2
commit
50d520e747
@ -2,6 +2,8 @@
|
||||
|
||||
#include "graphics/core/DrawContext.hpp"
|
||||
#include "graphics/core/Batch2D.hpp"
|
||||
#include "window/Window.hpp"
|
||||
#include "../GUI.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
@ -87,9 +89,12 @@ void Container::act(float delta) {
|
||||
}
|
||||
}
|
||||
}
|
||||
GUI& gui = this->gui;
|
||||
intervalEvents.erase(std::remove_if(
|
||||
intervalEvents.begin(), intervalEvents.end(),
|
||||
[](const IntervalEvent& event) {
|
||||
[&gui](const IntervalEvent& event) {
|
||||
// TODO: make it interval-based
|
||||
gui.getWindow().setShouldRefresh();
|
||||
return event.repeat == 0;
|
||||
}
|
||||
), intervalEvents.end());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user