Add dynamic map refresh
This commit is contained in:
committed by
Matthias Mailänder
parent
61df7974b0
commit
b254eb0f3d
@@ -1,6 +1,6 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2021 The OpenRA Developers (see AUTHORS)
|
||||
* Copyright 2007-2022 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation, either version 3 of
|
||||
@@ -158,7 +158,13 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
// Loading into the map editor
|
||||
Game.BeforeGameStart += RemoveShellmapUI;
|
||||
|
||||
var onSelect = new Action<string>(uid => LoadMapIntoEditor(modData.MapCache[uid].Uid));
|
||||
var onSelect = new Action<string>(uid =>
|
||||
{
|
||||
if (modData.MapCache[uid].Status != MapStatus.Available)
|
||||
SwitchMenu(MenuType.Extras);
|
||||
else
|
||||
LoadMapIntoEditor(modData.MapCache[uid].Uid);
|
||||
});
|
||||
|
||||
var newMapButton = widget.Get<ButtonWidget>("NEW_MAP_BUTTON");
|
||||
newMapButton.OnClick = () =>
|
||||
|
||||
Reference in New Issue
Block a user