Skip to content

I3TGui ​

Functions ​

Name
boolBeginMenu(const char * label, bool enabled =true)<br>Begins a new submenu.
boolBeginMenuWithLog(const char * label, bool enabled =true)<br>Begins a new submenu with optional logging on opening.
boolButton(const char * label, const ImVec2 & size =ImVec2(0, 0))<br>Creates a button.
boolButtonWithLog(const char * label, const ImVec2 & size =ImVec2(0, 0))<br>Creates a button with optional logging on press.
boolMenuItem(const char * label, const char * shortcut =nullptr, bool selected =false, bool enabled =true)<br>Creates a standard menu item.
boolMenuItemWithLog(const char * label, const char * shortcut, bool * p_selected, bool enabled =true, const std::function< void()> & log =nullptr)<br>Creates a menu item with a selection pointer and optional logging.
boolMenuItemWithLog(const char * label, const char * shortcut =nullptr, bool selected =false, bool enabled =true, const std::function< void()> & log =nullptr)<br>Creates a menu item with optional logging on activation.

Functions Documentation ​

function BeginMenu ​

cpp
bool BeginMenu(
    const char * label,
    bool enabled =true
)
bool BeginMenu(
    const char * label,
    bool enabled =true
)

Begins a new submenu.

Parameters:

  • label The display text for the menu.
  • enabled Whether the menu is enabled and can be interacted with.
  • label The menu title.
  • enabled Whether the menu is enabled.

Return:

  • true if the menu is open and its contents should be rendered.
  • true if the menu is open and should render its contents.

Wrapper around ImGui::BeginMenu.

function BeginMenuWithLog ​

cpp
bool BeginMenuWithLog(
    const char * label,
    bool enabled =true
)
bool BeginMenuWithLog(
    const char * label,
    bool enabled =true
)

Begins a new submenu with optional logging on opening.

Parameters:

  • label The display text for the menu.
  • enabled Whether the menu is enabled and can be interacted with.
  • label The menu title.
  • enabled Whether the menu is enabled.

Return:

  • true if the menu is open and its contents should be rendered.
  • true if the menu is open and should render its contents.

Wrapper around ImGui::BeginMenu with logging on menu activation.

function Button ​

cpp
bool Button(
    const char * label,
    const ImVec2 & size =ImVec2(0, 0)
)
bool Button(
    const char * label,
    const ImVec2 & size =ImVec2(0, 0)
)

Creates a button.

Parameters:

  • label The text displayed on the button.
  • size The size of the button (default is auto-sized).
  • label The button label.
  • size The size of the button.

Return:

  • true if the button was pressed.
  • true if the button was pressed.

Wrapper around ImGui::Button.

function ButtonWithLog ​

cpp
bool ButtonWithLog(
    const char * label,
    const ImVec2 & size =ImVec2(0, 0)
)
bool ButtonWithLog(
    const char * label,
    const ImVec2 & size =ImVec2(0, 0)
)

Creates a button with optional logging on press.

Parameters:

  • label The text displayed on the button.
  • size The size of the button (default is auto-sized).
  • label The button label.
  • size The size of the button.

Return:

  • true if the button was pressed.
  • true if the button was pressed.

Wrapper around ImGui::Button with logging on click.

function MenuItem ​

cpp
bool MenuItem(
    const char * label,
    const char * shortcut =nullptr,
    bool selected =false,
    bool enabled =true
)
bool MenuItem(
    const char * label,
    const char * shortcut =nullptr,
    bool selected =false,
    bool enabled =true
)

Creates a standard menu item.

Parameters:

  • label The display text for the menu item.
  • shortcut Optional shortcut key displayed next to the item.
  • selected Whether the item is currently selected.
  • enabled Whether the item is enabled and clickable.

Return: true if the menu item was activated by the user.

Wrapper around ImGui::MenuItem.

function MenuItemWithLog ​

cpp
bool MenuItemWithLog(
    const char * label,
    const char * shortcut,
    bool * p_selected,
    bool enabled =true,
    const std::function< void()> & log =nullptr
)
bool MenuItemWithLog(
    const char * label,
    const char * shortcut,
    bool * p_selected,
    bool enabled =true,
    const std::function< void()> & log =nullptr
)

Creates a menu item with a selection pointer and optional logging.

Parameters:

  • label The display text for the menu item.
  • shortcut Shortcut key displayed next to the item.
  • p_selected Pointer to the selection state of the item.
  • enabled Whether the item is enabled and clickable.
  • log Optional logging callback. If not provided, default logging will be used.
  • label The menu item label.
  • shortcut The shortcut key.
  • p_selected Pointer to the selection state flag (can be nullptr).
  • enabled Whether the item is enabled.
  • log Optional logging callback. If not provided, default logging will be used.

Return:

  • true if the menu item was activated by the user.
  • true if the menu item was clicked.

Wrapper around MenuItemWithLog that also modifies a selection flag.

function MenuItemWithLog ​

cpp
bool MenuItemWithLog(
    const char * label,
    const char * shortcut =nullptr,
    bool selected =false,
    bool enabled =true,
    const std::function< void()> & log =nullptr
)
bool MenuItemWithLog(
    const char * label,
    const char * shortcut =nullptr,
    bool selected =false,
    bool enabled =true,
    const std::function< void()> & log =nullptr
)

Creates a menu item with optional logging on activation.

Parameters:

  • label The display text for the menu item.
  • shortcut Optional shortcut key displayed next to the item.
  • selected Whether the item is currently selected.
  • enabled Whether the item is enabled and clickable.
  • log Optional logging callback. If not provided, default logging will be used.
  • label The menu item label.
  • shortcut The shortcut key shown with the item (optional).
  • selected Whether the item is currently selected.
  • enabled Whether the item is enabled.
  • log Optional logging callback. If not provided, default logging will be used.

Return:

  • true if the menu item was activated by the user.
  • true if the menu item was clicked.

Wrapper around ImGui::MenuItem with optional logging on selection.


Updated on 2025-05-31 at 12:55:31 +0000