fix: align component prompt regardless of digits

This commit is contained in:
2 * r + 2 * t
2026-06-14 23:48:45 +10:00
parent 024df497d1
commit c93fa1488e
+2 -1
View File
@@ -124,8 +124,9 @@ class Command:
return return
print(format_msg(PROMPT_COLOUR, "Components to enable?")) print(format_msg(PROMPT_COLOUR, "Components to enable?"))
max_idx_w = len(str(len(comp_arr)))
for i, comp in enumerate(comp_arr): for i, comp in enumerate(comp_arr):
print(format_msg(PROMPT_COLOUR, f" [{i + 1}] {comp}")) print(format_msg(PROMPT_COLOUR, f" {i + 1:<{max_idx_w}}\t{comp}"))
print(format_msg(PROMPT_COLOUR, "[A]ll or (1 2 3, 1-3, ^4)")) print(format_msg(PROMPT_COLOUR, "[A]ll or (1 2 3, 1-3, ^4)"))
ans = prompt("", end="").lower().strip() ans = prompt("", end="").lower().strip()