/* CONSTRUCTOR */
 public SelectionBox(EDisplaySetting displaySetting, string text, string[] choices)
     : base(displaySetting, text)
 {
     // Make sure choices wasn't 0
     if (choices.Length < 1)
     {
         throw new Exception("Number of choices cannot be less than 1.");
     }
     else
     {
         this.Choices = choices;
     }
 }
 /* CONSTRUCTOR */
 public SelectionBox(EDisplaySetting displaySetting, string text, string[] choices)
     : base(displaySetting, text)
 {
     // Make sure choices wasn't 0
     if (choices.Length < 1)
     {
         throw new Exception("Number of choices cannot be less than 1.");
     }
     else
     {
         this.Choices = choices;
     }
 }
 // You're allowed to create a button that doesn't do anything.
 public Button(EDisplaySetting displaySetting, string title, ClickMethod onClickMethod)
     : this(displaySetting, title)
 {
     this.OnClick = onClickMethod;
 }
 /* CONSTRUCTORS */
 public Button(EDisplaySetting displaySetting, string title)
     : base(displaySetting, title)
 {
 }
 // Constructor
 public UIElement(EDisplaySetting displaySetting, string title)
 {
     this.DisplaySetting = displaySetting;
     this.Title = title;
 }
 // Labels are the most basic type of UI element and share the most basic properties with its parent class, so there's really no need to do anything further here
 public Label(EDisplaySetting displaySetting, string label)
     : base(displaySetting, label)
 {
 }
Exemple #7
0
 /* CONSTRUCTORS */
 public Button(EDisplaySetting displaySetting, string title) : base(displaySetting, title)
 {
 }