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:
@@ -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 }
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user