mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
[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.
This commit is contained in:
parent
ec723428d1
commit
39dd5329cc
1 changed files with 5 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue