diff --git a/OpenRA.Game/Widgets/HotkeyEntryWidget.cs b/OpenRA.Game/Widgets/HotkeyEntryWidget.cs index 93ba40f735..5b3941a580 100644 --- a/OpenRA.Game/Widgets/HotkeyEntryWidget.cs +++ b/OpenRA.Game/Widgets/HotkeyEntryWidget.cs @@ -25,9 +25,9 @@ namespace OpenRA.Widgets public Action OnLoseFocus = () => { }; public Func IsDisabled = () => false; - public Color TextColor = Color.White; - public Color DisabledColor = Color.Gray; - public string Font = "Regular"; + public string Font = ChromeMetrics.Get("HotkeyFont"); + public Color TextColor = ChromeMetrics.Get("HotkeyColor"); + public Color TextColorDisabled = ChromeMetrics.Get("HotkeyColorDisabled"); public HotkeyEntryWidget() {} protected HotkeyEntryWidget(HotkeyEntryWidget widget) @@ -35,7 +35,7 @@ namespace OpenRA.Widgets { Font = widget.Font; TextColor = widget.TextColor; - DisabledColor = widget.DisabledColor; + TextColorDisabled = widget.TextColorDisabled; VisualHeight = widget.VisualHeight; } @@ -126,7 +126,7 @@ namespace OpenRA.Widgets Bounds.Width - LeftMargin - RightMargin, Bounds.Bottom)); } - var color = disabled ? DisabledColor : TextColor; + var color = disabled ? TextColorDisabled : TextColor; font.DrawText(apparentText, textPos, color); if (textSize.X > Bounds.Width - LeftMargin - RightMargin) diff --git a/mods/cnc/metrics.yaml b/mods/cnc/metrics.yaml index 2de15b4c20..faad630657 100644 --- a/mods/cnc/metrics.yaml +++ b/mods/cnc/metrics.yaml @@ -8,6 +8,9 @@ Metrics: ButtonTextContrast: false ButtonTextContrastColor: 0,0,0 CheckboxPressedState: true + HotkeyFont: Regular + HotkeyColor: 255,255,255 + HotkeyColorDisabled: 128,128,128 TextFont: Regular TextColor: 255,255,255 TextContrast: false diff --git a/mods/d2k/metrics.yaml b/mods/d2k/metrics.yaml index 37a2ec020a..1f5f933e0a 100644 --- a/mods/d2k/metrics.yaml +++ b/mods/d2k/metrics.yaml @@ -8,6 +8,9 @@ Metrics: ButtonTextContrast: false ButtonTextContrastColor: 0,0,0 CheckboxPressedState: false + HotkeyFont: Regular + HotkeyColor: 255,255,255 + HotkeyColorDisabled: 128,128,128 TextFont: Regular TextColor: 255,255,255 TextContrast: false diff --git a/mods/ra/metrics.yaml b/mods/ra/metrics.yaml index b1318e9ccb..3624347ef1 100644 --- a/mods/ra/metrics.yaml +++ b/mods/ra/metrics.yaml @@ -8,6 +8,9 @@ Metrics: ButtonTextContrast: true ButtonTextContrastColor: 0,0,0 CheckboxPressedState: false + HotkeyFont: Regular + HotkeyColor: 255,255,255 + HotkeyColorDisabled: 128,128,128 TextFont: Regular TextColor: 255,255,255 TextContrast: false diff --git a/mods/ts/metrics.yaml b/mods/ts/metrics.yaml index 7de90760a5..40cdc94b0c 100644 --- a/mods/ts/metrics.yaml +++ b/mods/ts/metrics.yaml @@ -8,6 +8,9 @@ Metrics: ButtonTextContrast: false ButtonTextContrastColor: 0,0,0 CheckboxPressedState: false + HotkeyFont: Regular + HotkeyColor: 255,255,255 + HotkeyColorDisabled: 128,128,128 TextFont: Regular TextColor: 255,255,255 TextContrast: false