From 606616d1f5a6c18d468e61797df003a16e534fa3 Mon Sep 17 00:00:00 2001 From: Zack Buhman Date: Fri, 4 Jul 2025 18:19:12 -0500 Subject: [PATCH] support 3-digit note indicies; reposition channel status --- src/scene/tracker/channel_status.cpp | 7 ++++++- src/scene/tracker/channel_status.hpp | 2 +- src/scene/tracker/notes.cpp | 4 ++-- src/scene/tracker/scene.cpp | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/scene/tracker/channel_status.cpp b/src/scene/tracker/channel_status.cpp index 114889c..d201fcf 100644 --- a/src/scene/tracker/channel_status.cpp +++ b/src/scene/tracker/channel_status.cpp @@ -80,9 +80,14 @@ void draw(ta_multiwriter& multi, int x, int y) int hori_center = inner_width / 2 - (glyph::hori_advance * ((ch + 1) >= 10)) / 2; transfer_integer(multi.pt, ch + 1, - xi + hori_center, y + vert_center, 0.1f, + xi + hori_center, y + vert_center + 1, 0.1f, 0, 0, 0xa7a7a7); + + transfer_integer(multi.pt, ch + 1, + xi + hori_center + 1, y + vert_center + 2, 0.09f, + 0, 0, + 0x000000); } xi += width_per_col; diff --git a/src/scene/tracker/channel_status.hpp b/src/scene/tracker/channel_status.hpp index a37c912..57d1eca 100644 --- a/src/scene/tracker/channel_status.hpp +++ b/src/scene/tracker/channel_status.hpp @@ -3,7 +3,7 @@ #include "ta_multiwriter.hpp" namespace scene::tracker::channel_status { - const int height = 50; + const int height = 45; void draw(ta_multiwriter& multi, int x, int y); } diff --git a/src/scene/tracker/notes.cpp b/src/scene/tracker/notes.cpp index db291db..c0d9708 100644 --- a/src/scene/tracker/notes.cpp +++ b/src/scene/tracker/notes.cpp @@ -58,7 +58,7 @@ static inline int draw_line_index(ta_parameter_writer& writer, int line_index, i int base_color = ((line_index % 4) == 0) ? dark : light; - int len = transfer_integer(writer, line_index, x, y, depth, 2, ' ', base_color); + int len = transfer_integer(writer, line_index, x, y, depth, 3, ' ', base_color); x += glyph::hori_advance * len; return x; @@ -237,7 +237,7 @@ void draw_borders(ta_parameter_writer& writer, int x, int y) using namespace interpreter; //transfer_vertical_border(writer, x, y, line_column_height); - x += 3 + glyph::hori_advance * 2 + 2; + x += 3 + glyph::hori_advance * 3 + 2; for (int ch = 0; ch < (state.xm.number_of_channels); ch++) { transfer_vertical_border(writer, x, y, line_column_height); diff --git a/src/scene/tracker/scene.cpp b/src/scene/tracker/scene.cpp index 805c9b3..065e9a9 100644 --- a/src/scene/tracker/scene.cpp +++ b/src/scene/tracker/scene.cpp @@ -304,7 +304,7 @@ namespace scene::tracker { draw_button_labels(multi.pt); tracklist::draw(multi, top.width + 5, 5); float y = top.y() + top.height + 5; - channel_status::draw(multi, 5, y); + channel_status::draw(multi, 5, y + 3); cover::draw(multi, cover_x, cover_y, cover_zoom); y += channel_status::height + 10; notes::draw(multi, 5, y);