Skip to content

UI.Label

Name - Description Default Type
<input> The text to display. String
<output> The output of this shard will be its input. String
Wrap Wrap the text depending on the layout. None Bool&Bool
Style The text style. None {Any}&{Any}

Static text.

Examples

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

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

 

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
(def lorem_ipsum
  "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")

(GFX.MainWindow
 :Width 480 :Height 360
 :Contents
 (->
  (Setup
   (GFX.DrawQueue) >= .ui-draw-queue
   (GFX.UIPass .ui-draw-queue) >> .render-steps)
  (UI
   .ui-draw-queue
   (UI.CentralPanel
    (UI.Columns
     [(-> lorem_ipsum (UI.Label :Wrap true))
      nil
      (-> lorem_ipsum (UI.Label :Wrap false))])))

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

 

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
(GFX.MainWindow
 :Contents
 (->
  (Setup
   (GFX.DrawQueue) >= .ui-draw-queue
   (GFX.UIPass .ui-draw-queue) >> .render-steps)
  (UI
   .ui-draw-queue
   (UI.CentralPanel
    (->
     "Hello Shards!" (UI.Label)
     "Hello Shards!" (UI.Label :Style {:strikethrough true})
     "Hello Shards!" (UI.Label :Style {:underline true})
     "Hello Shards!" (UI.Label :Style {:italics true})
     "Hello Shards!" (UI.Label :Style {:color (color 96 96 12)})
     "Hello Shards!" (UI.Label :Style {:color (color 12 96 96) :italics true}))))

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