mirror of
https://github.com/ocornut/imgui.git
synced 2024-12-01 02:37:24 +01:00
Renamed style.TreeNodeSpacing to style.IndentSpacing, ImGuiStyleVar_TreeNodeSpacing to ImGuiStyleVar_IndentSpacing
This commit is contained in:
parent
304d19a0d8
commit
edde703f8f
15
imgui.cpp
15
imgui.cpp
@ -129,6 +129,7 @@
|
|||||||
Occasionally introducing changes that are breaking the API. The breakage are generally minor and easy to fix.
|
Occasionally introducing changes that are breaking the API. The breakage are generally minor and easy to fix.
|
||||||
Here is a change-log of API breaking changes, if you are using one of the functions listed, expect to have to fix some code.
|
Here is a change-log of API breaking changes, if you are using one of the functions listed, expect to have to fix some code.
|
||||||
|
|
||||||
|
- 2015/03/15 (1.36) - renamed style.TreeNodeSpacing to style.IndentSpacing, ImGuiStyleVar_TreeNodeSpacing to ImGuiStyleVar_IndentSpacing
|
||||||
- 2015/03/13 (1.36) - renamed GetWindowIsFocused() to IsWindowFocused(). Kept inline redirection function.
|
- 2015/03/13 (1.36) - renamed GetWindowIsFocused() to IsWindowFocused(). Kept inline redirection function.
|
||||||
- 2015/03/08 (1.35) - renamed style.ScrollBarWidth to style.ScrollbarWidth
|
- 2015/03/08 (1.35) - renamed style.ScrollBarWidth to style.ScrollbarWidth
|
||||||
- 2015/02/27 (1.34) - renamed OpenNextNode(bool) to SetNextTreeNodeOpened(bool, ImGuiSetCond). Kept inline redirection function.
|
- 2015/02/27 (1.34) - renamed OpenNextNode(bool) to SetNextTreeNodeOpened(bool, ImGuiSetCond). Kept inline redirection function.
|
||||||
@ -506,7 +507,7 @@ ImGuiStyle::ImGuiStyle()
|
|||||||
TouchExtraPadding = ImVec2(0,0); // Expand bounding box for touch-based system where touch position is not accurate enough (unnecessary for mouse inputs). Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget running. So dont grow this too much!
|
TouchExtraPadding = ImVec2(0,0); // Expand bounding box for touch-based system where touch position is not accurate enough (unnecessary for mouse inputs). Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget running. So dont grow this too much!
|
||||||
AutoFitPadding = ImVec2(8,8); // Extra space after auto-fit (double-clicking on resize grip)
|
AutoFitPadding = ImVec2(8,8); // Extra space after auto-fit (double-clicking on resize grip)
|
||||||
WindowFillAlphaDefault = 0.70f; // Default alpha of window background, if not specified in ImGui::Begin()
|
WindowFillAlphaDefault = 0.70f; // Default alpha of window background, if not specified in ImGui::Begin()
|
||||||
TreeNodeSpacing = 22.0f; // Horizontal spacing when entering a tree node
|
IndentSpacing = 22.0f; // Horizontal spacing when e.g. entering a tree node
|
||||||
ColumnsMinSpacing = 6.0f; // Minimum horizontal spacing between two columns
|
ColumnsMinSpacing = 6.0f; // Minimum horizontal spacing between two columns
|
||||||
ScrollbarWidth = 16.0f; // Width of the vertical scrollbar
|
ScrollbarWidth = 16.0f; // Width of the vertical scrollbar
|
||||||
GrabMinSize = 10.0f; // Minimum width/height of a slider or scrollbar grab
|
GrabMinSize = 10.0f; // Minimum width/height of a slider or scrollbar grab
|
||||||
@ -3383,7 +3384,7 @@ static float* GetStyleVarFloatAddr(ImGuiStyleVar idx)
|
|||||||
case ImGuiStyleVar_WindowRounding: return &g.Style.WindowRounding;
|
case ImGuiStyleVar_WindowRounding: return &g.Style.WindowRounding;
|
||||||
case ImGuiStyleVar_ChildWindowRounding: return &g.Style.ChildWindowRounding;
|
case ImGuiStyleVar_ChildWindowRounding: return &g.Style.ChildWindowRounding;
|
||||||
case ImGuiStyleVar_FrameRounding: return &g.Style.FrameRounding;
|
case ImGuiStyleVar_FrameRounding: return &g.Style.FrameRounding;
|
||||||
case ImGuiStyleVar_TreeNodeSpacing: return &g.Style.TreeNodeSpacing;
|
case ImGuiStyleVar_IndentSpacing: return &g.Style.IndentSpacing;
|
||||||
case ImGuiStyleVar_GrabMinSize: return &g.Style.GrabMinSize;
|
case ImGuiStyleVar_GrabMinSize: return &g.Style.GrabMinSize;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -4542,7 +4543,7 @@ bool ImGui::TreeNodeV(const char* str_id, const char* fmt, va_list args)
|
|||||||
str_id = fmt;
|
str_id = fmt;
|
||||||
|
|
||||||
ImGui::PushID(str_id);
|
ImGui::PushID(str_id);
|
||||||
const bool opened = ImGui::CollapsingHeader(buf, "", false); // do not add to the ID so that TreeNodeSetOpen can access
|
const bool opened = ImGui::CollapsingHeader(buf, "", false);
|
||||||
ImGui::PopID();
|
ImGui::PopID();
|
||||||
|
|
||||||
if (opened)
|
if (opened)
|
||||||
@ -6894,7 +6895,7 @@ void ImGui::TreePush(const char* str_id)
|
|||||||
{
|
{
|
||||||
ImGuiState& g = *GImGui;
|
ImGuiState& g = *GImGui;
|
||||||
ImGuiWindow* window = GetCurrentWindow();
|
ImGuiWindow* window = GetCurrentWindow();
|
||||||
window->DC.ColumnsStartX += g.Style.TreeNodeSpacing;
|
window->DC.ColumnsStartX += g.Style.IndentSpacing;
|
||||||
window->DC.CursorPos.x = window->Pos.x + window->DC.ColumnsStartX + window->DC.ColumnsOffsetX;
|
window->DC.CursorPos.x = window->Pos.x + window->DC.ColumnsStartX + window->DC.ColumnsOffsetX;
|
||||||
window->DC.TreeDepth++;
|
window->DC.TreeDepth++;
|
||||||
PushID(str_id ? str_id : "#TreePush");
|
PushID(str_id ? str_id : "#TreePush");
|
||||||
@ -6904,7 +6905,7 @@ void ImGui::TreePush(const void* ptr_id)
|
|||||||
{
|
{
|
||||||
ImGuiState& g = *GImGui;
|
ImGuiState& g = *GImGui;
|
||||||
ImGuiWindow* window = GetCurrentWindow();
|
ImGuiWindow* window = GetCurrentWindow();
|
||||||
window->DC.ColumnsStartX += g.Style.TreeNodeSpacing;
|
window->DC.ColumnsStartX += g.Style.IndentSpacing;
|
||||||
window->DC.CursorPos.x = window->Pos.x + window->DC.ColumnsStartX + window->DC.ColumnsOffsetX;
|
window->DC.CursorPos.x = window->Pos.x + window->DC.ColumnsStartX + window->DC.ColumnsOffsetX;
|
||||||
window->DC.TreeDepth++;
|
window->DC.TreeDepth++;
|
||||||
PushID(ptr_id ? ptr_id : (const void*)"#TreePush");
|
PushID(ptr_id ? ptr_id : (const void*)"#TreePush");
|
||||||
@ -6914,7 +6915,7 @@ void ImGui::TreePop()
|
|||||||
{
|
{
|
||||||
ImGuiState& g = *GImGui;
|
ImGuiState& g = *GImGui;
|
||||||
ImGuiWindow* window = GetCurrentWindow();
|
ImGuiWindow* window = GetCurrentWindow();
|
||||||
window->DC.ColumnsStartX -= g.Style.TreeNodeSpacing;
|
window->DC.ColumnsStartX -= g.Style.IndentSpacing;
|
||||||
window->DC.CursorPos.x = window->Pos.x + window->DC.ColumnsStartX + window->DC.ColumnsOffsetX;
|
window->DC.CursorPos.x = window->Pos.x + window->DC.ColumnsStartX + window->DC.ColumnsOffsetX;
|
||||||
window->DC.TreeDepth--;
|
window->DC.TreeDepth--;
|
||||||
PopID();
|
PopID();
|
||||||
@ -8585,7 +8586,7 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref)
|
|||||||
ImGui::SliderFloat2("ItemSpacing", (float*)&style.ItemSpacing, 0.0f, 20.0f, "%.0f");
|
ImGui::SliderFloat2("ItemSpacing", (float*)&style.ItemSpacing, 0.0f, 20.0f, "%.0f");
|
||||||
ImGui::SliderFloat2("ItemInnerSpacing", (float*)&style.ItemInnerSpacing, 0.0f, 20.0f, "%.0f");
|
ImGui::SliderFloat2("ItemInnerSpacing", (float*)&style.ItemInnerSpacing, 0.0f, 20.0f, "%.0f");
|
||||||
ImGui::SliderFloat2("TouchExtraPadding", (float*)&style.TouchExtraPadding, 0.0f, 10.0f, "%.0f");
|
ImGui::SliderFloat2("TouchExtraPadding", (float*)&style.TouchExtraPadding, 0.0f, 10.0f, "%.0f");
|
||||||
ImGui::SliderFloat("TreeNodeSpacing", &style.TreeNodeSpacing, 0.0f, 20.0f, "%.0f");
|
ImGui::SliderFloat("IndentSpacing", &style.IndentSpacing, 0.0f, 20.0f, "%.0f");
|
||||||
ImGui::SliderFloat("ScrollBarWidth", &style.ScrollbarWidth, 1.0f, 20.0f, "%.0f");
|
ImGui::SliderFloat("ScrollBarWidth", &style.ScrollbarWidth, 1.0f, 20.0f, "%.0f");
|
||||||
ImGui::SliderFloat("GrabMinSize", &style.GrabMinSize, 1.0f, 20.0f, "%.0f");
|
ImGui::SliderFloat("GrabMinSize", &style.GrabMinSize, 1.0f, 20.0f, "%.0f");
|
||||||
ImGui::TreePop();
|
ImGui::TreePop();
|
||||||
|
4
imgui.h
4
imgui.h
@ -503,7 +503,7 @@ enum ImGuiStyleVar_
|
|||||||
ImGuiStyleVar_FrameRounding, // float
|
ImGuiStyleVar_FrameRounding, // float
|
||||||
ImGuiStyleVar_ItemSpacing, // ImVec2
|
ImGuiStyleVar_ItemSpacing, // ImVec2
|
||||||
ImGuiStyleVar_ItemInnerSpacing, // ImVec2
|
ImGuiStyleVar_ItemInnerSpacing, // ImVec2
|
||||||
ImGuiStyleVar_TreeNodeSpacing, // float
|
ImGuiStyleVar_IndentSpacing, // float
|
||||||
ImGuiStyleVar_GrabMinSize // float
|
ImGuiStyleVar_GrabMinSize // float
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -540,7 +540,7 @@ struct ImGuiStyle
|
|||||||
ImVec2 TouchExtraPadding; // Expand bounding box for touch-based system where touch position is not accurate enough (unnecessary for mouse inputs). Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget running. So dont grow this too much!
|
ImVec2 TouchExtraPadding; // Expand bounding box for touch-based system where touch position is not accurate enough (unnecessary for mouse inputs). Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget running. So dont grow this too much!
|
||||||
ImVec2 AutoFitPadding; // Extra space after auto-fit (double-clicking on resize grip)
|
ImVec2 AutoFitPadding; // Extra space after auto-fit (double-clicking on resize grip)
|
||||||
float WindowFillAlphaDefault; // Default alpha of window background, if not specified in ImGui::Begin()
|
float WindowFillAlphaDefault; // Default alpha of window background, if not specified in ImGui::Begin()
|
||||||
float TreeNodeSpacing; // Horizontal spacing when entering a tree node
|
float IndentSpacing; // Horizontal indentation when e.g. entering a tree node
|
||||||
float ColumnsMinSpacing; // Minimum horizontal spacing between two columns
|
float ColumnsMinSpacing; // Minimum horizontal spacing between two columns
|
||||||
float ScrollbarWidth; // Width of the vertical scrollbar
|
float ScrollbarWidth; // Width of the vertical scrollbar
|
||||||
float GrabMinSize; // Minimum width/height of a slider or scrollbar grab
|
float GrabMinSize; // Minimum width/height of a slider or scrollbar grab
|
||||||
|
Loading…
Reference in New Issue
Block a user