From c215a5aa1534275a2fea6d3548accd1778b27519 Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Wed, 27 Sep 2023 14:38:59 +0200 Subject: Piano roll panning --- source/saw/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source') 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); -- cgit v1.2.3