RaweTrip
  • Welcome
  • Official Discord
  • Useful information
    • πŸ”ŒFor beginners
    • β™ŸοΈCommon knowledge
    • πŸ“šExamples
      • βš™οΈTab system
      • βš™οΈUI Interaction
      • βš™οΈClantag
      • βš™οΈWireframe smoke
  • documentation
    • ⛓️Common
      • πŸ“žCallbacks list
    • βš™οΈVariables
      • πŸ‘€esp
      • πŸ“œplist
      • πŸ”«weapon
      • ⚑vector
      • 🎨color
      • πŸŽ“cheat
      • πŸ’»ui
      • πŸ™οΈrender
      • πŸšΆβ€β™‚οΈentity
      • 🌎globalvars
      • πŸ› οΈengine
      • πŸ”©utils
      • πŸ–₯️console
      • πŸ”‘base64
      • πŸ“ bit
      • πŸ—ƒοΈfile
      • πŸ“Άhttp
      • βœ‰οΈchat
      • 〽️animate
      • 🧱materials
      • πŸ”§steam
      • ✈️trace
      • πŸ”—interfaces
        • πŸ’‘ieffects
        • 🧬precache
        • πŸ’³model_info
    • πŸ”’Enumerations
      • 🎞️enum_frames
Powered by GitBook
On this page
  1. Useful information
  2. Examples

UI Interaction

Example of ui interaction

To do something like this, you can refer to the ui

--> New checkbox
local checkbox = ui.add_checkbox("Checkbox")

--> New slider
local slider = ui.add_sliderint("Slider", 0, 100)

--> New combo
local combo = ui.add_combobox("Combo", { "First", "Second", "Third" })

--> New hotkey
local hotkey = ui.add_hotkey("Hotkey")

cheat.push_callback("on_paint", function()

    --> Checkbox interaction
    local checkbox_boolean = checkbox:get() --> Returns boolean [ true / false ]
    checkbox:set(true) --> Sets boolean [ true / false ]
    checkbox:set_visible(false) --> Sets visible [ true / false ] - def: [true]

    --> SliderInt interaction
    local slider_number = slider:get() --> Returns number
    slider:set(15) --> Sets number
    slider:set_visible(false) --> Sets visible [ true / false ] - def: [true]

    --> Combo interaction
    local combo_number = combo:get() --> Returns number
    local combo_items = combo:get_items() --> Returns items: { , ... }
    combo:set(1) --> Sets select
    combo:set_visible(false) --> Sets visible [ true / false ] - def: [true]
    combo:set_items({ "1", "2", "3", "4", "5" }) --> Sets items

    --> Hotkey interaction
    local hotkey_boolean = hotkey:get() --> Returns boolean [ true / false ]
    local hotkey_mode = hotkey:get_mode() --> Returns number
    hotkey:set_visible(false) --> Sets visible [ true / false ] - def: [true]

end)
PreviousTab systemNextClantag

Last updated 2 years ago

πŸ“š
βš™οΈ