GUI
Classes
Name | |
---|---|
struct | GUI::InputTextCallback_UserData |
Functions
Name | |
---|---|
bool | Button(const char * id, bool disabled, const ImVec2 & size) |
bool | ButtonWithCorners(const char * label, ImDrawFlags corners, const ImVec2 & size_arg) |
bool | ButtonWithCornersEx(const char * label, ImDrawFlags corners, const ImVec2 & size_arg, ImGuiButtonFlags flags) |
float | calculateDataItemsWidth(float fontSize, int maxCharacters, float zoom =1.0f)<br>Works out pixel width of data items based on the provided parameters. |
glm::vec2 | convertCoordinates(glm::vec2 position, glm::vec2 newOrigin) |
bool | DimButton(const char * label, const ImVec2 & size) |
bool | DimButtonDark(const char * label, const ImVec2 & size) |
void | dockTabStylePop() |
void | dockTabStylePush()<br>Sets style for the tab of a dockable window. |
void | drawCross(glm::vec2 pos, ImDrawList * drawList, float thickness, float size, ImColor color) |
void | drawEllipse(float cx, float cy, float rx, float ry, int num_segments, ImDrawList * drawList, ImColor color, float thickness) |
bool | DrawFloat(const std::string & label, float & value, int numberOfVisibleDecimals, Core::EValueState const & valueState, bool & valueChanged) |
bool | DrawMatrix(const char * label, const glm::mat4 & data, int numberOfVisibleDecimals) |
bool | DrawMatrix(const char * label, const glm::mat4 & data, int numberOfVisibleDecimals, const std::array< std::array< Core::EValueState, 4 > const, 4 > & dataState, bool & valueChanged, int & rowOfChange, int & columnOfChange, float & valueOfChange) |
bool | DrawMatrix(const char * label, const glm::mat4 & data, int numberOfVisibleDecimals, Core::EValueState valState, bool & valueChanged, int & rowOfChange, int & columnOfChange, float & valueOfChange) |
bool | equalsRect(const ImRect & a, const ImRect & b) |
bool | equalsVec(const ImVec2 & a, const ImVec2 & b) |
bool | FloatingButton(const char * label, const ImVec2 & size) |
bool | FloatingButtonDark(const char * label, const ImVec2 & size, float rounding) |
bool | FloatingToggleButton(const char * label, bool & toggled, bool invert, const ImVec2 & size) |
ImVec2 | floorImVec2(const ImVec2 & v) |
ImVec2 | glmToIm(const glm::vec2 & v) |
ImVec4 | glmToIm(const glm::vec4 & v) |
glm::vec2 | imToGlm(const ImVec2 & v) |
glm::vec4 | imToGlm(const ImVec4 & v) |
bool | InputText(const char * label, std::string * str, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void * user_data) |
int | InputTextCallback(ImGuiInputTextCallbackData * data) |
bool | ItemTooltip(const char * header, const char * description =nullptr, ImGuiHoveredFlags hoverFlags =ImGuiHoveredFlags_ForTooltip)<br>Makes the last submitted ImGui item have a tooltip. |
int | maxLengthOfData4x4(const glm::mat4 & data, int numberOfVisibleDecimal) |
int | numberOfCharWithDecimalPoint(float value, int numberOfVisibleDecimal) |
void | PopFontScale(float oldScale) |
float | PushFontScale(float newScale) |
void | RenderFrameWithCorners(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, bool border, float rounding, ImDrawFlags corners) |
bool | SliderFloatStepped(const char * label, float * v, float step, float v_min, float v_max, const std::string & format)<br>A float slider that is limited to individual steps ImGui doesn't support this by default so this is actually an IntSlider that recalculates back into a float. |
void | Text(const char * text, EFont font) |
void | Text(const char * text, ImFont * font) |
void | TextCentered(const char * text, ImRect rect, ImU32 col) |
void | TextColoredShadow(const char * text, const ImVec4 & color) |
void | TextColoredShadowCentered(const char * text, const ImVec4 & color, float width) |
void | TextShadow(const char * text) |
bool | ToggleButton(const char * label, bool & toggled, bool invert, ImVec2 size) |
void | Tooltip(const char * header, const char * description =nullptr) |
std::string | TruncateText(const std::string & p_text, float p_truncated_width)<br>Sourced from https://github.com/ocornut/imgui/issues/5267, credit to Gl1tchs. |
Functions Documentation
function Button
bool Button(
const char * id,
bool disabled,
const ImVec2 & size
)
bool Button(
const char * id,
bool disabled,
const ImVec2 & size
)
function ButtonWithCorners
bool ButtonWithCorners(
const char * label,
ImDrawFlags corners,
const ImVec2 & size_arg
)
bool ButtonWithCorners(
const char * label,
ImDrawFlags corners,
const ImVec2 & size_arg
)
function ButtonWithCornersEx
bool ButtonWithCornersEx(
const char * label,
ImDrawFlags corners,
const ImVec2 & size_arg,
ImGuiButtonFlags flags
)
bool ButtonWithCornersEx(
const char * label,
ImDrawFlags corners,
const ImVec2 & size_arg,
ImGuiButtonFlags flags
)
function calculateDataItemsWidth
float calculateDataItemsWidth(
float fontSize,
int maxCharacters,
float zoom =1.0f
)
float calculateDataItemsWidth(
float fontSize,
int maxCharacters,
float zoom =1.0f
)
Works out pixel width of data items based on the provided parameters.
Parameters:
- fontSize Current font size in pixels
- maxCharacters Max number of characters/numerals any data item value has
- zoom Zoom/scaling level
Return: The desired data item width in pixels
function convertCoordinates
inline glm::vec2 convertCoordinates(
glm::vec2 position,
glm::vec2 newOrigin
)
inline glm::vec2 convertCoordinates(
glm::vec2 position,
glm::vec2 newOrigin
)
function DimButton
bool DimButton(
const char * label,
const ImVec2 & size
)
bool DimButton(
const char * label,
const ImVec2 & size
)
function DimButtonDark
bool DimButtonDark(
const char * label,
const ImVec2 & size
)
bool DimButtonDark(
const char * label,
const ImVec2 & size
)
function dockTabStylePop
void dockTabStylePop()
void dockTabStylePop()
function dockTabStylePush
void dockTabStylePush()
void dockTabStylePush()
Sets style for the tab of a dockable window.
This method should be called after the ImGui::Begin call of a dockable window. Style needs to be popped afterwards with dockTabStylePop() Note that this style affects regular ImGui tabs, the style needs to be popped before using those in the dockable window.
function drawCross
void drawCross(
glm::vec2 pos,
ImDrawList * drawList,
float thickness,
float size,
ImColor color
)
void drawCross(
glm::vec2 pos,
ImDrawList * drawList,
float thickness,
float size,
ImColor color
)
function drawEllipse
void drawEllipse(
float cx,
float cy,
float rx,
float ry,
int num_segments,
ImDrawList * drawList,
ImColor color,
float thickness
)
void drawEllipse(
float cx,
float cy,
float rx,
float ry,
int num_segments,
ImDrawList * drawList,
ImColor color,
float thickness
)
function DrawFloat
bool DrawFloat(
const std::string & label,
float & value,
int numberOfVisibleDecimals,
Core::EValueState const & valueState,
bool & valueChanged
)
bool DrawFloat(
const std::string & label,
float & value,
int numberOfVisibleDecimals,
Core::EValueState const & valueState,
bool & valueChanged
)
function DrawMatrix
bool DrawMatrix(
const char * label,
const glm::mat4 & data,
int numberOfVisibleDecimals
)
bool DrawMatrix(
const char * label,
const glm::mat4 & data,
int numberOfVisibleDecimals
)
function DrawMatrix
bool DrawMatrix(
const char * label,
const glm::mat4 & data,
int numberOfVisibleDecimals,
const std::array< std::array< Core::EValueState, 4 > const, 4 > & dataState,
bool & valueChanged,
int & rowOfChange,
int & columnOfChange,
float & valueOfChange
)
bool DrawMatrix(
const char * label,
const glm::mat4 & data,
int numberOfVisibleDecimals,
const std::array< std::array< Core::EValueState, 4 > const, 4 > & dataState,
bool & valueChanged,
int & rowOfChange,
int & columnOfChange,
float & valueOfChange
)
function DrawMatrix
bool DrawMatrix(
const char * label,
const glm::mat4 & data,
int numberOfVisibleDecimals,
Core::EValueState valState,
bool & valueChanged,
int & rowOfChange,
int & columnOfChange,
float & valueOfChange
)
bool DrawMatrix(
const char * label,
const glm::mat4 & data,
int numberOfVisibleDecimals,
Core::EValueState valState,
bool & valueChanged,
int & rowOfChange,
int & columnOfChange,
float & valueOfChange
)
function equalsRect
inline bool equalsRect(
const ImRect & a,
const ImRect & b
)
inline bool equalsRect(
const ImRect & a,
const ImRect & b
)
function equalsVec
inline bool equalsVec(
const ImVec2 & a,
const ImVec2 & b
)
inline bool equalsVec(
const ImVec2 & a,
const ImVec2 & b
)
function FloatingButton
bool FloatingButton(
const char * label,
const ImVec2 & size
)
bool FloatingButton(
const char * label,
const ImVec2 & size
)
function FloatingButtonDark
bool FloatingButtonDark(
const char * label,
const ImVec2 & size,
float rounding
)
bool FloatingButtonDark(
const char * label,
const ImVec2 & size,
float rounding
)
function FloatingToggleButton
bool FloatingToggleButton(
const char * label,
bool & toggled,
bool invert,
const ImVec2 & size
)
bool FloatingToggleButton(
const char * label,
bool & toggled,
bool invert,
const ImVec2 & size
)
function floorImVec2
inline ImVec2 floorImVec2(
const ImVec2 & v
)
inline ImVec2 floorImVec2(
const ImVec2 & v
)
function glmToIm
inline ImVec2 glmToIm(
const glm::vec2 & v
)
inline ImVec2 glmToIm(
const glm::vec2 & v
)
function glmToIm
inline ImVec4 glmToIm(
const glm::vec4 & v
)
inline ImVec4 glmToIm(
const glm::vec4 & v
)
function imToGlm
inline glm::vec2 imToGlm(
const ImVec2 & v
)
inline glm::vec2 imToGlm(
const ImVec2 & v
)
function imToGlm
inline glm::vec4 imToGlm(
const ImVec4 & v
)
inline glm::vec4 imToGlm(
const ImVec4 & v
)
function InputText
bool InputText(
const char * label,
std::string * str,
ImGuiInputTextFlags flags,
ImGuiInputTextCallback callback,
void * user_data
)
bool InputText(
const char * label,
std::string * str,
ImGuiInputTextFlags flags,
ImGuiInputTextCallback callback,
void * user_data
)
function InputTextCallback
static int InputTextCallback(
ImGuiInputTextCallbackData * data
)
static int InputTextCallback(
ImGuiInputTextCallbackData * data
)
function ItemTooltip
inline bool ItemTooltip(
const char * header,
const char * description =nullptr,
ImGuiHoveredFlags hoverFlags =ImGuiHoveredFlags_ForTooltip
)
inline bool ItemTooltip(
const char * header,
const char * description =nullptr,
ImGuiHoveredFlags hoverFlags =ImGuiHoveredFlags_ForTooltip
)
Makes the last submitted ImGui item have a tooltip.
Return: If the tooltip is showing.
By default, the standard tooltip settings are applied. Tooltip hover options can be modifed, for example to make the tooltip appearing delay longer: hoverFlags = ImGuiHoveredFlags_DelayNormal | ImGuiHoveredFlags_Stationary Tooltip hover delay (what normal / short delay means) can be set in ImGuiStyle.
function maxLengthOfData4x4
int maxLengthOfData4x4(
const glm::mat4 & data,
int numberOfVisibleDecimal
)
int maxLengthOfData4x4(
const glm::mat4 & data,
int numberOfVisibleDecimal
)
function numberOfCharWithDecimalPoint
int numberOfCharWithDecimalPoint(
float value,
int numberOfVisibleDecimal
)
int numberOfCharWithDecimalPoint(
float value,
int numberOfVisibleDecimal
)
function PopFontScale
inline void PopFontScale(
float oldScale
)
inline void PopFontScale(
float oldScale
)
function PushFontScale
inline float PushFontScale(
float newScale
)
inline float PushFontScale(
float newScale
)
function RenderFrameWithCorners
void RenderFrameWithCorners(
ImVec2 p_min,
ImVec2 p_max,
ImU32 fill_col,
bool border,
float rounding,
ImDrawFlags corners
)
void RenderFrameWithCorners(
ImVec2 p_min,
ImVec2 p_max,
ImU32 fill_col,
bool border,
float rounding,
ImDrawFlags corners
)
function SliderFloatStepped
bool SliderFloatStepped(
const char * label,
float * v,
float step,
float v_min,
float v_max,
const std::string & format
)
bool SliderFloatStepped(
const char * label,
float * v,
float step,
float v_min,
float v_max,
const std::string & format
)
A float slider that is limited to individual steps ImGui doesn't support this by default so this is actually an IntSlider that recalculates back into a float.
Uses std::format syntax for the format string, not printf (eg. {:.2f})
function Text
inline void Text(
const char * text,
EFont font
)
inline void Text(
const char * text,
EFont font
)
function Text
inline void Text(
const char * text,
ImFont * font
)
inline void Text(
const char * text,
ImFont * font
)
function TextCentered
inline void TextCentered(
const char * text,
ImRect rect,
ImU32 col
)
inline void TextCentered(
const char * text,
ImRect rect,
ImU32 col
)
function TextColoredShadow
inline void TextColoredShadow(
const char * text,
const ImVec4 & color
)
inline void TextColoredShadow(
const char * text,
const ImVec4 & color
)
function TextColoredShadowCentered
inline void TextColoredShadowCentered(
const char * text,
const ImVec4 & color,
float width
)
inline void TextColoredShadowCentered(
const char * text,
const ImVec4 & color,
float width
)
function TextShadow
inline void TextShadow(
const char * text
)
inline void TextShadow(
const char * text
)
function ToggleButton
bool ToggleButton(
const char * label,
bool & toggled,
bool invert,
ImVec2 size
)
bool ToggleButton(
const char * label,
bool & toggled,
bool invert,
ImVec2 size
)
function Tooltip
inline void Tooltip(
const char * header,
const char * description =nullptr
)
inline void Tooltip(
const char * header,
const char * description =nullptr
)
function TruncateText
std::string TruncateText(
const std::string & p_text,
float p_truncated_width
)
std::string TruncateText(
const std::string & p_text,
float p_truncated_width
)
Sourced from https://github.com/ocornut/imgui/issues/5267, credit to Gl1tchs.
Updated on 2025-05-31 at 12:55:31 +0000