diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2023-09-27 14:38:59 +0200 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2023-09-27 14:38:59 +0200 |
commit | c215a5aa1534275a2fea6d3548accd1778b27519 (patch) | |
tree | 4cd3eab2032daaf82d9fcd84e16dc1b53579d661 | |
parent | f686896de7a0cd08a316cc3a9c3fd52d5b0075a3 (diff) | |
download | saw-c215a5aa1534275a2fea6d3548accd1778b27519.zip |
Piano roll panning
-rw-r--r-- | source/saw/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/saw/main.c b/source/saw/main.c index 9b4fbde..3dc5daa 100644 --- a/source/saw/main.c +++ b/source/saw/main.c @@ -194,6 +194,8 @@ static void saw_audio(ma_device *device, void *void_out_, # pragma GCC diagnostic pop #endif +static void saw_ui_compose(i64 x0, i64 y0, i64 width, i64 height) { } + static void saw_ui_roll(saw_roll_t *roll, i64 x0, i64 y0, i64 width, i64 height, str_t title) { i32 frame_height = sapp_height(); @@ -543,11 +545,13 @@ static void saw_frame(void) { nvgBeginFrame(saw_nvg, frame_width, frame_height, sapp_dpi_scale()); + saw_ui_compose(0, frame_height / 2, frame_width, frame_height / 2); + char buf[64]; sprintf(buf, "Track %lld", saw_current_roll + 1); - saw_ui_roll(saw_rolls + saw_current_roll, 0, 10, frame_width, - frame_height / 2 - 20, kit_str(strlen(buf), buf)); + saw_ui_roll(saw_rolls + saw_current_roll, 0, 0, frame_width, + frame_height / 2, kit_str(strlen(buf), buf)); nvgEndFrame(saw_nvg); |