Lua API
  • 🔎Overview
  • Getting started
    • 🚀Creating scripts
    • 📓Metadata
    • â˜Žī¸Callbacks
    • 🧠Examples
    • 🌐Useful resources
  • Documentation
    • âš™ī¸Namespaces
      • đŸ–Ĩī¸Gui
      • âœī¸Render
      • đŸŽī¸Engine
      • đŸ”ĸMath
      • âš™ī¸Utilities
      • 🙎Entities
      • 📖Database
      • đŸ–ąī¸Input
      • 🌌Panorama
      • đŸĒļMaterials
      • 📂Filesystem
      • đŸ—ƒī¸Zip
    • âš™ī¸Instances
      • âš™ī¸Global Vars
      • âš™ī¸Fatality
      • âš™ī¸Gamerules
      • âš™ī¸Server
    • âš™ī¸Datatypes
      • đŸ–Ĩī¸control
      • đŸ–Ĩī¸checkbox
      • đŸ–Ĩī¸combobox
      • đŸ–Ĩī¸color_picker
      • đŸ–Ĩī¸slider
      • đŸ–Ĩī¸textbox
      • đŸ–Ĩī¸list
      • âš™ī¸entity
      • âš™ī¸player_info
      • âš™ī¸weapon_info
      • âš™ī¸user_cmd
      • âš™ī¸trace_t
      • âš™ī¸vec3
      • âš™ī¸timer
      • âš™ī¸cvar
      • âš™ī¸shot_info
      • âš™ī¸game_event
      • âš™ī¸material
      • âš™ī¸material_var
      • âš™ī¸zip
      • âš™ī¸animator
Powered by GitBook

Š 2025 - FATALITY

On this page
  • Functions
  • set_tooltip
  • set_visible
  • add_callback
  • get_name
  • get_type
  1. Documentation
  2. Datatypes

control

The following functions can be used for all gui types.

Functions

set_tooltip

local item = gui.combobox('lua>elements a>test', 'lua>elements a', 'Test combobox', false, 'Value 1', 'Value 2')
item:set_tooltip("This is a combobox")

tooltip

string

tooltip text

set_visible

local item = gui.checkbox('lua>elements a>test', 'lua>elements a', 'Test checkbox')
iteam:set_visible(false)

value

boolean

new visibility

add_callback

local item = gui.slider('lua>elements a>test', 'lua>elements a', 'Test slider', 0, 10)
iteam:add_callback(function()
    print(item:get())
end)

callback

function()

callback function

get_name

local item = gui.textbox('lua>elements a>test', 'lua>elements a')
print(iteam:get_name()) -- prints 'textbox'

Returns:

name

string

get_type

local item = gui.color_picker('lua>elements a>test', 'lua>elements a', 'Test color picker', render.color('#fff'))
print(iteam:get_type()) -- prints 'color_picker'

Returns:

type

string

PreviousDatatypesNextcheckbox

Last updated 1 year ago

âš™ī¸
đŸ–Ĩī¸
Parameter
Datatype
Description
Parameter
Datatype
Description
Parameter
Datatype
Description
Value
Datatype
Value
Datatype