nanos world API Reference Unofficial documentation
Function Client Fast

WebUI:SetLayout

Sets the Layout as Canvas on Screen. <strong>Anchors</strong>:<br/><br/><img src='/img/docs/anchors.webp' />

Syntax

Lua
my_web_ui:SetLayout(screen_location/offset_left_top = Vector(0, 0), size/offset_right_bottom = Vector(0, 0), anchors_min = Vector(0, 0), anchors_max = Vector(1, 1), alignment = Vector(0.5, 0.5))

Parameters

Name Type Default Description
screen_location/offset_left_top optional Vector2D Vector(0, 0)
size/offset_right_bottom optional Vector2D Vector(0, 0)
anchors_min optional Vector2D Vector(0, 0)
anchors_max optional Vector2D Vector(1, 1)
alignment optional Vector2D Vector(0.5, 0.5)