A UI window that owns a root Widget hierarchy and is managed by the WindowManager.
Lua full name: lysa.ui.Window
|
| nil | set_widget (child: Widget|nil, resources: string|nil, padding: number|nil) |
| | Replaces the root widget. Call set_widget(nil) first if a layout was previously applied. More...
|
| |
| nil | set_focused_widget (widget: Widget) |
| | Moves keyboard focus to the specified widget within this window. More...
|
| |
| nil | set_pos (x: number, y: number) |
| | Moves the window's bottom-left corner to the given position. More...
|
| |
| nil | close () |
| | Closes and removes the window (effective at the start of the next frame). More...
|
| |
| nil | show () |
| | Makes the window visible (effective at the start of the next frame). More...
|
| |
| nil | hide () |
| | Hides the window without destroying it (effective at the start of the next frame). More...
|
| |
| nil | set_transparency (alpha: number) |
| | Sets the global alpha transparency for the entire window (0.0 = invisible, 1.0 = fully opaque). More...
|
| |
| nil | set_minimum_size (width: number, height: number) |
| | Sets the minimum dimensions the user can resize the window to (default 2×2). More...
|
| |
| nil | set_maximum_size (width: number, height: number) |
| | Sets the maximum dimensions the user can resize the window to. More...
|
| |
| nil | refresh () |
| | Forces a full redraw of all widgets in this window at the start of the next frame. More...
|
| |
| Widget | add_child (child: Widget, alignment: integer, resource: string|nil) |
| | Adds a pre-constructed widget to the root widget with the given alignment and optional resource string. More...
|
| |
| nil | remove_child (child: Widget) |
| | Removes the given widget from the root widget. More...
|
| |
| Text | create_text (alignment: Alignment, text: string) |
| | Creates and adds a Text widget. More...
|
| |
| Text | create_text (resource: string, alignment: Alignment, text: string) |
| | Creates and adds a Text widget, loading its style from a resource string. More...
|
| |
| Panel | create_panel (alignment: Alignment) |
| | Creates and adds a Panel widget. More...
|
| |
| Panel | create_panel (resource: string, alignment: Alignment) |
| | Creates and adds a Panel widget, loading its style from a resource string. More...
|
| |
| Box | create_box (alignment: Alignment) |
| | Creates and adds a Box widget (bordered panel). More...
|
| |
| Box | create_box (resource: string, alignment: Alignment) |
| | Creates and adds a Box widget (bordered panel), loading its style from a resource string. More...
|
| |
| Button | create_button (alignment: Alignment) |
| | Creates and adds a Button widget. More...
|
| |
| Button | create_button (resource: string, alignment: Alignment) |
| | Creates and adds a Button widget, loading its style from a resource string. More...
|
| |
| ToggleButton | create_toggle_button (alignment: Alignment) |
| | Creates and adds a ToggleButton widget. More...
|
| |
| ToggleButton | create_toggle_button (resource: string, alignment: Alignment) |
| | Creates and adds a ToggleButton widget, loading its style from a resource string. More...
|
| |
| HLine | create_hline (alignment: Alignment) |
| | Creates and adds a horizontal Line widget. More...
|
| |
| HLine | create_hline (resource: string, alignment: Alignment) |
| | Creates and adds a horizontal Line widget, loading its style from a resource string. More...
|
| |
| VLine | create_vline (alignment: Alignment) |
| | Creates and adds a vertical Line widget. More...
|
| |
| VLine | create_vline (resource: string, alignment: Alignment) |
| | Creates and adds a vertical Line widget, loading its style from a resource string. More...
|
| |
| Frame | create_frame (alignment: Alignment, title: string) |
| | Creates and adds a Frame widget with the given title. More...
|
| |
| Frame | create_frame (resource: string, alignment: Alignment, title: string) |
| | Creates and adds a Frame widget with the given title, loading its style from a resource string. More...
|
| |
| TextEdit | create_text_edit (alignment: Alignment, text: string|nil) |
| | Creates and adds a TextEdit widget with optional initial text. More...
|
| |
| TextEdit | create_text_edit (resource: string, alignment: Alignment, text: string|nil) |
| | Creates and adds a TextEdit widget, loading its style from a resource string. More...
|
| |
| Image | create_image (alignment: Alignment) |
| | Creates and adds an Image widget. More...
|
| |
| Image | create_image (resource: string, alignment: Alignment) |
| | Creates and adds an Image widget, loading its style from a resource string. More...
|
| |
| Image | create_image (resource: string, alignment: Alignment, autoresize: boolean, fixedsize: boolean) |
| | Creates and adds an Image widget with auto-resize and fixed-size options. More...
|
| |
| VScrollBar | create_vscrollbar (alignment: Alignment) |
| | Creates and adds a vertical ScrollBar widget. More...
|
| |
| VScrollBar | create_vscrollbar (resource: string, alignment: Alignment) |
| | Creates and adds a vertical ScrollBar widget, loading its style from a resource string. More...
|
| |
| HScrollBar | create_hscrollbar (alignment: Alignment) |
| | Creates and adds a horizontal ScrollBar widget. More...
|
| |
| HScrollBar | create_hscrollbar (resource: string, alignment: Alignment) |
| | Creates and adds a horizontal ScrollBar widget, loading its style from a resource string. More...
|
| |
| TreeView | create_tree_view (alignment: Alignment) |
| | Creates and adds a TreeView widget. More...
|
| |
| TreeView | create_tree_view (resource: string, alignment: Alignment) |
| | Creates and adds a TreeView widget, loading its style from a resource string. More...
|
| |
| Widget | create_widget (alignment: Alignment) |
| | Creates and adds a transparent container Widget. More...
|
| |
| Widget | create_widget (resource: string, alignment: Alignment) |
| | Creates and adds a transparent container Widget, loading its style from a resource string. More...
|
| |
| ListBox | create_list_box (alignment: Alignment) |
| | Creates and adds a ListBox widget. More...
|
| |
| ListBox | create_list_box (resource: string, alignment: Alignment) |
| | Creates and adds a ListBox widget, loading its style from a resource string. More...
|
| |
| ProgressBar | create_progress_bar (alignment: Alignment) |
| | Creates and adds a ProgressBar widget. More...
|
| |
| ProgressBar | create_progress_bar (resource: string, alignment: Alignment) |
| | Creates and adds a ProgressBar widget, loading its style from a resource string. More...
|
| |
| VProgressBar | create_vprogress_bar (alignment: Alignment) |
| | Creates and adds a vertical ProgressBar widget. More...
|
| |
| VProgressBar | create_vprogress_bar (resource: string, alignment: Alignment) |
| | Creates and adds a vertical ProgressBar widget, loading its style from a resource string. More...
|
| |
| HProgressBar | create_hprogress_bar (alignment: Alignment) |
| | Creates and adds a horizontal ProgressBar widget. More...
|
| |
| HProgressBar | create_hprogress_bar (resource: string, alignment: Alignment) |
| | Creates and adds a horizontal ProgressBar widget, loading its style from a resource string. More...
|
| |
| ScrollBox | create_scroll_box (alignment: Alignment) |
| | Creates and adds a ScrollBox widget. More...
|
| |
| ScrollBox | create_scroll_box (resource: string, alignment: Alignment) |
| | Creates and adds a ScrollBox widget, loading its style from a resource string. More...
|
| |
|
| integer | resizeable_borders |
| | Bitmask of which window borders are user-resizable (see lysa.ui.ResizeableBorder).
|
| |
| Widget | widget |
| | The root widget that covers the entire client area of the window. (read-only)
|
| |
| any | style |
| | The currently active style layout object, or nil if no layout has been applied.
|
| |
| number | width |
| | Client area width in virtual screen units.
|
| |
| number | height |
| | Client area height in virtual screen units.
|
| |
| lysa.Rect | rect |
| | Client area position and size as a Rect.
|
| |
| number | x |
| | Current X position of the window's bottom-left corner.
|
| |
| number | y |
| | Current Y position of the window's bottom-left corner.
|
| |
| boolean | visible |
| | Whether the window is visible; changes take effect at the start of the next frame.
|
| |
| number | minimum_width |
| | The minimum width the window can be resized to. (read-only)
|
| |
| number | minimum_height |
| | The minimum height the window can be resized to. (read-only)
|
| |
| number | maximum_width |
| | The maximum width the window can be resized to. (read-only)
|
| |
| number | maximum_height |
| | The maximum height the window can be resized to. (read-only)
|
| |
| number | aspect_ratio |
| | Aspect ratio (width / height) of the Window client area. (read-only)
|
| |
| lysa.Font | font |
| | The default font applied to widgets that do not specify their own.
|
| |
| number | font_scale |
| | The default font scale applied to widgets that do not specify their own.
|
| |
| lysa.float4 | text_color |
| | The default text RGBA color applied to widgets that do not specify their own.
|
| |