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
This commit is contained in:
Oliver Brakmann
2016-08-26 22:00:21 +02:00
parent c562131ed4
commit d0109491a7
7 changed files with 23 additions and 13 deletions

View File

@@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.Widgets
public Color TextColor = ChromeMetrics.Get<Color>("ButtonTextColor"); public Color TextColor = ChromeMetrics.Get<Color>("ButtonTextColor");
public Color TextColorDisabled = ChromeMetrics.Get<Color>("ButtonTextColorDisabled"); public Color TextColorDisabled = ChromeMetrics.Get<Color>("ButtonTextColorDisabled");
public bool Contrast = ChromeMetrics.Get<bool>("ButtonTextContrast"); public bool Contrast = ChromeMetrics.Get<bool>("ButtonTextContrast");
public Color ContrastColor = ChromeMetrics.Get<Color>("ButtonTextContrastColor"); public Color ContrastColor = ChromeMetrics.Get<Color>("ButtonTextContrastColorDark");
public bool Disabled = false; public bool Disabled = false;
public bool Highlighted = false; public bool Highlighted = false;
public Func<string> GetText; public Func<string> GetText;

View File

@@ -27,7 +27,7 @@ namespace OpenRA.Mods.Common.Widgets
public string Font = ChromeMetrics.Get<string>("TextFont"); public string Font = ChromeMetrics.Get<string>("TextFont");
public Color TextColor = ChromeMetrics.Get<Color>("TextColor"); public Color TextColor = ChromeMetrics.Get<Color>("TextColor");
public bool Contrast = ChromeMetrics.Get<bool>("TextContrast"); public bool Contrast = ChromeMetrics.Get<bool>("TextContrast");
public Color ContrastColor = ChromeMetrics.Get<Color>("TextContrastColor"); public Color ContrastColor = ChromeMetrics.Get<Color>("TextContrastColorDark");
public bool WordWrap = false; public bool WordWrap = false;
public Func<string> GetText; public Func<string> GetText;
public Func<Color> GetColor; public Func<Color> GetColor;

View File

@@ -6,7 +6,8 @@ Metrics:
ButtonTextColor: FFFFFF ButtonTextColor: FFFFFF
ButtonTextColorDisabled: 808080 ButtonTextColorDisabled: 808080
ButtonTextContrast: false ButtonTextContrast: false
ButtonTextContrastColor: 000000 ButtonTextContrastColorDark: 000000
ButtonTextContrastColorLight: 7F7F7F
ButtonBaseLine: 0 ButtonBaseLine: 0
CheckboxPressedState: true CheckboxPressedState: true
HotkeyFont: Regular HotkeyFont: Regular
@@ -19,6 +20,7 @@ Metrics:
TextFont: Regular TextFont: Regular
TextColor: FFFFFF TextColor: FFFFFF
TextContrast: false 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 ColorPickerRemapIndices: 176, 178, 180, 182, 184, 186, 189, 191, 177, 179, 181, 183, 185, 187, 188, 190
ColorPickerActorType: ^fact.colorpicker ColorPickerActorType: ^fact.colorpicker

View File

@@ -5,7 +5,8 @@ Metrics:
ButtonTextColor: FFFFFF ButtonTextColor: FFFFFF
ButtonTextColorDisabled: 808080 ButtonTextColorDisabled: 808080
ButtonTextContrast: false ButtonTextContrast: false
ButtonTextContrastColor: 000000 ButtonTextContrastColorDark: 000000
ButtonTextContrastColorLight: 7F7F7F
ButtonBaseLine: 0 ButtonBaseLine: 0
CheckboxPressedState: false CheckboxPressedState: false
HotkeyFont: Regular HotkeyFont: Regular
@@ -18,6 +19,7 @@ Metrics:
TextFont: Regular TextFont: Regular
TextColor: FFFFFF TextColor: FFFFFF
TextContrast: false 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 ColorPickerRemapIndices: 255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240
ColorPickerActorType: ^carryall.colorpicker ColorPickerActorType: ^carryall.colorpicker

View File

@@ -6,7 +6,8 @@ Metrics:
ButtonTextColor: FFFFFF ButtonTextColor: FFFFFF
ButtonTextColorDisabled: 808080 ButtonTextColorDisabled: 808080
ButtonTextContrast: false ButtonTextContrast: false
ButtonTextContrastColor: 000000 ButtonTextContrastColorDark: 000000
ButtonTextContrastColorLight: 7F7F7F
ButtonBaseLine: 2 ButtonBaseLine: 2
CheckboxPressedState: true CheckboxPressedState: true
HotkeyFont: Regular HotkeyFont: Regular
@@ -19,5 +20,6 @@ Metrics:
TextFont: Regular TextFont: Regular
TextColor: FFFFFF TextColor: FFFFFF
TextContrast: false TextContrast: false
TextContrastColor: 000000 TextContrastColorDark: 000000
ColorPickerRemapIndices: 176, 178, 180, 182, 184, 186, 189, 191, 177, 179, 181, 183, 185, 187, 188, 190 TextContrastColorLight: 7F7F7F
ColorPickerRemapIndices: 176, 178, 180, 182, 184, 186, 189, 191, 177, 179, 181, 183, 185, 187, 188, 190

View File

@@ -6,7 +6,8 @@ Metrics:
ButtonTextColor: FFFFFF ButtonTextColor: FFFFFF
ButtonTextColorDisabled: 808080 ButtonTextColorDisabled: 808080
ButtonTextContrast: false ButtonTextContrast: false
ButtonTextContrastColor: 000000 ButtonTextContrastColorDark: 000000
ButtonTextContrastColorLight: 7F7F7F
ButtonBaseLine: 0 ButtonBaseLine: 0
CheckboxPressedState: false CheckboxPressedState: false
HotkeyFont: Regular HotkeyFont: Regular
@@ -19,7 +20,8 @@ Metrics:
TextFont: Regular TextFont: Regular
TextColor: FFFFFF TextColor: FFFFFF
TextContrast: false 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 ColorPickerRemapIndices: 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95
ColorPickerActorType: ^fact.colorpicker ColorPickerActorType: ^fact.colorpicker
FactionSuffix-allies: allies FactionSuffix-allies: allies

View File

@@ -5,7 +5,8 @@ Metrics:
ButtonTextColor: FFFFFF ButtonTextColor: FFFFFF
ButtonTextColorDisabled: 808080 ButtonTextColorDisabled: 808080
ButtonTextContrast: false ButtonTextContrast: false
ButtonTextContrastColor: 000000 ButtonTextContrastColorDark: 000000
ButtonTextContrastColorLight: 7F7F7F
ButtonBaseLine: 0 ButtonBaseLine: 0
CheckboxPressedState: false CheckboxPressedState: false
HotkeyFont: Regular HotkeyFont: Regular
@@ -18,6 +19,7 @@ Metrics:
TextFont: Regular TextFont: Regular
TextColor: FFFFFF TextColor: FFFFFF
TextContrast: false 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 ColorPickerRemapIndices: 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
ColorPickerActorType: ^mmch.colorpicker ColorPickerActorType: ^mmch.colorpicker