Use IsHighlighted for settings / ingame menu tabs.

This commit is contained in:
Paul Chote
2013-04-08 23:04:23 +12:00
parent f368556b23
commit 09efeed105
2 changed files with 4 additions and 4 deletions

View File

@@ -98,7 +98,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
// Debug / Cheats panel
var debugButton = panelParent.Get<ButtonWidget>("DEBUG_BUTTON");
debugButton.OnClick = () => Panel = PanelType.Debug;
debugButton.IsDisabled = () => Panel == PanelType.Debug;
debugButton.IsHighlighted = () => Panel == PanelType.Debug;
if (world.LocalPlayer != null && world.LobbyInfo.GlobalSettings.AllowCheats)
{
@@ -113,7 +113,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
var iop = world.WorldActor.TraitsImplementing<IObjectivesPanel>().FirstOrDefault();
var objectivesButton = panelParent.Get<ButtonWidget>("OBJECTIVES_BUTTON");
objectivesButton.OnClick = () => Panel = PanelType.Objectives;
objectivesButton.IsDisabled = () => Panel == PanelType.Objectives;
objectivesButton.IsHighlighted = () => Panel == PanelType.Objectives;
if (iop != null && iop.ObjectivesPanel != null)
{