rename Ui.RootWidget to just Ui.Root
This commit is contained in:
@@ -131,7 +131,7 @@ namespace OpenRA.Mods.Cnc
|
||||
{ "continueLoading", () => TestAndContinue() },
|
||||
{ "installData", Info }
|
||||
};
|
||||
Ui.LoadWidget(Info["InstallerBackgroundWidget"], Ui.RootWidget, args);
|
||||
Ui.LoadWidget(Info["InstallerBackgroundWidget"], Ui.Root, args);
|
||||
Ui.OpenWindow(Info["InstallerMenuWidget"], args);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace OpenRA.Mods.Cnc.Widgets
|
||||
this.world = world;
|
||||
|
||||
tabsWidget = Lazy.New(() =>
|
||||
Ui.RootWidget.GetWidget<ProductionTabsWidget>(info.ProductionTabsWidget));
|
||||
Ui.Root.GetWidget<ProductionTabsWidget>(info.ProductionTabsWidget));
|
||||
}
|
||||
|
||||
public void SelectionChanged()
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace OpenRA.Mods.Cnc.Widgets
|
||||
: base(world, worldRenderer)
|
||||
{
|
||||
tooltipContainer = Lazy.New(() =>
|
||||
Ui.RootWidget.GetWidget<TooltipContainerWidget>(TooltipContainer));
|
||||
Ui.Root.GetWidget<TooltipContainerWidget>(TooltipContainer));
|
||||
}
|
||||
|
||||
public override void MouseEntered()
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||
}
|
||||
|
||||
ingameRoot.IsVisible = () => false;
|
||||
Game.LoadWidget(world, "INGAME_MENU", Ui.RootWidget, new WidgetArgs()
|
||||
Game.LoadWidget(world, "INGAME_MENU", Ui.Root, new WidgetArgs()
|
||||
{
|
||||
{ "onExit", () => ingameRoot.IsVisible = () => true }
|
||||
});
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||
resumeButton.OnClick = () =>
|
||||
{
|
||||
Ui.CloseWindow();
|
||||
Ui.RootWidget.RemoveChild(menu);
|
||||
Ui.Root.RemoveChild(menu);
|
||||
world.WorldActor.Trait<CncMenuPaletteEffect>().Fade(CncMenuPaletteEffect.EffectType.None);
|
||||
onExit();
|
||||
};
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace OpenRA.Mods.Cnc.Widgets
|
||||
{
|
||||
pm = world.LocalPlayer.PlayerActor.Trait<PowerManager>();
|
||||
tooltipContainer = Lazy.New(() =>
|
||||
Ui.RootWidget.GetWidget<TooltipContainerWidget>(TooltipContainer));
|
||||
Ui.Root.GetWidget<TooltipContainerWidget>(TooltipContainer));
|
||||
}
|
||||
|
||||
public override void MouseEntered()
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace OpenRA.Mods.Cnc.Widgets
|
||||
this.world = world;
|
||||
this.worldRenderer = worldRenderer;
|
||||
tooltipContainer = Lazy.New(() =>
|
||||
Ui.RootWidget.GetWidget<TooltipContainerWidget>(TooltipContainer));
|
||||
Ui.Root.GetWidget<TooltipContainerWidget>(TooltipContainer));
|
||||
|
||||
cantBuild = new Animation("clock");
|
||||
cantBuild.PlayFetchIndex("idle", () => 0);
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace OpenRA.Mods.Cnc.Widgets
|
||||
// Only visible if the production palette has icons to display
|
||||
IsVisible = () => queueGroup != null && Groups[queueGroup].Tabs.Count > 0;
|
||||
|
||||
paletteWidget = Lazy.New(() => Ui.RootWidget.GetWidget<ProductionPaletteWidget>(PaletteWidget));
|
||||
paletteWidget = Lazy.New(() => Ui.Root.GetWidget<ProductionPaletteWidget>(PaletteWidget));
|
||||
}
|
||||
|
||||
public void SelectNextTab(bool reverse)
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace OpenRA.Mods.Cnc.Widgets
|
||||
{
|
||||
pr = world.LocalPlayer.PlayerActor.Trait<PlayerResources>();
|
||||
tooltipContainer = Lazy.New(() =>
|
||||
Ui.RootWidget.GetWidget<TooltipContainerWidget>(TooltipContainer));
|
||||
Ui.Root.GetWidget<TooltipContainerWidget>(TooltipContainer));
|
||||
}
|
||||
|
||||
public override void MouseEntered()
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace OpenRA.Mods.Cnc.Widgets
|
||||
this.worldRenderer = worldRenderer;
|
||||
spm = world.LocalPlayer.PlayerActor.Trait<SupportPowerManager>();
|
||||
tooltipContainer = Lazy.New(() =>
|
||||
Ui.RootWidget.GetWidget<TooltipContainerWidget>(TooltipContainer));
|
||||
Ui.Root.GetWidget<TooltipContainerWidget>(TooltipContainer));
|
||||
|
||||
iconSprites = Rules.Info.Values.SelectMany( u => u.Traits.WithInterface<SupportPowerInfo>() )
|
||||
.Select(u => u.Image).Distinct()
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace OpenRA.Mods.Cnc.Widgets
|
||||
: base()
|
||||
{
|
||||
tooltipContainer = Lazy.New(() =>
|
||||
Ui.RootWidget.GetWidget<TooltipContainerWidget>(TooltipContainer));
|
||||
Ui.Root.GetWidget<TooltipContainerWidget>(TooltipContainer));
|
||||
}
|
||||
|
||||
protected ToggleButtonWidget(ToggleButtonWidget other)
|
||||
@@ -37,7 +37,7 @@ namespace OpenRA.Mods.Cnc.Widgets
|
||||
TooltipText = other.TooltipText;
|
||||
TooltipContainer = other.TooltipContainer;
|
||||
tooltipContainer = Lazy.New(() =>
|
||||
Ui.RootWidget.GetWidget<TooltipContainerWidget>(TooltipContainer));
|
||||
Ui.Root.GetWidget<TooltipContainerWidget>(TooltipContainer));
|
||||
}
|
||||
|
||||
public override void MouseEntered()
|
||||
|
||||
Reference in New Issue
Block a user