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
@@ -606,6 +606,25 @@ namespace OpenRA.Widgets
|
||||
}
|
||||
}
|
||||
|
||||
public class InputWidget : Widget
|
||||
{
|
||||
public bool Disabled = false;
|
||||
public Func<bool> IsDisabled = () => false;
|
||||
|
||||
public InputWidget()
|
||||
{
|
||||
IsDisabled = () => Disabled;
|
||||
}
|
||||
|
||||
public InputWidget(InputWidget other)
|
||||
: base(other)
|
||||
{
|
||||
IsDisabled = () => other.Disabled;
|
||||
}
|
||||
|
||||
public override Widget Clone() { return new InputWidget(this); }
|
||||
}
|
||||
|
||||
public class WidgetArgs : Dictionary<string, object>
|
||||
{
|
||||
public WidgetArgs() { }
|
||||
|
||||
Reference in New Issue
Block a user