mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-26 21:47:00 +00:00
Added GetStyleColorVec4()
This commit is contained in:
parent
cf84650ee8
commit
af2db53780
@ -1212,6 +1212,12 @@ ImU32 ImGui::GetColorU32(const ImVec4& col)
|
|||||||
return ColorConvertFloat4ToU32(c);
|
return ColorConvertFloat4ToU32(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const ImVec4& ImGui::GetStyleColorVec4(ImGuiCol idx)
|
||||||
|
{
|
||||||
|
ImGuiStyle& style = GImGui->Style;
|
||||||
|
return style.Colors[idx];
|
||||||
|
}
|
||||||
|
|
||||||
ImU32 ImGui::GetColorU32(ImU32 col)
|
ImU32 ImGui::GetColorU32(ImU32 col)
|
||||||
{
|
{
|
||||||
float style_alpha = GImGui->Style.Alpha;
|
float style_alpha = GImGui->Style.Alpha;
|
||||||
|
1
imgui.h
1
imgui.h
@ -186,6 +186,7 @@ namespace ImGui
|
|||||||
IMGUI_API void PushStyleVar(ImGuiStyleVar idx, float val);
|
IMGUI_API void PushStyleVar(ImGuiStyleVar idx, float val);
|
||||||
IMGUI_API void PushStyleVar(ImGuiStyleVar idx, const ImVec2& val);
|
IMGUI_API void PushStyleVar(ImGuiStyleVar idx, const ImVec2& val);
|
||||||
IMGUI_API void PopStyleVar(int count = 1);
|
IMGUI_API void PopStyleVar(int count = 1);
|
||||||
|
IMGUI_API const ImVec4& GetStyleColorVec4(ImGuiCol idx); // retrieve style color as stored in ImGuiStyle structure. use to feed back into PushStyleColor(), otherwhise use GetColorU32() to get style color + style alpha.
|
||||||
IMGUI_API ImFont* GetFont(); // get current font
|
IMGUI_API ImFont* GetFont(); // get current font
|
||||||
IMGUI_API float GetFontSize(); // get current font size (= height in pixels) of current font with current scale applied
|
IMGUI_API float GetFontSize(); // get current font size (= height in pixels) of current font with current scale applied
|
||||||
IMGUI_API ImVec2 GetFontTexUvWhitePixel(); // get UV coordinate for a while pixel, useful to draw custom shapes via the ImDrawList API
|
IMGUI_API ImVec2 GetFontTexUvWhitePixel(); // get UV coordinate for a while pixel, useful to draw custom shapes via the ImDrawList API
|
||||||
|
Loading…
Reference in New Issue
Block a user