Moves defaults for HotkeyEntryWidget to global settings in metrics.yaml.
This commit is contained in:
@@ -25,9 +25,9 @@ namespace OpenRA.Widgets
|
||||
public Action OnLoseFocus = () => { };
|
||||
|
||||
public Func<bool> IsDisabled = () => false;
|
||||
public Color TextColor = Color.White;
|
||||
public Color DisabledColor = Color.Gray;
|
||||
public string Font = "Regular";
|
||||
public string Font = ChromeMetrics.Get<string>("HotkeyFont");
|
||||
public Color TextColor = ChromeMetrics.Get<Color>("HotkeyColor");
|
||||
public Color TextColorDisabled = ChromeMetrics.Get<Color>("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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user