Skip to content

UI.RadioButton

Name - Description Default Type
<input> The value is ignored.
<output> Indicates whether the radio button was clicked during this frame. Bool
Label The text label of this radio button. None String
Variable The variable that holds the input value. None Any&Any
Value The value to compare with. None Any
Style The text style. None {Any}&{Any}

A radio button for selecting a value amongst multiple choices.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
(GFX.MainWindow
 :Contents
 (->
  (Setup
   (GFX.DrawQueue) >= .ui-draw-queue
   (GFX.UIPass .ui-draw-queue) >> .render-steps)
  (UI
   .ui-draw-queue
   (UI.CentralPanel
    (->
     (Setup 2 >= .choice)
     (UI.RadioButton
      :Label "Choice 1"
      :Variable .choice
      :Value 1)
     (UI.RadioButton "Choice 2" .choice 2)
     (UI.RadioButton "Choice 3" .choice 3))))

  (GFX.Render :Steps .render-steps)))

 

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
(GFX.MainWindow
 :Contents
 (->
  (Setup
   (GFX.DrawQueue) >= .ui-draw-queue
   (GFX.UIPass .ui-draw-queue) >> .render-steps)
  (UI
   .ui-draw-queue
   (UI.CentralPanel
    (->
     (Setup 2 >= .choice)
     (UI.RadioButton :Label "Choice 1" :Style {} :Variable .choice :Value 1)
     (UI.RadioButton
      :Label "Choice 2"
      :Style {:underline true}
      :Variable .choice
      :Value 2)
     (UI.RadioButton :Label "Choice 3" :Style {} :Variable .choice :Value 3))))

  (GFX.Render :Steps .render-steps)))