#2051 fixed -- Widget.Get() throws by default

This commit is contained in:
Chris Forbes
2012-04-27 19:39:07 +12:00
parent 5d1a071287
commit c30d46c014
52 changed files with 409 additions and 398 deletions

View File

@@ -20,9 +20,9 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
public WorldTooltipLogic(Widget widget, TooltipContainerWidget tooltipContainer, CncWorldInteractionControllerWidget wic)
{
widget.IsVisible = () => wic.TooltipType != WorldTooltipType.None;
var label = widget.GetWidget<LabelWidget>("LABEL");
var flag = widget.GetWidget<ImageWidget>("FLAG");
var owner = widget.GetWidget<LabelWidget>("OWNER");
var label = widget.Get<LabelWidget>("LABEL");
var flag = widget.Get<ImageWidget>("FLAG");
var owner = widget.Get<LabelWidget>("OWNER");
var font = Game.Renderer.Fonts[label.Font];
var ownerFont = Game.Renderer.Fonts[owner.Font];