a library to speed up the development of Fivem scripts and frameworks
fivem-ts - Documentation v0.7.5 • Docs
fivem-ts - Documentation v0.7.5 / Client / Container
Represents a drawable container that can hold and manage other drawable items. The container has a position, size, and color, and it can draw itself and its child items on the screen.
new Container(
pos
,size
,color
):Container
Creates an instance of a Container
.
• pos: Point
The position of the container on the screen.
• size: Size
The size of the container.
• color: Color
The color of the container.
color:
Color
items:
IDrawable
[] =[]
pos:
Point
size:
Size
addItem(
item
):void
Adds a single drawable item to the container.
• item: IDrawable
The drawable item to add.
void
addItems(
items
):void
Adds multiple drawable items to the container.
• items: IDrawable
[]
An array of drawable items to add.
void
draw(
offset
?,resolution
?):void
Draws the container and its contained items on the screen.
• offset?: Size
An optional size offset to apply when drawing the container.
• resolution?: Size
The resolution of the screen. Defaults to a new Size(0, 0)
if not provided.
void