split Widget static bits into Ui static class

This commit is contained in:
Chris Forbes
2011-12-13 23:38:59 +13:00
parent 83055f0a17
commit ed429a3b30
60 changed files with 173 additions and 168 deletions

View File

@@ -20,8 +20,8 @@ namespace OpenRA.Mods.RA.Widgets.Logic
[ObjectCreator.UseCtor]
public DeveloperModeLogic(World world)
{
var devmodeBG = Widget.RootWidget.GetWidget("INGAME_ROOT").GetWidget("DEVELOPERMODE_BG");
var devModeButton = Widget.RootWidget.GetWidget<ButtonWidget>("INGAME_DEVELOPERMODE_BUTTON");
var devmodeBG = Ui.RootWidget.GetWidget("INGAME_ROOT").GetWidget("DEVELOPERMODE_BG");
var devModeButton = Ui.RootWidget.GetWidget<ButtonWidget>("INGAME_DEVELOPERMODE_BUTTON");
devModeButton.OnClick = () => devmodeBG.Visible ^= true;
var devTrait = world.LocalPlayer.PlayerActor.Trait<DeveloperMode>();