From d0109491a70c46754575ce6f74a5a1b704d32e9e Mon Sep 17 00:00:00 2001 From: Oliver Brakmann Date: Fri, 26 Aug 2016 22:00:21 +0200 Subject: [PATCH] Split ChromeMetrics' ContrastColor options into two One for dark backgrounds, one for light ones. The light one isn't currently being used, but will be by future commits --- OpenRA.Mods.Common/Widgets/ButtonWidget.cs | 2 +- OpenRA.Mods.Common/Widgets/LabelWidget.cs | 2 +- mods/cnc/metrics.yaml | 6 ++++-- mods/d2k/metrics.yaml | 6 ++++-- mods/modchooser/metrics.yaml | 8 +++++--- mods/ra/metrics.yaml | 6 ++++-- mods/ts/metrics.yaml | 6 ++++-- 7 files changed, 23 insertions(+), 13 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/ButtonWidget.cs b/OpenRA.Mods.Common/Widgets/ButtonWidget.cs index 44cdc31dd9..c3dbd36b51 100644 --- a/OpenRA.Mods.Common/Widgets/ButtonWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ButtonWidget.cs @@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.Widgets public Color TextColor = ChromeMetrics.Get("ButtonTextColor"); public Color TextColorDisabled = ChromeMetrics.Get("ButtonTextColorDisabled"); public bool Contrast = ChromeMetrics.Get("ButtonTextContrast"); - public Color ContrastColor = ChromeMetrics.Get("ButtonTextContrastColor"); + public Color ContrastColor = ChromeMetrics.Get("ButtonTextContrastColorDark"); public bool Disabled = false; public bool Highlighted = false; public Func GetText; diff --git a/OpenRA.Mods.Common/Widgets/LabelWidget.cs b/OpenRA.Mods.Common/Widgets/LabelWidget.cs index 0df8489010..27e1e80e73 100644 --- a/OpenRA.Mods.Common/Widgets/LabelWidget.cs +++ b/OpenRA.Mods.Common/Widgets/LabelWidget.cs @@ -27,7 +27,7 @@ namespace OpenRA.Mods.Common.Widgets public string Font = ChromeMetrics.Get("TextFont"); public Color TextColor = ChromeMetrics.Get("TextColor"); public bool Contrast = ChromeMetrics.Get("TextContrast"); - public Color ContrastColor = ChromeMetrics.Get("TextContrastColor"); + public Color ContrastColor = ChromeMetrics.Get("TextContrastColorDark"); public bool WordWrap = false; public Func GetText; public Func GetColor; diff --git a/mods/cnc/metrics.yaml b/mods/cnc/metrics.yaml index 55cb0c1656..1d10f5eb78 100644 --- a/mods/cnc/metrics.yaml +++ b/mods/cnc/metrics.yaml @@ -6,7 +6,8 @@ Metrics: ButtonTextColor: FFFFFF ButtonTextColorDisabled: 808080 ButtonTextContrast: false - ButtonTextContrastColor: 000000 + ButtonTextContrastColorDark: 000000 + ButtonTextContrastColorLight: 7F7F7F ButtonBaseLine: 0 CheckboxPressedState: true HotkeyFont: Regular @@ -19,6 +20,7 @@ Metrics: TextFont: Regular TextColor: FFFFFF TextContrast: false - TextContrastColor: 000000 + TextContrastColorDark: 000000 + TextContrastColorLight: 7F7F7F ColorPickerRemapIndices: 176, 178, 180, 182, 184, 186, 189, 191, 177, 179, 181, 183, 185, 187, 188, 190 ColorPickerActorType: ^fact.colorpicker diff --git a/mods/d2k/metrics.yaml b/mods/d2k/metrics.yaml index dec7e317f1..3f91d3bd12 100644 --- a/mods/d2k/metrics.yaml +++ b/mods/d2k/metrics.yaml @@ -5,7 +5,8 @@ Metrics: ButtonTextColor: FFFFFF ButtonTextColorDisabled: 808080 ButtonTextContrast: false - ButtonTextContrastColor: 000000 + ButtonTextContrastColorDark: 000000 + ButtonTextContrastColorLight: 7F7F7F ButtonBaseLine: 0 CheckboxPressedState: false HotkeyFont: Regular @@ -18,6 +19,7 @@ Metrics: TextFont: Regular TextColor: FFFFFF TextContrast: false - TextContrastColor: 000000 + TextContrastColorDark: 000000 + TextContrastColorLight: 7F7F7F ColorPickerRemapIndices: 255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240 ColorPickerActorType: ^carryall.colorpicker diff --git a/mods/modchooser/metrics.yaml b/mods/modchooser/metrics.yaml index 9a0c2aff88..4e71fb732e 100644 --- a/mods/modchooser/metrics.yaml +++ b/mods/modchooser/metrics.yaml @@ -6,7 +6,8 @@ Metrics: ButtonTextColor: FFFFFF ButtonTextColorDisabled: 808080 ButtonTextContrast: false - ButtonTextContrastColor: 000000 + ButtonTextContrastColorDark: 000000 + ButtonTextContrastColorLight: 7F7F7F ButtonBaseLine: 2 CheckboxPressedState: true HotkeyFont: Regular @@ -19,5 +20,6 @@ Metrics: TextFont: Regular TextColor: FFFFFF TextContrast: false - TextContrastColor: 000000 - ColorPickerRemapIndices: 176, 178, 180, 182, 184, 186, 189, 191, 177, 179, 181, 183, 185, 187, 188, 190 \ No newline at end of file + TextContrastColorDark: 000000 + TextContrastColorLight: 7F7F7F + ColorPickerRemapIndices: 176, 178, 180, 182, 184, 186, 189, 191, 177, 179, 181, 183, 185, 187, 188, 190 diff --git a/mods/ra/metrics.yaml b/mods/ra/metrics.yaml index 46760b5da6..5e29223461 100644 --- a/mods/ra/metrics.yaml +++ b/mods/ra/metrics.yaml @@ -6,7 +6,8 @@ Metrics: ButtonTextColor: FFFFFF ButtonTextColorDisabled: 808080 ButtonTextContrast: false - ButtonTextContrastColor: 000000 + ButtonTextContrastColorDark: 000000 + ButtonTextContrastColorLight: 7F7F7F ButtonBaseLine: 0 CheckboxPressedState: false HotkeyFont: Regular @@ -19,7 +20,8 @@ Metrics: TextFont: Regular TextColor: FFFFFF TextContrast: false - TextContrastColor: 000000 + TextContrastColorDark: 000000 + TextContrastColorLight: 7F7F7F ColorPickerRemapIndices: 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95 ColorPickerActorType: ^fact.colorpicker FactionSuffix-allies: allies diff --git a/mods/ts/metrics.yaml b/mods/ts/metrics.yaml index 661b0c459e..7072ac1913 100644 --- a/mods/ts/metrics.yaml +++ b/mods/ts/metrics.yaml @@ -5,7 +5,8 @@ Metrics: ButtonTextColor: FFFFFF ButtonTextColorDisabled: 808080 ButtonTextContrast: false - ButtonTextContrastColor: 000000 + ButtonTextContrastColorDark: 000000 + ButtonTextContrastColorLight: 7F7F7F ButtonBaseLine: 0 CheckboxPressedState: false HotkeyFont: Regular @@ -18,6 +19,7 @@ Metrics: TextFont: Regular TextColor: FFFFFF TextContrast: false - TextContrastColor: 000000 + TextContrastColorDark: 000000 + TextContrastColorLight: 7F7F7F ColorPickerRemapIndices: 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ColorPickerActorType: ^mmch.colorpicker