aboutsummaryrefslogtreecommitdiff
path: root/src/gui/Utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/Utils.cpp')
-rw-r--r--src/gui/Utils.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/Utils.cpp b/src/gui/Utils.cpp
index 20c7b73..e000b7a 100644
--- a/src/gui/Utils.cpp
+++ b/src/gui/Utils.cpp
@@ -3,6 +3,8 @@
#include <mglpp/graphics/Rectangle.hpp>
namespace gsr {
+ static double frame_delta_seconds = 1.0;
+
// TODO: Use vertices to make it one draw call
void draw_rectangle_outline(mgl::Window &window, mgl::vec2f pos, mgl::vec2f size, mgl::Color color, float border_size) {
pos = pos.floor();
@@ -40,4 +42,12 @@ namespace gsr {
window.draw(rect);
}
}
+
+ double get_frame_delta_seconds() {
+ return frame_delta_seconds;
+ }
+
+ void set_frame_delta_seconds(double frame_delta) {
+ frame_delta_seconds = frame_delta;
+ }
} \ No newline at end of file