RadioButton Class (RWE.GameOn.Core.Extensions)

Class
RadioButton

Usage:

Represents a toggle-able Radio Button.

RadioButton

Properties:

  • Check
    Boolean – Determines whether the UI Element is in the “checked” state.
RadioButton1.Check = true;
RadioButton1.Check = false;
  • Label.Visibility
    Variable – Determines whether the UI Element has a visible label next to it.
RadioButton1.Label.Visibility = visible;
  • Label.Text.ToString
    String – Sets the text for the label of the UI Element.
RadioButton1.Label.Text.ToString = "Label of RadioButton1";
  • Label.Location
    Variable – Determines which side of the UI Element the label will be placed.
RadioButton1.Label.Location = left;
  • Enabled
    Boolean – Defines whether the UI Element is interact-able or not.
RadioButton1.Enabled = true;
  • AutoSize
    Boolean – Sets whether the UI Element should be autosized.
RadioButton1.AutoSize = true;
  • BorderStyle
    Variable – Sets the border style of the UI Element.
RadioButton1.BorderStyle = Single;
  • BorderStyle.Colour
    Variable – Sets the border colour of the UI Element.
RadioButton1.BorderStyle.Colour = ColourSpace.Red;
RadioButton1.BorderStyle.Colour = new ColourSpace(HEX("#hexcode"));
RadioButton1.BorderStyle.Colour = new ColourSpace(ARGB(RRR,GGG,BBB,ALPHA));
RadioButton1.BorderStyle.Colour = new ColourSpace(ARGB(RRR,GGG,BBB,ALPHA));

//You can use .Color and ColorSpace too!
  • BorderStyle.Weight
    Variable – Sets the border weight of the UI Element.
RadioButton1.BorderStyle.Weight = 1px;
  • BackColour
    Variable – Sets the background colour of the UI Element.
RadioButton1.BackColour = ColourSpace.Red;
RadioButton1.BackColour = new ColourSpace(HEX("#hexcode"));
RadioButton1.BackColour = new ColourSpace(ARGB(RRR,GGG,BBB,ALPHA));
RadioButton1.BackColour = new ColourSpace(ARGB(RRR,GGG,BBB,ALPHA));

//You can use .BackColor and ColorSpace too!
  • Anchor
    Variable – Anchors the UI Element relative to a side or multiple sides of the parent container.
RadioButton1.Anchor = top, left;
RadioButton1.Anchor = bottom, top;
RadioButton1.Anchor = left;
  • Activity
    Clause – Creates a new activity when the button is interacted with. By default, the interaction is OnClick.
//OnClick
RadioButton1.Activity(new Activity) { //activities go here }

//OnClick (Defined)
RadioButton1.Activity(new Activity, OnClick) { //activities go here }

//OnHover
RadioButton1.Activity(new Activity, OnHover) { //activities go here }
      • Includes the following actions:
        • OnClick
        • OnHover
        • OnCheck
        • OnUnCheck
  • Visibility
    Variable – Determines whether the UI Element is visible or not.
RadioButton1.Visibility = visible;
RadioButton1.Visibility = invisible;

 

Example:

new ContentPanel = Panel1();
         Panel1.Dock = fill;
         Panel1.Padding.Left = 3px;
         Panel1.Contents 
         {
             new RadioButton = RadioButton1();
                 RadioButton1.Label.Text.ToString = "Select Me!"
                 RadioButton1.Check = false;
                 RadioButton1.Activity(new Activity) {
                       MessageBox.Show("The RadioButton Has Been Selected!);
                 }
         }
Menu