Add an in-game encyclopedia to Dune 2000.
This commit is contained in:
committed by
Gustas
parent
d2a3659078
commit
3be0e9e8a5
@@ -121,6 +121,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
loadButton.IsDisabled = () => !GameSaveBrowserLogic.IsLoadPanelEnabled(modData.Manifest);
|
||||
loadButton.OnClick = OpenGameSaveBrowserPanel;
|
||||
|
||||
var encyclopediaButton = singleplayerMenu.GetOrNull<ButtonWidget>("ENCYCLOPEDIA_BUTTON");
|
||||
if (encyclopediaButton != null)
|
||||
encyclopediaButton.OnClick = OpenEncyclopediaPanel;
|
||||
|
||||
singleplayerMenu.Get<ButtonWidget>("BACK_BUTTON").OnClick = () => SwitchMenu(MenuType.Main);
|
||||
|
||||
// Extras menu
|
||||
@@ -466,6 +470,15 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
});
|
||||
}
|
||||
|
||||
void OpenEncyclopediaPanel()
|
||||
{
|
||||
SwitchMenu(MenuType.None);
|
||||
Game.OpenWindow("ENCYCLOPEDIA_PANEL", new WidgetArgs
|
||||
{
|
||||
{ "onExit", () => SwitchMenu(MenuType.Singleplayer) }
|
||||
});
|
||||
}
|
||||
|
||||
void OpenSkirmishLobbyPanel()
|
||||
{
|
||||
SwitchMenu(MenuType.None);
|
||||
|
||||
Reference in New Issue
Block a user