Skip to content

Commit

Permalink
Bugfixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
IceReaper committed May 19, 2020
1 parent bcb9849 commit b9c0ff5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions OpenRA.Game/Widgets/Widget.cs
Expand Up @@ -498,6 +498,7 @@ public virtual void RemoveChild(Widget child)
{
children.Remove(child);
Node.RemoveChild(child.Node);
child.Node.CalculateLayout();
child.parent = null;
child.Removed();
}
Expand Down
10 changes: 5 additions & 5 deletions OpenRA.Mods.Common/Widgets/Logic/MainMenuLogic.cs
Expand Up @@ -438,7 +438,7 @@ void OpenMissionBrowserPanel()
Game.OpenWindow("MISSIONBROWSER_PANEL", new WidgetArgs
{
{ "onExit", () => SwitchMenu(MenuType.Singleplayer) },
{ "onStart", () => { RemoveShellmapUI(); lastGameState = MenuPanel.Missions; } }
{ "onStart", () => { lastGameState = MenuPanel.Missions; } }
});
}

Expand All @@ -448,7 +448,7 @@ void OpenSkirmishLobbyPanel()
Game.OpenWindow("SERVER_LOBBY", new WidgetArgs
{
{ "onExit", () => { Game.Disconnect(); SwitchMenu(MenuType.Singleplayer); } },
{ "onStart", () => { RemoveShellmapUI(); lastGameState = MenuPanel.Skirmish; } },
{ "onStart", () => { lastGameState = MenuPanel.Skirmish; } },
{ "skirmishMode", true }
});
}
Expand All @@ -458,7 +458,7 @@ void OpenMultiplayerPanel()
SwitchMenu(MenuType.None);
Ui.OpenWindow("MULTIPLAYER_PANEL", new WidgetArgs
{
{ "onStart", () => { RemoveShellmapUI(); lastGameState = MenuPanel.Multiplayer; } },
{ "onStart", () => { lastGameState = MenuPanel.Multiplayer; } },
{ "onExit", () => SwitchMenu(MenuType.Main) },
{ "directConnectEndPoint", null },
});
Expand All @@ -470,7 +470,7 @@ void OpenReplayBrowserPanel()
Ui.OpenWindow("REPLAYBROWSER_PANEL", new WidgetArgs
{
{ "onExit", () => SwitchMenu(MenuType.Extras) },
{ "onStart", () => { RemoveShellmapUI(); lastGameState = MenuPanel.Replays; } }
{ "onStart", () => { lastGameState = MenuPanel.Replays; } }
});
}

Expand All @@ -480,7 +480,7 @@ void OpenGameSaveBrowserPanel()
Ui.OpenWindow("GAMESAVE_BROWSER_PANEL", new WidgetArgs
{
{ "onExit", () => SwitchMenu(MenuType.Singleplayer) },
{ "onStart", () => { RemoveShellmapUI(); lastGameState = MenuPanel.GameSaves; } },
{ "onStart", () => { lastGameState = MenuPanel.GameSaves; } },
{ "isSavePanel", false },
{ "world", null }
});
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Mods.Common/Widgets/Logic/PlayerProfileLogic.cs
Expand Up @@ -264,7 +264,7 @@ public RegisteredProfileTooltipLogic(Widget widget, WorldRenderer worldRenderer,
};

message.GetText = () => messageText;
header.Node.Height = header.Node.LayoutHeight + (int)messageHeader.Node.LayoutHeight;
header.Node.Height = (int)header.Node.LayoutHeight + (int)messageHeader.Node.LayoutHeight;
header.Node.Width = widget.Node.Width = messageWidth;
header.Node.CalculateLayout();
widget.Node.CalculateLayout();
Expand Down

0 comments on commit b9c0ff5

Please sign in to comment.