Skip to content

UI.Window

Name - Description Default Type
<input> The value that will be passed to the Contents shards of the rendered window. Any
<output> The output of this shard will be its input. Any
Title The window title displayed on the titlebar. "My Window" String
Position Absolute position; or when anchor is set, relative offset. None Float2&Float2
Anchor Corner or center of the screen. None Anchor
Width The width of the rendered window. None Int
Height The height of the rendered window. None Int
Flags Window flags. None WindowFlags[WindowFlags]
Contents The UI contents. None Shard[Shard]
ID An optional ID value to make the window unique if the title name collides. None String&String

Creates a floating window which can be dragged, closed, collapsed, and resized.

Examples

 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.Window
    :Title "Greetings" :Flags WindowFlags.NoCollapse
    :Contents
    (->
     "Hello shards!" (UI.Label))))

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