mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-14 17:07:01 +00:00
Added GetWindowHeight() for completeness + BeginGroup() comment.
This commit is contained in:
parent
822eaf1751
commit
8cf7df7ec4
@ -4353,6 +4353,12 @@ float ImGui::GetWindowWidth()
|
||||
return window->Size.x;
|
||||
}
|
||||
|
||||
float ImGui::GetWindowHeight()
|
||||
{
|
||||
ImGuiWindow* window = GImGui->CurrentWindow;
|
||||
return window->Size.y;
|
||||
}
|
||||
|
||||
ImVec2 ImGui::GetWindowPos()
|
||||
{
|
||||
ImGuiState& g = *GImGui;
|
||||
|
3
imgui.h
3
imgui.h
@ -131,6 +131,7 @@ namespace ImGui
|
||||
IMGUI_API ImVec2 GetWindowPos(); // get current window position in screen space (useful if you want to do your own drawing via the DrawList api)
|
||||
IMGUI_API ImVec2 GetWindowSize(); // get current window size
|
||||
IMGUI_API float GetWindowWidth();
|
||||
IMGUI_API float GetWindowHeight();
|
||||
IMGUI_API bool IsWindowCollapsed();
|
||||
|
||||
IMGUI_API void SetNextWindowPos(const ImVec2& pos, ImGuiSetCond cond = 0); // set next window position. call before Begin()
|
||||
@ -177,7 +178,7 @@ namespace ImGui
|
||||
IMGUI_API void PopButtonRepeat();
|
||||
|
||||
// Cursor / Layout
|
||||
IMGUI_API void BeginGroup(); // once closing a group it is seen as a single item (so you can use IsItemHovered() on a group, SameLine() between groups, etc.
|
||||
IMGUI_API void BeginGroup(); // lock horizontal starting position. once closing a group it is seen as a single item (so you can use IsItemHovered() on a group, SameLine() between groups, etc.
|
||||
IMGUI_API void EndGroup();
|
||||
IMGUI_API void Separator(); // horizontal line
|
||||
IMGUI_API void SameLine(float local_pos_x = 0.0f, float spacing_w = -1.0f); // call between widgets or groups to layout them horizontally
|
||||
|
Loading…
Reference in New Issue
Block a user