galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
galaxy::ui Namespace Reference

Functions

void imgui_init (const char *ini)
 Initialize ImGui context with galaxy.
void imgui_set_theme (const float scale) noexcept
 Set imgui theme.
void imgui_handle_events (const SDL_Event &events)
 Handle events in ImGui.
void imgui_new_frame ()
 Begin setting up ImGui pass.
void imgui_render ()
 Render imgui.
void imgui_exit ()
 Destroy imgui context.
void imgui_notify_success (const char *msg)
 ImGui success notification.
void imgui_notify_info (const char *msg)
 ImGui info notification.
void imgui_notify_warning (const char *msg)
 ImGui warning notification.
void imgui_notify_error (const char *msg)
 ImGui error notification.
void imgui_center_next_window ()
 Make sure the next window opened is centered on the monitor.
void imgui_confirm (const char *msg, std::move_only_function< void(void)> &&yes={}, std::move_only_function< void(void)> &&no={})
 Handles a popup for a yes/no situation.
ImGuiInputTextFlags imgui_default_flags () noexcept
 Get default text input flags.

Function Documentation

◆ imgui_init()

void galaxy::ui::imgui_init ( const char * ini)

Initialize ImGui context with galaxy.

Parameters
iniLayout ini file. Can include a path.

Definition at line 48 of file ImGuiHelpers.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ imgui_set_theme()

void galaxy::ui::imgui_set_theme ( const float scale)
noexcept

Set imgui theme.

Need to call when window is resized.

Parameters
scaleDisplay scale factor.

Definition at line 102 of file ImGuiHelpers.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ imgui_handle_events()

void galaxy::ui::imgui_handle_events ( const SDL_Event & events)

Handle events in ImGui.

Parameters
eventsEvent data.

Definition at line 173 of file ImGuiHelpers.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ imgui_new_frame()

void galaxy::ui::imgui_new_frame ( )

Begin setting up ImGui pass.

Definition at line 181 of file ImGuiHelpers.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ imgui_render()

void galaxy::ui::imgui_render ( )

Render imgui.

Definition at line 191 of file ImGuiHelpers.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ imgui_exit()

void galaxy::ui::imgui_exit ( )

Destroy imgui context.

Definition at line 201 of file ImGuiHelpers.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ imgui_notify_success()

void galaxy::ui::imgui_notify_success ( const char * msg)

ImGui success notification.

Parameters
msgMessage to display.

Definition at line 211 of file ImGuiHelpers.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ imgui_notify_info()

void galaxy::ui::imgui_notify_info ( const char * msg)

ImGui info notification.

Parameters
msgMessage to display.

Definition at line 216 of file ImGuiHelpers.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ imgui_notify_warning()

void galaxy::ui::imgui_notify_warning ( const char * msg)

ImGui warning notification.

Parameters
msgMessage to display.

Definition at line 221 of file ImGuiHelpers.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ imgui_notify_error()

void galaxy::ui::imgui_notify_error ( const char * msg)

ImGui error notification.

Parameters
msgMessage to display.

Definition at line 226 of file ImGuiHelpers.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ imgui_center_next_window()

void galaxy::ui::imgui_center_next_window ( )

Make sure the next window opened is centered on the monitor.

Definition at line 231 of file ImGuiHelpers.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ imgui_confirm()

void galaxy::ui::imgui_confirm ( const char * msg,
std::move_only_function< void(void)> && yes = {},
std::move_only_function< void(void)> && no = {} )

Handles a popup for a yes/no situation.

Parameters
msgText to display on confirmation box.
yesCode to run if user selects yes.
noCode to run if user selects no.

Definition at line 237 of file ImGuiHelpers.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ imgui_default_flags()

ImGuiInputTextFlags galaxy::ui::imgui_default_flags ( )
nodiscardnoexcept

Get default text input flags.

Returns
ImGuiInputTextFlags.

Definition at line 267 of file ImGuiHelpers.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: