mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-26 13:37:00 +00:00
Removed TreeAdvanceToLabelPos() which is rarely used and only does SetCursorPosX(GetCursorPosX() + GetTreeNodeToLabelSpacing()). Kept redirection function (will obsolete). (#581, #324)
This commit is contained in:
parent
3d07c7cbe4
commit
a35f42f123
@ -41,6 +41,8 @@ Breaking Changes:
|
|||||||
If you were still using the old names, read "API Breaking Changes" section of imgui.cpp to find out
|
If you were still using the old names, read "API Breaking Changes" section of imgui.cpp to find out
|
||||||
the new names or equivalent features.
|
the new names or equivalent features.
|
||||||
- Renamed ImFontAtlas::CustomRect to ImFontAtlasCustomRect. Kept redirection typedef (will obsolete).
|
- Renamed ImFontAtlas::CustomRect to ImFontAtlasCustomRect. Kept redirection typedef (will obsolete).
|
||||||
|
- Removed TreeAdvanceToLabelPos() which is rarely used and only does SetCursorPosX(GetCursorPosX() + GetTreeNodeToLabelSpacing()).
|
||||||
|
Kept redirection function (will obsolete). (#581, #324)
|
||||||
|
|
||||||
Other Changes:
|
Other Changes:
|
||||||
- Window: Fixed InnerClipRect right-most coordinates using wrong padding setting (introduced in 1.71).
|
- Window: Fixed InnerClipRect right-most coordinates using wrong padding setting (introduced in 1.71).
|
||||||
|
@ -369,6 +369,7 @@ CODE
|
|||||||
When you are not sure about a old symbol or function name, try using the Search/Find function of your IDE to look for comments or references in all imgui files.
|
When you are not sure about a old symbol or function name, try using the Search/Find function of your IDE to look for comments or references in all imgui files.
|
||||||
You can read releases logs https://github.com/ocornut/imgui/releases for more details.
|
You can read releases logs https://github.com/ocornut/imgui/releases for more details.
|
||||||
|
|
||||||
|
- 2019/07/15 (1.72) - removed TreeAdvanceToLabelPos() which is rarely used and only does SetCursorPosX(GetCursorPosX() + GetTreeNodeToLabelSpacing()). Kept redirection function (will obsolete).
|
||||||
- 2019/07/12 (1.72) - renamed ImFontAtlas::CustomRect to ImFontAtlasCustomRect. Kept redirection typedef (will obsolete).
|
- 2019/07/12 (1.72) - renamed ImFontAtlas::CustomRect to ImFontAtlasCustomRect. Kept redirection typedef (will obsolete).
|
||||||
- 2019/06/14 (1.72) - removed redirecting functions/enums names that were marked obsolete in 1.51 (June 2017): ImGuiCol_Column*, ImGuiSetCond_*, IsItemHoveredRect(), IsPosHoveringAnyWindow(), IsMouseHoveringAnyWindow(), IsMouseHoveringWindow(), IMGUI_ONCE_UPON_A_FRAME. Grep this log for details and new names.
|
- 2019/06/14 (1.72) - removed redirecting functions/enums names that were marked obsolete in 1.51 (June 2017): ImGuiCol_Column*, ImGuiSetCond_*, IsItemHoveredRect(), IsPosHoveringAnyWindow(), IsMouseHoveringAnyWindow(), IsMouseHoveringWindow(), IMGUI_ONCE_UPON_A_FRAME. Grep this log for details and new names.
|
||||||
- 2019/06/07 (1.71) - rendering of child window outer decorations (bg color, border, scrollbars) is now performed as part of the parent window. If you have
|
- 2019/06/07 (1.71) - rendering of child window outer decorations (bg color, border, scrollbars) is now performed as part of the parent window. If you have
|
||||||
|
3
imgui.h
3
imgui.h
@ -496,7 +496,6 @@ namespace ImGui
|
|||||||
IMGUI_API void TreePush(const char* str_id); // ~ Indent()+PushId(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired.
|
IMGUI_API void TreePush(const char* str_id); // ~ Indent()+PushId(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired.
|
||||||
IMGUI_API void TreePush(const void* ptr_id = NULL); // "
|
IMGUI_API void TreePush(const void* ptr_id = NULL); // "
|
||||||
IMGUI_API void TreePop(); // ~ Unindent()+PopId()
|
IMGUI_API void TreePop(); // ~ Unindent()+PopId()
|
||||||
IMGUI_API void TreeAdvanceToLabelPos(); // advance cursor x position by GetTreeNodeToLabelSpacing()
|
|
||||||
IMGUI_API float GetTreeNodeToLabelSpacing(); // horizontal distance preceding label when using TreeNode*() or Bullet() == (g.FontSize + style.FramePadding.x*2) for a regular unframed TreeNode
|
IMGUI_API float GetTreeNodeToLabelSpacing(); // horizontal distance preceding label when using TreeNode*() or Bullet() == (g.FontSize + style.FramePadding.x*2) for a regular unframed TreeNode
|
||||||
IMGUI_API bool CollapsingHeader(const char* label, ImGuiTreeNodeFlags flags = 0); // if returning 'true' the header is open. doesn't indent nor push on ID stack. user doesn't have to call TreePop().
|
IMGUI_API bool CollapsingHeader(const char* label, ImGuiTreeNodeFlags flags = 0); // if returning 'true' the header is open. doesn't indent nor push on ID stack. user doesn't have to call TreePop().
|
||||||
IMGUI_API bool CollapsingHeader(const char* label, bool* p_open, ImGuiTreeNodeFlags flags = 0); // when 'p_open' isn't NULL, display an additional small close button on upper right of the header
|
IMGUI_API bool CollapsingHeader(const char* label, bool* p_open, ImGuiTreeNodeFlags flags = 0); // when 'p_open' isn't NULL, display an additional small close button on upper right of the header
|
||||||
@ -1531,6 +1530,8 @@ struct ImGuiPayload
|
|||||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||||
namespace ImGui
|
namespace ImGui
|
||||||
{
|
{
|
||||||
|
// OBSOLETED in 1.72 (from July 2019)
|
||||||
|
static inline void TreeAdvanceToLabelPos() { SetCursorPosX(GetCursorPosX() + GetTreeNodeToLabelSpacing()); }
|
||||||
// OBSOLETED in 1.71 (from June 2019)
|
// OBSOLETED in 1.71 (from June 2019)
|
||||||
static inline void SetNextTreeNodeOpen(bool open, ImGuiCond cond = 0) { SetNextItemOpen(open, cond); }
|
static inline void SetNextTreeNodeOpen(bool open, ImGuiCond cond = 0) { SetNextItemOpen(open, cond); }
|
||||||
// OBSOLETED in 1.70 (from May 2019)
|
// OBSOLETED in 1.70 (from May 2019)
|
||||||
|
@ -628,7 +628,7 @@ static void ShowDemoWindowWidgets()
|
|||||||
{
|
{
|
||||||
// Items 3..5 are Tree Leaves
|
// Items 3..5 are Tree Leaves
|
||||||
// The only reason we use TreeNode at all is to allow selection of the leaf.
|
// The only reason we use TreeNode at all is to allow selection of the leaf.
|
||||||
// Otherwise we can use BulletText() or TreeAdvanceToLabelPos()+Text().
|
// Otherwise we can use BulletText() or advance the cursor by GetTreeNodeToLabelSpacing() and call Text().
|
||||||
node_flags |= ImGuiTreeNodeFlags_Leaf | ImGuiTreeNodeFlags_NoTreePushOnOpen; // ImGuiTreeNodeFlags_Bullet
|
node_flags |= ImGuiTreeNodeFlags_Leaf | ImGuiTreeNodeFlags_NoTreePushOnOpen; // ImGuiTreeNodeFlags_Bullet
|
||||||
ImGui::TreeNodeEx((void*)(intptr_t)i, node_flags, "Selectable Leaf %d", i);
|
ImGui::TreeNodeEx((void*)(intptr_t)i, node_flags, "Selectable Leaf %d", i);
|
||||||
if (ImGui::IsItemClicked())
|
if (ImGui::IsItemClicked())
|
||||||
|
@ -4990,7 +4990,6 @@ void ImGui::ColorPickerOptionsPopup(const float* ref_col, ImGuiColorEditFlags fl
|
|||||||
// - TreeNodeBehavior() [Internal]
|
// - TreeNodeBehavior() [Internal]
|
||||||
// - TreePush()
|
// - TreePush()
|
||||||
// - TreePop()
|
// - TreePop()
|
||||||
// - TreeAdvanceToLabelPos()
|
|
||||||
// - GetTreeNodeToLabelSpacing()
|
// - GetTreeNodeToLabelSpacing()
|
||||||
// - SetNextItemOpen()
|
// - SetNextItemOpen()
|
||||||
// - CollapsingHeader()
|
// - CollapsingHeader()
|
||||||
@ -5332,12 +5331,6 @@ void ImGui::TreePop()
|
|||||||
PopID();
|
PopID();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImGui::TreeAdvanceToLabelPos()
|
|
||||||
{
|
|
||||||
ImGuiContext& g = *GImGui;
|
|
||||||
g.CurrentWindow->DC.CursorPos.x += GetTreeNodeToLabelSpacing();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Horizontal distance preceding label when using TreeNode() or Bullet()
|
// Horizontal distance preceding label when using TreeNode() or Bullet()
|
||||||
float ImGui::GetTreeNodeToLabelSpacing()
|
float ImGui::GetTreeNodeToLabelSpacing()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user