Use common notice colors for UPnP status labels

This commit is contained in:
Ivaylo Draganov
2020-01-31 01:15:58 +02:00
committed by abcdefg30
parent b80928bd95
commit 1020a7bfab
2 changed files with 3 additions and 6 deletions

View File

@@ -154,9 +154,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
noticesLabelB.Text = status == UPnPStatus.Enabled ? "Enabled" :
status == UPnPStatus.NotSupported ? "Not Supported" : "Disabled";
noticesLabelB.TextColor = status == UPnPStatus.Enabled ? ChromeMetrics.Get<Color>("UPnPEnabledColor") :
status == UPnPStatus.NotSupported ? ChromeMetrics.Get<Color>("UPnPNotSupportedColor") :
ChromeMetrics.Get<Color>("UPnPDisabledColor");
noticesLabelB.TextColor = status == UPnPStatus.Enabled ? ChromeMetrics.Get<Color>("NoticeSuccessColor") :
status == UPnPStatus.NotSupported ? ChromeMetrics.Get<Color>("NoticeErrorColor") :
ChromeMetrics.Get<Color>("NoticeInfoColor");
var bWidth = Game.Renderer.Fonts[noticesLabelB.Font].Measure(noticesLabelB.Text).X;
noticesLabelB.Bounds.X = noticesLabelA.Bounds.Right;