Change ILoadScreen to take a ModData instance.
This commit is contained in:
@@ -53,7 +53,7 @@ namespace OpenRA
|
|||||||
if (useLoadScreen)
|
if (useLoadScreen)
|
||||||
{
|
{
|
||||||
LoadScreen = ObjectCreator.CreateObject<ILoadScreen>(Manifest.LoadScreen.Value);
|
LoadScreen = ObjectCreator.CreateObject<ILoadScreen>(Manifest.LoadScreen.Value);
|
||||||
LoadScreen.Init(Manifest, Manifest.LoadScreen.ToDictionary(my => my.Value));
|
LoadScreen.Init(this, Manifest.LoadScreen.ToDictionary(my => my.Value));
|
||||||
LoadScreen.Display();
|
LoadScreen.Display();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -205,7 +205,7 @@ namespace OpenRA
|
|||||||
|
|
||||||
public interface ILoadScreen : IDisposable
|
public interface ILoadScreen : IDisposable
|
||||||
{
|
{
|
||||||
void Init(Manifest m, Dictionary<string, string> info);
|
void Init(ModData m, Dictionary<string, string> info);
|
||||||
void Display();
|
void Display();
|
||||||
void StartGame(Arguments args);
|
void StartGame(Arguments args);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace OpenRA.Mods.Cnc
|
|||||||
Rectangle bounds;
|
Rectangle bounds;
|
||||||
Renderer r;
|
Renderer r;
|
||||||
|
|
||||||
public override void Init(Manifest m, Dictionary<string, string> info)
|
public override void Init(ModData modData, Dictionary<string, string> info)
|
||||||
{
|
{
|
||||||
loadInfo = info;
|
loadInfo = info;
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ namespace OpenRA.Mods.Cnc
|
|||||||
brightBlock = new Sprite(sheet, new Rectangle(320, 0, 16, 35), TextureChannel.Alpha);
|
brightBlock = new Sprite(sheet, new Rectangle(320, 0, 16, 35), TextureChannel.Alpha);
|
||||||
dimBlock = new Sprite(sheet, new Rectangle(336, 0, 16, 35), TextureChannel.Alpha);
|
dimBlock = new Sprite(sheet, new Rectangle(336, 0, 16, 35), TextureChannel.Alpha);
|
||||||
|
|
||||||
versionText = m.Mod.Version;
|
versionText = modData.Manifest.Mod.Version;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool setup;
|
bool setup;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace OpenRA.Mods.Common.LoadScreens
|
|||||||
{
|
{
|
||||||
public LaunchArguments Launch;
|
public LaunchArguments Launch;
|
||||||
|
|
||||||
public virtual void Init(Manifest m, Dictionary<string, string> info) { }
|
public virtual void Init(ModData m, Dictionary<string, string> info) { }
|
||||||
|
|
||||||
public virtual void Display()
|
public virtual void Display()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ namespace OpenRA.Mods.Common.LoadScreens
|
|||||||
Sprite stripe, logo;
|
Sprite stripe, logo;
|
||||||
string[] messages = { "Loading..." };
|
string[] messages = { "Loading..." };
|
||||||
|
|
||||||
public override void Init(Manifest m, Dictionary<string, string> info)
|
public override void Init(ModData modData, Dictionary<string, string> info)
|
||||||
{
|
{
|
||||||
// Avoid standard loading mechanisms so we
|
// Avoid standard loading mechanisms so we
|
||||||
// can display the loadscreen as early as possible
|
// can display the loadscreen as early as possible
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace OpenRA.Mods.Common.LoadScreens
|
|||||||
Sprite sprite;
|
Sprite sprite;
|
||||||
Rectangle bounds;
|
Rectangle bounds;
|
||||||
|
|
||||||
public void Init(Manifest m, Dictionary<string, string> info)
|
public void Init(ModData modData, Dictionary<string, string> info)
|
||||||
{
|
{
|
||||||
var res = Game.Renderer.Resolution;
|
var res = Game.Renderer.Resolution;
|
||||||
bounds = new Rectangle(0, 0, res.Width, res.Height);
|
bounds = new Rectangle(0, 0, res.Width, res.Height);
|
||||||
|
|||||||
Reference in New Issue
Block a user