summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/saw/main.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source/saw/main.c b/source/saw/main.c
index 2ccda66..c614f65 100644
--- a/source/saw/main.c
+++ b/source/saw/main.c
@@ -2,6 +2,7 @@
#include "../kit/math.h"
#include "../kit/time.h"
+#include "../kit/string_ref.h"
#ifdef __EMSCRIPTEN__
# include <GLES3/gl3.h>
@@ -198,8 +199,9 @@ static void saw_ui_roll(saw_roll_t *roll, i64 x0, i64 y0, i64 width,
//
nvgBeginPath(saw_nvg);
- nvgRect(saw_nvg, x0, frame_height - y0 - height, w, text_height);
- nvgFillColor(saw_nvg, nvgRGBA(100, 60, 50, 180));
+ nvgRect(saw_nvg, x0, frame_height - y0 - height, width,
+ text_height);
+ nvgFillColor(saw_nvg, nvgRGBA(100, 80, 70, 160));
nvgFill(saw_nvg);
// Piano roll
@@ -416,7 +418,8 @@ static void saw_ui_roll(saw_roll_t *roll, i64 x0, i64 y0, i64 width,
i32 w = roll_border * 4;
nvgBeginPath(saw_nvg);
- nvgRect(saw_nvg, x, frame_height - y0 - height, w, height);
+ nvgRect(saw_nvg, x, frame_height - y0 - height + text_height, w,
+ height - text_height);
nvgFillColor(saw_nvg, nvgRGBA(240, 240, 80, 180));
nvgFill(saw_nvg);
}
@@ -469,9 +472,10 @@ static void saw_frame(void) {
nvgBeginFrame(saw_nvg, frame_width, frame_height, sapp_dpi_scale());
- saw_ui_roll(saw_rolls, 0, 10, frame_width, frame_height / 2 - 20);
+ saw_ui_roll(saw_rolls, 0, 10, frame_width, frame_height / 2 - 20,
+ SZ(""));
saw_ui_roll(saw_rolls + 1, 0, frame_height / 2 + 10, frame_width,
- frame_height / 2 - 20);
+ frame_height / 2 - 20, SZ(""));
nvgEndFrame(saw_nvg);