Please note that a created Window will not be shown until its method Window:show() has been called.
Window.constructor([parent], title, [style], [width], [height]) constructor
The Window constructor returns a Window value representing a user interface dialog.
Parameters
[parent]
An optional Window, that represent a parent Window or (owner Window) for the new Window, called a child Window. When this field is set, the new Window won't appear on the Windows Taskbar (only the parent Window).
title
A string representing the Window's title.
[style]
A string that describe the Window style :
- "dialog" : the default, a resizeable dialog. The user can maximize/minimize the window.
- "fixed" : a fixed size dialog.
- "float" : a tiny float window.
- "single" : a fixed size dialog with system menu (only minimize-able).
- "raw" : a fixed size without title bar or borders.
[width]
An optional number that indicates the Window width, in pixels, defaulting to 640.
[height]
An optional number that indicates the Window height, in pixels, defaulting to 480.
Example
local ui = require "ui"
-- create a simple window
local win = ui.Window("Simple Window")
-- shows the Window
ui.run(win):wait()