Streamline mod changing after installation

- Don't return to the ModChooser after a successful installation.
 - Don't reload the ModChooser after a cancelled installation.
This commit is contained in:
Pavel Penev
2015-09-08 22:25:05 +03:00
parent 4401e1aa0c
commit 50ea12723c
3 changed files with 10 additions and 20 deletions

View File

@@ -20,8 +20,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
{
var installMusicContainer = widget.Get("INSTALL_MUSIC_PANEL");
Action loadDefaultMod = () =>
Game.RunAfterTick(() => Game.InitializeMod(modId, null));
Action loadDefaultMod = () => Game.RunAfterTick(() => Game.InitializeMod(modId, null));
var cancelButton = installMusicContainer.GetOrNull<ButtonWidget>("BACK_BUTTON");
if (cancelButton != null)
@@ -34,7 +33,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
{
Ui.OpenWindow("INSTALL_FROMCD_PANEL", new WidgetArgs
{
{ "continueLoading", loadDefaultMod },
{ "afterInstall", loadDefaultMod },
{ "modId", modId }
});
};