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:
Ivaylo Draganov
2022-02-22 19:09:29 +02:00
committed by abcdefg30
parent 0203476da9
commit eadc8ad689
14 changed files with 113 additions and 34 deletions

View File

@@ -16,9 +16,8 @@ using OpenRA.Widgets;
namespace OpenRA.Mods.Common.Widgets
{
public class SliderWidget : Widget
public class SliderWidget : InputWidget
{
public Func<bool> IsDisabled = () => false;
public event Action<float> OnChange = _ => { };
public int Ticks = 0;
public int TrackHeight = 5;