Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
fix: double reloading of lobby messages
Browse files Browse the repository at this point in the history
  • Loading branch information
LangLangBart committed Mar 18, 2023
1 parent f57fb6d commit fe7152e
Showing 1 changed file with 33 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
* This class stores the handlers for all GUI objects in the lobby page,
* (excluding other pages in the same context such as leaderboard and profile page).
*/
class LobbyPage_boonGUI extends LobbyPage
class LobbyPage
{
constructor(dialog, xmppMessages, leaderboardPage, profilePage)
{
super(dialog, xmppMessages, leaderboardPage, profilePage);
Engine.ProfileStart("Create LobbyPage");
const mapCache = new MapCache();
const buddyButton = new BuddyButton(xmppMessages);
Expand Down Expand Up @@ -47,5 +46,36 @@ class LobbyPage_boonGUI extends LobbyPage
this.setDialogStyle();
Engine.ProfileStop();
}

setDialogStyle()
{
{
const lobbyPage = Engine.GetGUIObjectByName("lobbyPage");
lobbyPage.sprite = "ModernDialog";

const size = lobbyPage.size;
size.left = this.WindowMargin;
size.top = this.WindowMargin;
size.right = -this.WindowMargin;
size.bottom = -this.WindowMargin;
lobbyPage.size = size;
}

{
const lobbyPageTitle = Engine.GetGUIObjectByName("lobbyPageTitle");
const size = lobbyPageTitle.size;
size.top -= this.WindowMargin / 2;
size.bottom -= this.WindowMargin / 2;
lobbyPageTitle.size = size;
}

{
const lobbyPanels = Engine.GetGUIObjectByName("lobbyPanels");
const size = lobbyPanels.size;
size.top -= this.WindowMargin / 2;
lobbyPanels.size = size;
}
}
}
LobbyPage = LobbyPage_boonGUI;

LobbyPage.prototype.WindowMargin = 40;

0 comments on commit fe7152e

Please sign in to comment.