Remove static Game.ModData references from widget logic.

This commit is contained in:
Paul Chote
2016-02-17 02:39:13 +00:00
parent ff2aabda9b
commit 84b470017f
20 changed files with 78 additions and 67 deletions

View File

@@ -18,10 +18,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
public class CreditsLogic : ChromeLogic
{
[ObjectCreator.UseCtor]
public CreditsLogic(Widget widget, Action onExit)
public CreditsLogic(Widget widget, ModData modData, Action onExit)
{
var panel = widget.Get("CREDITS_PANEL");
var modData = Game.ModData;
panel.Get<ButtonWidget>("BACK_BUTTON").OnClick = () =>
{