diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2023-09-27 06:03:29 +0200 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2023-09-27 06:03:29 +0200 |
commit | e02ef4d96d35bbb2e97a7d2334acbf84db650173 (patch) | |
tree | 9b4ef0c53295d49f9a337d28a6dd08903a370653 /source | |
parent | d30a475631c4f8b4cf9d818a711be018d23fef0d (diff) | |
download | saw-e02ef4d96d35bbb2e97a7d2334acbf84db650173.zip |
fix
Diffstat (limited to 'source')
-rw-r--r-- | source/saw/main.c | 14 |
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); |