Add EditorActorCheckbox plumbing.

This commit is contained in:
Paul Chote
2019-08-16 10:09:52 +01:00
committed by abcdefg30
parent 5eaa99827d
commit 966290a623
4 changed files with 59 additions and 1 deletions

View File

@@ -555,6 +555,21 @@ namespace OpenRA.Mods.Common.Traits
}
}
public class EditorActorCheckbox : EditorActorOption
{
public readonly Func<EditorActorPreview, bool> GetValue;
public readonly Action<EditorActorPreview, bool> OnChange;
public EditorActorCheckbox(string name, int displayOrder,
Func<EditorActorPreview, bool> getValue,
Action<EditorActorPreview, bool> onChange)
: base(name, displayOrder)
{
GetValue = getValue;
OnChange = onChange;
}
}
public class EditorActorSlider : EditorActorOption
{
public readonly float MinValue;