reference monoe.engine.window

Lua API Reference

Provides functions to manipulate the main engine window.

Properties

NameTypeDescription
uidinteger

monoe.io.window.new

Creates a new window.

Parameters

NameTypeDescription
_uidinteger|nil

Returns


monoe.io.window:title

Changes the title of the main window.

Parameters

NameTypeDescription
titlestringNew window title

monoe.io.window:size

Sets or queries the size of the main window.

Parameters

NameTypeDescription
widthnumber|nilNew width in pixels
heightnumber|nilNew height in pixels

Returns


monoe.io.window:position

Sets or queries the position of the main window.

Parameters

NameTypeDescription
xnumber|nilNew x position
ynumber|nilNew y position

Returns


monoe.io.window:scale

Scales the window.

Parameters

NameTypeDescription
xnumberScale factor X
ynumberScale factor Y

Returns


monoe.io.window:move

Moves the window by a relative offset.

Parameters

NameTypeDescription
dxnumberHorizontal offset
dynumberVertical offset

Returns


monoe.io.window:attach

Attaches an object or its children to the window for rendering.

Parameters

NameTypeDescription
objtableObject with `.uid` or `.root` property

monoe.io.window:visible

Makes the window visible

Parameters

NameTypeDescription
stateboolean

Returns


monoe.io.window:center

Returns the center coordinates of the window.

Returns


monoe.io.window:close_request

Registers a callable that'll be called when a window closing is requested.

Parameters

NameTypeDescription
funcfunction
onceboolean|nil