Windows#
Functions#
Classes#
- class eg-overlay-ui.uiwindow#
A top-level window element. A window can only have a single child, which should be a layout container such as a
uibox
.- set_child(uielement)#
Set the child element of this window.
- Parameters:
uielement – A ui element.
Version History
Version
Notes
0.0.1
Added
- show()#
Show the window. If the window is already visible, this function has no effect.
Version History
Version
Notes
0.0.1
Added
- hide()#
Hide the window.
Version History
Version
Notes
0.0.1
Added
- min_size(width, height)#
Set the minimum size for the window.
Version History
Version
Notes
0.0.1
Added
- resizable(value)#
Set wether or not the window should be resizable by the user.
- Parameters:
value (
boolean
) – True if the user should be able to resize the window.
Version History
Version
Notes
0.0.1
Added
- settings(settings, path)#
Bind a window to a settings object. This causes the window update its size and position to the values in the settings object and then save any changes made after.
This allows a window position and size to be persisted between overlay sessions.
path
is a base key below which the window will save position and size to individual keys:Key
Value
x
Horizontal position
y
Vertical position
width
Width
height
Height
Example#local console_settings = settings.new("console.lua") console_settings:set_default("window.x", 200) console_settings:set_default("window.y", 30) console_settings:set_default("window.width", 600) console_settings:set_default("window.height", 300) console.win = ui.window("Lua Console/Log", 0, 0) console.win:min_size(600, 300) console.win:resizable(true) console.win:settings(console_settings, "window")
Version History
Version
Notes
0.0.1
Added
- position(x, y)#
Set the window position.
Version History
Version
Notes
0.1.0
Added
- caption(text)#
Set the window caption
- Parameters:
text (
string
)
Version History
Version
Notes
0.1.0
Added
- hanchor(anchor)#
Set the horizontal anchor position for the window. The horizontal anchor controls how the window position is used to position the window. By default, the window is anchored to the top-left.
- Parameters:
anchor (
integer
) – The new anchor position:-1
for left,0
for middle,1
for right.
Version History
Version
Notes
0.1.0
Added
- vanchor(anchor)#
Set the vertical anchor position for the window. The vertical anchor controls how the window position is used to position the window. By default, the window is anchored to the top-left.
- Parameters:
anchor (
integer
) – The new anchor position:-1
for top,0
for middle,1
for bottom.
Version History
Version
Notes
0.1.0
Added