Tab Generation
ci / checks (push) Successful in 1h19m14s

This commit is contained in:
khodowany
2026-09-20 16:20:43 -05:00
parent 68ded4d8c8
commit cf7c0c010c
423 changed files with 1422 additions and 1332 deletions
+15 -16
View File
@@ -314,22 +314,22 @@ auto draw_practice_exercise_menu(luma::draw_context &context, luma::rect bounds,
}
}
auto draw_practice_key_menu(luma::draw_context &context, luma::rect bounds, vamp_zero::app_state const &state) -> void {
auto draw_practice_part_menu(luma::draw_context &context, luma::rect bounds, vamp_zero::app_state const &state) -> void {
auto const *exercise = selected_practice_exercise(state);
draw_text(context,
bounds.x + 36.0F,
bounds.y + 28.0F,
exercise == nullptr ? std::string{"KEY"} : exercise->title,
exercise == nullptr ? std::string{"PART"} : exercise->title,
4,
vamp_style::ink,
bounds.width - 72.0F);
draw_text(context, bounds.x + 38.0F, bounds.y + 66.0F, "SELECT PRACTICE KEY", 1, vamp_style::muted, 360.0F);
draw_text(context, bounds.x + 38.0F, bounds.y + 66.0F, "SELECT PRACTICE PART", 1, vamp_style::muted, 360.0F);
auto list_y = bounds.y + 112.0F;
auto row_height = std::float32_t{54.0F};
auto row_width = bounds.width - 72.0F;
auto total_rows = (exercise == nullptr ? 0U : exercise->variants.size()) + 1U;
auto total_rows = (exercise == nullptr ? 0U : exercise->parts.size()) + 1U;
auto max_rows = std::min<std::size_t>(total_rows, 7U);
auto first = first_visible_row(state.selected_practice_key_index, total_rows, max_rows);
auto first = first_visible_row(state.selected_practice_part_index, total_rows, max_rows);
for (auto row = std::size_t{}; row < max_rows; ++row) {
auto index = first + row;
if (index == 0U) {
@@ -340,20 +340,19 @@ auto draw_practice_key_menu(luma::draw_context &context, luma::rect bounds, vamp
.height = row_height},
"BACK",
"",
state.selected_practice_key_index == 0U);
state.selected_practice_part_index == 0U);
continue;
}
auto key = exercise == nullptr ? std::string{"C"} : exercise->variants[index - 1U].key_signature;
auto source = exercise == nullptr || exercise->authored_key_signature.empty() ? std::string{}
: "SOURCE " + exercise->authored_key_signature;
auto part = exercise == nullptr ? std::string{} : exercise->parts[index - 1U].part;
auto key = exercise == nullptr ? std::string{} : exercise->parts[index - 1U].key_signature;
draw_row(context,
{.x = bounds.x + 36.0F,
.y = list_y + static_cast<std::float32_t>(row) * row_height,
.width = row_width,
.height = row_height},
part,
key,
source,
index == state.selected_practice_key_index);
index == state.selected_practice_part_index);
}
}
@@ -370,9 +369,9 @@ auto draw_score(luma::draw_context &context, luma::rect bounds, vamp_zero::app_s
draw_practice_exercise_menu(context, bounds, state);
return;
}
auto const *variant = selected_practice_variant(state, *exercise);
if (variant == nullptr) {
draw_practice_key_menu(context, bounds, state);
auto const *practice_part = selected_practice_part(state, *exercise);
if (practice_part == nullptr) {
draw_practice_part_menu(context, bounds, state);
return;
}
}
@@ -435,8 +434,8 @@ public:
draw_performance_part_menu(context, content, state.app);
} else if (state.app.mode == vamp_zero::app_mode::PRACTICE_EXERCISE_MENU) {
draw_practice_exercise_menu(context, content, state.app);
} else if (state.app.mode == vamp_zero::app_mode::PRACTICE_KEY_MENU) {
draw_practice_key_menu(context, content, state.app);
} else if (state.app.mode == vamp_zero::app_mode::PRACTICE_PART_MENU) {
draw_practice_part_menu(context, content, state.app);
} else if (state.app.mode == vamp_zero::app_mode::PERFORMANCE_SCORE ||
state.app.mode == vamp_zero::app_mode::PRACTICE_SCORE) {
draw_score(context, content, state.app, loaded, score_cache_);