Pass WidgetArgs to Widget.Initialize. Use this to allow for custom substitutions.
This commit is contained in:
@@ -42,9 +42,9 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
this.world = world;
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
public override void Initialize(WidgetArgs args)
|
||||
{
|
||||
base.Initialize();
|
||||
base.Initialize(args);
|
||||
|
||||
var size = Math.Max(world.Map.Bounds.Width, world.Map.Bounds.Height);
|
||||
previewScale = Math.Min(RenderBounds.Width * 1f / world.Map.Bounds.Width, RenderBounds.Height * 1f / world.Map.Bounds.Height);
|
||||
|
||||
@@ -34,9 +34,9 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
this.worldRenderer = worldRenderer;
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
public override void Initialize(WidgetArgs args)
|
||||
{
|
||||
base.Initialize();
|
||||
base.Initialize(args);
|
||||
|
||||
spsprites = Rules.Info.Values.SelectMany( u => u.Traits.WithInterface<SupportPowerInfo>() )
|
||||
.Select(u => u.Image).Distinct()
|
||||
|
||||
Reference in New Issue
Block a user