From 39dd5329cced9c736cd9086dabc786e505b69baf Mon Sep 17 00:00:00 2001 From: marder Date: Fri, 24 Jun 2022 11:19:17 +0000 Subject: [PATCH] [GUI] increase msgbox button size to fix text overlap Report: https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/page/6/#comment-504135 3ab25cbd95 added a new button which has more text and can span have multiple lines in some languages. Fix: increase the size. possible todo for the future: unify button sizes or make them adaptive depending on the text size. comments by @Langbart @Stan accepted by @wraitii Differential revision: https://code.wildfiregames.com/D4707 This was SVN commit r26986. --- binaries/data/mods/mod/gui/common/utilities.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/binaries/data/mods/mod/gui/common/utilities.js b/binaries/data/mods/mod/gui/common/utilities.js index 127c42239a..4d8b89815c 100644 --- a/binaries/data/mods/mod/gui/common/utilities.js +++ b/binaries/data/mods/mod/gui/common/utilities.js @@ -1,7 +1,7 @@ function distributeButtonsHorizontally(button, captions) { - const y1 = "100%-46"; - const y2 = "100%-18"; + const y1 = "100%-60"; + const y2 = "100%-20"; switch (captions.length) { case 1: @@ -12,9 +12,9 @@ function distributeButtonsHorizontally(button, captions) button[1].size = "50%+5 " + y1 + " 100%-18 " + y2; break; case 3: - button[0].size = "18 " + y1 + " 33%-5 " + y2; - button[1].size = "33%+5 " + y1 + " 66%-5 " + y2; - button[2].size = "66%+5 " + y1 + " 100%-18 " + y2; + button[0].size = "18 " + y1 + " 33%-3 " + y2; + button[1].size = "33%+3 " + y1 + " 66%-3 " + y2; + button[2].size = "66%+3 " + y1 + " 100%-18 " + y2; break; } }