Skip to content

Commit

Permalink
tidy in ProductionPaletteWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisforbes committed Oct 21, 2011
1 parent 00372f4 commit c8122a1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions OpenRA.Mods.Cnc/Widgets/ProductionPaletteWidget.cs
Expand Up @@ -8,7 +8,6 @@
*/
#endregion

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
Expand All @@ -17,7 +16,6 @@
using OpenRA.Mods.RA;
using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.RA.Orders;
using OpenRA.Traits;
using OpenRA.Widgets;

namespace OpenRA.Mods.Cnc.Widgets
Expand Down Expand Up @@ -96,14 +94,15 @@ public override void Tick()

public override void MouseEntered()
{
if (TooltipContainer == null) return;
tooltipContainer.Value.SetTooltip(TooltipTemplate, new WidgetArgs() {{ "palette", this }});
if (TooltipContainer != null)
tooltipContainer.Value.SetTooltip(TooltipTemplate,
new WidgetArgs() {{ "palette", this }});
}

public override void MouseExited()
{
if (TooltipContainer == null) return;
tooltipContainer.Value.RemoveTooltip();
if (TooltipContainer != null)
tooltipContainer.Value.RemoveTooltip();
}

public override bool HandleMouseInput(MouseInput mi)
Expand Down

0 comments on commit c8122a1

Please sign in to comment.