GFX.MainWindow(
Contents: {
Once({
GFX.DrawQueue >= ui-draw-queue
GFX.UIPass(ui-draw-queue) >> render-steps
UI.LayoutClass(
MainDirection: LayoutDirection::RightToLeft
MinSize: @f2(200 200)
// note that some direction layouts may try to expand to max size and this max size will increase if the contents are too large
// also, without max size, the layout will try to expand to max size of the window, so for shrink to fit, may want to set to (0 0)
MaxSize: @f2(600 600)
// FillHeight: true
// FillWidth: true
Disabled: false
Frame: LayoutFrame::Widgets
EnableHorizontalScrollBar: true
EnableVerticalScrollBar: true
ScrollAreaMinWidth: 200.0
ScrollAreaMaxWidth: 200.0
// ScrollAreaAutoShrinkWidth: true ;; this is the default
// ScrollAreaAutoShrinkHeight: true ;; this is the default
// ScrollAreaEnableScrolling: false
// ScrollBarVisibility: ScrollVisibility::AlwaysVisible ;; note that this is the default. VisibleWhenNeeded may have some issues with scroll bar visibility
) >= scroll-frame-layout-class
false >= checked
1 >= choice
})
UI(
UI.CentralPanel({
UI.Layout(
Class: scroll-frame-layout-class
// individual override for size for each layout is also possible
// MinSize: @f2(200 200)
// MaxSize: @f2(600 600)
// FillHeight: true
// FillWidth: true
Contents: {
"Wrapping text followed by example widgets:" | UI.Label
UI.Checkbox(
Label: "checkbox"
Variable: checked
)
UI.RadioButton(
Label: "radio"
Variable: choice
Value: 1
)
UI.Button(
Label: "button"
Action: Msg("Clicked")
)
}
)
UI.Layout(
Class: scroll-frame-layout-class
// individual override for size for each layout is also possible
// MinSize: @f2(200 200)
// MaxSize: @f2(600 600)
// FillHeight: true
// FillWidth: true
Contents: {
"Wrapping text followed by example widgets:" | UI.Label
UI.Checkbox(
Label: "checkbox"
Variable: checked
)
UI.RadioButton(
Label: "radio"
Variable: choice
Value: 1
)
UI.Button(
Label: "button"
Action: Msg("Clicked")
)
}
)
})
) | UI.Render(ui-draw-queue)
GFX.Render(Steps: render-steps)
}
)
[warning] Context has 8 buffers at release (3 released, 8 kept)
[warning] Context has 5 textures at release (1 released, 5 kept)