1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-12-31 17:39:03 +00:00

do not reserve space to display keys if display key option is off

This commit is contained in:
Zeno Rogue
2025-12-17 17:26:03 +01:00
parent 435fe8a7a9
commit 2c11ee3863

View File

@@ -482,6 +482,10 @@ EX namespace dialog {
highlight_text = s; highlight_key = PSEUDOKEY_SELECT;
}
EX bool never_keys() {
return ISMOBILE || among(display_keys, 0, 3);
}
EX void measure() {
tothei = 0;
dialogwidth = 0;
@@ -517,7 +521,7 @@ EX namespace dialog {
}
}
leftwidth = ISMOBILE ? 0 : textwidth(dfsize, "MMMMM") + dfsize/2;
leftwidth = never_keys() ? 0 : textwidth(dfsize, "MMMMM") + dfsize/2;
fwidth = innerwidth + leftwidth + rightwidth;
if(list_actual_size) fwidth += dfsize;