Make Game.LoadWidget / Widget.LoadWidget consistent.
This commit is contained in:
@@ -90,7 +90,7 @@ namespace OpenRA.Mods.Cnc
|
||||
{ "continueLoading", () => TestAndContinue() },
|
||||
{ "installData", Info }
|
||||
};
|
||||
Widget.LoadWidget(Info["InstallerBackgroundWidget"], args);
|
||||
Widget.LoadWidget(Info["InstallerBackgroundWidget"], Widget.RootWidget, args);
|
||||
Widget.OpenWindow(Info["InstallerMenuWidget"], args);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -59,7 +59,10 @@ namespace OpenRA.Mods.Cnc.Widgets
|
||||
ingameRoot.GetWidget<CncMenuButtonWidget>("OPTIONS_BUTTON").OnClick = () =>
|
||||
{
|
||||
ingameRoot.IsVisible = () => false;
|
||||
Widget.LoadWidget("INGAME_MENU", new WidgetArgs() {{ "world", world }, { "onExit", () => ingameRoot.IsVisible = () => true }});
|
||||
Game.LoadWidget(world, "INGAME_MENU", Widget.RootWidget, new WidgetArgs()
|
||||
{
|
||||
{ "onExit", () => ingameRoot.IsVisible = () => true }
|
||||
});
|
||||
};
|
||||
|
||||
var postgameBG = ingameRoot.GetWidget("POSTGAME_BG");
|
||||
|
||||
@@ -402,7 +402,7 @@ namespace OpenRA.Mods.Cnc.Widgets
|
||||
CurrentColorPreview = c;
|
||||
};
|
||||
|
||||
var colorChooser = Game.LoadWidget(orderManager.world, "COLOR_CHOOSER", new WidgetArgs()
|
||||
var colorChooser = Game.LoadWidget(orderManager.world, "COLOR_CHOOSER", null, new WidgetArgs()
|
||||
{
|
||||
{ "onSelect", onSelect },
|
||||
{ "onChange", onChange },
|
||||
|
||||
Reference in New Issue
Block a user