mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-07-04 05:55:47 -07:00
Use GUISize constructor instead of string concatenation when only passing absolute values.
Differential Revision: https://code.wildfiregames.com/D471 Reviewed By: bb This was SVN commit r19554.
This commit is contained in:
parent
3d8fd6e740
commit
d074c4d809
2 changed files with 2 additions and 2 deletions
|
|
@ -212,7 +212,7 @@ function openMenu(newSubmenu, position, buttonHeight, numButtons)
|
|||
var submenu = Engine.GetGUIObjectByName("submenu");
|
||||
var top = position - MARGIN;
|
||||
var bottom = position + ((buttonHeight + MARGIN) * numButtons);
|
||||
submenu.size = submenu.size.left + " " + top + " " + submenu.size.right + " " + bottom;
|
||||
submenu.size = new GUISize(submenu.size.left, top, submenu.size.right, bottom);
|
||||
|
||||
// Blend in right border of main menu into the left border of the submenu
|
||||
blendSubmenuIntoMain(top, bottom);
|
||||
|
|
|
|||
|
|
@ -423,7 +423,7 @@ function updateBandbox(bandbox, ev, hidden)
|
|||
|
||||
let scale = +Engine.ConfigDB_GetValue("user", "gui.scale");
|
||||
|
||||
bandbox.size = [x0 * scale, y0 * scale, x1 * scale, y1 * scale].join(" ");
|
||||
bandbox.size = new GUISize(x0 * scale, y0 * scale, x1 * scale, y1 * scale);
|
||||
bandbox.hidden = hidden;
|
||||
|
||||
return [x0, y0, x1, y1];
|
||||
|
|
|
|||
Loading…
Reference in a new issue