Vivum Target
Item Styles
Learn how to style target menu items
Default
Destructive
Success
Ghost
Default
Destructive
Success
Ghost
Overview
Vivum Target supports a variety of styles for the menu items. The style property in the item accepts any key of the Config.Graphics.Menu.Styles table.
| @class Item : EntityPositioner | ||
|---|---|---|
| Field | Type | Description |
label | string | |
name? | string | Optional name to reference the item by. |
icon? | string | MenuIconTexture | The favicon to display left of the label. A texture object can be specified to render a specific ingame texture (like that of a ped headshot). |
style? | "default" | "destructive" | "success" | "ghost" | The theming of the item. Any value specified in |
action? | fun(menu: Menu, itemIndex: number, item: Item, coords: vector3, distance: number, entity?: number): boolean | nil | The returned value will be used to determine whether the menu should be hidden after the action is performed. If |
canInteract? | fun(entity?: number, coords: vector3, distance: number, name?: string, bone?: string | number | number[] | string[]): boolean | |
distance? | number | Override maximum distance at which the item can be interacted with. |
styles.lua
exports["vivum-target"]:AddTarget({ name = "styles", target = { position = vector3(0, 0, 0), }, items = { { label = "Default", style = "default", }, { label = "Destructive", style = "destructive", }, { label = "Success", style = "success", }, { label = "Ghost", style = "ghost", } } })