Skip to content

UI.Checkbox

Name - Description Default Type
<input> The value is ignored.
<output> Indicates whether the checkbox state changed during this frame. Bool
Label The text label of this checkbox. None String
Variable The variable that holds the input value. None Bool&Bool
Style The text style. None { Any }&{ Any }

Boolean on/off widget with text label.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
(GFX.MainWindow
 :Contents
 (->
  (Setup
   (GFX.DrawQueue) >= .ui-draw-queue
   (GFX.UIPass .ui-draw-queue) >> .render-steps)
  (UI
   .ui-draw-queue
   (UI.CentralPanel
    (UI.Checkbox
     :Label "Checked"
     :Variable .checked)))

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

 

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
(GFX.MainWindow
 :Contents
 (->
  (Setup
   (GFX.DrawQueue) >= .ui-draw-queue
   (GFX.UIPass .ui-draw-queue) >> .render-steps)
  (UI
   .ui-draw-queue
   (UI.CentralPanel
    (UI.Checkbox
     :Label "Checked"
     :Style {:color (color 255 0 255) :italics true}
     :Variable .checked)))

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