コード例 #1
0
 /* 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;
     }
 }
コード例 #2
0
 /* 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;
     }
 }
コード例 #3
0
 // 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;
 }
コード例 #4
0
 /* CONSTRUCTORS */
 public Button(EDisplaySetting displaySetting, string title)
     : base(displaySetting, title)
 {
 }
コード例 #5
0
 // Constructor
 public UIElement(EDisplaySetting displaySetting, string title)
 {
     this.DisplaySetting = displaySetting;
     this.Title = title;
 }
コード例 #6
0
 // 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)
 {
 }
コード例 #7
0
 /* CONSTRUCTORS */
 public Button(EDisplaySetting displaySetting, string title) : base(displaySetting, title)
 {
 }