💜
Sakura
  • 👋Welcome
  • Information
    • 🎯Quick start
    • ⚜️Common knowledge
    • 💾Examples
      • *️Rendering menus, windows
  • documentation
    • 🪝Hooks
    • ⚙️Variables
      • 🍎Weapon ids
      • 🍎Inputs
      • 🍎Keys
      • 🍎Flags
      • 🍎ImGui Window Flags
    • 📛Namespaces
      • 🍏Game
      • 🍏ImGui (Menu)
      • 🍏Render
      • 🍏Local Player
      • 🍏Player
      • 🍏Notify
Powered by GitBook
On this page
  1. documentation
  2. Namespaces

ImGui (Menu)

Contains all functions from ImGui namespace

Remember to call these functions in SAKURA_MENU_RENDER callback.

-- Creates an Menu tab item with a specified title and associates it with a Lua function to call.
-- Parameters:
--     title: the title of the tab item to create.
--     function: the Lua function to call when the tab item is selected.
ImGui.Menu(title, function)
-- Creates an ImGui window with a specified title and flags and associates it with a Lua function to call.
-- Parameters:
--     title: the title of the window to create.
--     : the ImGui window flags to apply.
--     function: the Lua function to call when the window is opened.
ImGui.Window(title, , function)
-- Adds a new line of text to the current ImGui window.
-- Parameters:
--     text: the text to display.
ImGui.Text(text)
-- Creates a clickable button widget in the current ImGui window.
-- Parameters:
    -- text: the text to display on the button.
-- Returns:
    -- True if the button was clicked, false otherwise.
ImGui.Button(text)
-- Displays a checkbox with a label in the current ImGui window.
-- Parameters:
--     text: the text to be displayed as the checkbox label
--     value: the current value of the checkbox (true for checked, false for unchecked)
-- Returns:
--     The new value of the checkbox after the user interaction.
ImGui.Checkbox(text, value)
-- Puts the next widget on the same line as the previous one.
ImGui.SameLine()
-- Creates a combo box widget that allows the user to select an item from a list of options.
-- Parameters:
--     text: the label text to display next to the combo box.
--     value: the current value of the combo box.
--     options: a null-terminated string containing the options, separated by '\0' characters.
-- Returns:
--     The selected value of the combo box.
ImGui.Combo(text, value, options)
-- Display an integer slider control and return its value.
-- Parameters:
--     text: the label next to the slider control.
--     value: the current integer value of the slider.
--     minimum: the minimum integer value that the slider can be set to.
--     maximum: the maximum integer value that the slider can be set to.
-- Returns:
--     The new integer value of the slider.
ImGui.Slider(text, value, minimum, maximum)
-- Creates a key binding UI element for a given text label and key value.
-- Parameters:
--     text: string label displayed next to the key binding element,
--     key: integer representing the default key bind value.
-- Returns:
--     The integer key value selected by the user through the UI element.
ImGui.KeyBind(text, key)
-- Retrieves the current size of the ImGui window in screen coordinates.
-- Returns:
--     An ImVec2 struct containing the width and height of the window in screen coordinates.
ImGui.GetWindowSize()

PreviousGameNextRender

Last updated 2 years ago

📛
🍏