Change color of labels that correspond to disabled inputs
- Add a new widget type for input and extend it from other input widgets - Add a new label type that can be linked to an input widget - Change the label color when the input's disabled state changes
This commit is contained in:
committed by
abcdefg30
parent
0203476da9
commit
eadc8ad689
@@ -29,6 +29,10 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
: base(modData)
|
||||
{
|
||||
GetCheckType = () => CheckType;
|
||||
TextColor = ChromeMetrics.Get<Color>("TextColor");
|
||||
TextColorDisabled = ChromeMetrics.Get<Color>("TextDisabledColor");
|
||||
GetColor = () => TextColor;
|
||||
GetColorDisabled = () => TextColorDisabled;
|
||||
}
|
||||
|
||||
protected CheckboxWidget(CheckboxWidget other)
|
||||
@@ -39,6 +43,10 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
IsChecked = other.IsChecked;
|
||||
CheckOffset = other.CheckOffset;
|
||||
HasPressedState = other.HasPressedState;
|
||||
TextColor = other.TextColor;
|
||||
TextColorDisabled = other.TextColorDisabled;
|
||||
GetColor = other.GetColor;
|
||||
GetColorDisabled = other.GetColorDisabled;
|
||||
}
|
||||
|
||||
public override void Draw()
|
||||
|
||||
Reference in New Issue
Block a user