| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace TheraBytes.BetterUi.Editor
- {
- public abstract class WizardPageElementBase
- {
- protected bool markCompleteImmediately;
- public WizardElementState State { get; protected set; }
- public abstract void DrawGui();
- public WizardPageElementBase Activate()
- {
- if(markCompleteImmediately)
- {
- State = WizardElementState.Complete;
- return this;
- }
- State = WizardElementState.WaitForInput;
- return this;
- }
- public WizardPageElementBase MarkComplete()
- {
- if(State == WizardElementState.Pending)
- {
- markCompleteImmediately = true;
- return this;
- }
-
- State = WizardElementState.Complete;
- return this;
- }
- }
- public enum WizardElementState
- {
- Pending,
- WaitForInput,
- Complete,
- }
- }
|