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:
elexis 2017-05-10 22:29:55 +00:00
parent 3d8fd6e740
commit d074c4d809
2 changed files with 2 additions and 2 deletions

View file

@ -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);

View file

@ -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];