aboutsummaryrefslogtreecommitdiffstats
path: root/src/sldj.h
diff options
context:
space:
mode:
authornathansmith117 <nathansmith@disroot.org>2025-03-05 15:00:14 +0000
committernathansmith117 <nathansmith@disroot.org>2025-03-05 15:00:14 +0000
commit449e5a9c92c1fe62dc0dd75718486b791717184f (patch)
treeacdaf7302839fb6f8a7e719ee0c0240f6d166a33 /src/sldj.h
parentc163983e324968907a878bd43a3b27a4be8cffe4 (diff)
downloadsldj-449e5a9c92c1fe62dc0dd75718486b791717184f.tar.gz
sldj-449e5a9c92c1fe62dc0dd75718486b791717184f.tar.bz2
sldj-449e5a9c92c1fe62dc0dd75718486b791717184f.zip
Fps slider
Diffstat (limited to 'src/sldj.h')
-rw-r--r--src/sldj.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/sldj.h b/src/sldj.h
index a577a60..694882e 100644
--- a/src/sldj.h
+++ b/src/sldj.h
@@ -4,6 +4,7 @@
#include <math.h>
#include <raylib.h>
+#include <raygui.h>
#include "sldjConfig.h"
#include "scripting.h"
@@ -14,6 +15,7 @@
typedef struct Sldj {
RenderTexture viewport;
+ Rectangle viewPortRect;
bool isPaused;
uint8_t targetFps;
@@ -25,13 +27,22 @@ typedef struct Sldj {
SldjScripting scripting;
char scriptFilepath[SLDJ_NAMEMAX];
+
+ struct {
+ Rectangle fpsSlider;
+ float fpsSliderValue;
+ } gui;
} Sldj;
void initSldj(Sldj* sldj);
void updateSldj(Sldj* sldj);
void closeSldj(Sldj* sldj);
-void resetViewport(Sldj* sldj, int width, int height);
+void resizeGui(Sldj* sldj);
+
+void resetViewportRect(Sldj* sldj, float scale);
+void resetViewport(Sldj* sldj, int width, int height, float scale);
+
void reloadScriptContext(Sldj* sldj);
void reloadScript(Sldj* sldj);