nanos world API Reference Unofficial documentation
Function Client Fast

Widget:SetSlotCanvasLayout

Sets the Layout as Canvas on Screen.<br/><br/>Note: This method only works if this Widget is child of a Canvas Panel.<br/><br/><strong>Anchors</strong>:<br/><br/><img src='/img/docs/anchors.webp' />

Syntax

Lua
my_widget:SetSlotCanvasLayout(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)