mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 15:01:49 +00:00
fix: container:setInterval in menu screen
This commit is contained in:
parent
7fc3703ad2
commit
50d520e747
1 changed files with 6 additions and 1 deletions
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
#include "graphics/core/DrawContext.hpp"
|
#include "graphics/core/DrawContext.hpp"
|
||||||
#include "graphics/core/Batch2D.hpp"
|
#include "graphics/core/Batch2D.hpp"
|
||||||
|
#include "window/Window.hpp"
|
||||||
|
#include "../GUI.hpp"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
@ -87,9 +89,12 @@ void Container::act(float delta) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
GUI& gui = this->gui;
|
||||||
intervalEvents.erase(std::remove_if(
|
intervalEvents.erase(std::remove_if(
|
||||||
intervalEvents.begin(), intervalEvents.end(),
|
intervalEvents.begin(), intervalEvents.end(),
|
||||||
[](const IntervalEvent& event) {
|
[&gui](const IntervalEvent& event) {
|
||||||
|
// TODO: make it interval-based
|
||||||
|
gui.getWindow().setShouldRefresh();
|
||||||
return event.repeat == 0;
|
return event.repeat == 0;
|
||||||
}
|
}
|
||||||
), intervalEvents.end());
|
), intervalEvents.end());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue