Keep long menu descriptions whole in the description pane

The pane copied each description into 512 bytes. The Russian button layout description is 840 bytes of UTF-8, so it stopped mid-sentence, and the English one (507 bytes) lost the note appended after it. The pane now holds UI_DESC_BYTES (2048), and probe_menu_text checks every English and Russian menu text leaves room for a note.
This commit is contained in:
Lucas-blip-png committed 2026-10-31 03:40:09 -04:00
1 parent adf9c768c3
commit 48d9f0f719
3 files changed
+10 -1

No files matched your search

+1 -1
View File
@@ -36,7 +36,7 @@ static bool g_disable_next; // opt_disable_next: the next row is gr
static UiTextId g_disable_note;
// The description pane: this frame's hovered and selected rows, the page's first row, and the last one shown.
struct Desc { char text[512]; };
struct Desc { char text[UI_DESC_BYTES]; };
static Desc g_hover, g_focus, g_first, g_shown;
// disabled: the note of a row opt_disable_next greyed out, else NULL.