mirror of
https://github.com/ocornut/imgui.git
synced 2024-12-03 21:59:15 +08:00
GetStyleColorName -> GetStyleColName for consistency with type name. Removed ImGuiStyleVar_ColumnsMinSpacing
This commit is contained in:
parent
39952d2362
commit
886d954e3d
@ -348,13 +348,13 @@ ImGuiStyle::ImGuiStyle()
|
||||
Alpha = 1.0f; // Global alpha applies to everything in ImGui
|
||||
WindowPadding = ImVec2(8,8); // Padding within a window
|
||||
WindowMinSize = ImVec2(48,48); // Minimum window size
|
||||
WindowRounding = 10.0f; // Radius of window corners rounding. Set to 0.0f to have rectangular windows
|
||||
FramePadding = ImVec2(5,4); // Padding within a framed rectangle (used by most widgets)
|
||||
ItemSpacing = ImVec2(10,5); // Horizontal and vertical spacing between widgets/lines
|
||||
ItemInnerSpacing = ImVec2(5,5); // Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its label)
|
||||
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)
|
||||
WindowFillAlphaDefault = 0.70f; // Default alpha of window background, if not specified in ImGui::Begin()
|
||||
WindowRounding = 10.0f; // Radius of window corners rounding. Set to 0.0f to have rectangular windows
|
||||
TreeNodeSpacing = 22.0f; // Horizontal spacing when entering a tree node
|
||||
ColumnsMinSpacing = 6.0f; // Minimum horizontal spacing between two columns
|
||||
ScrollBarWidth = 16.0f; // Width of the vertical scroll bar
|
||||
@ -2758,7 +2758,6 @@ static float* GetStyleVarFloatAddr(ImGuiStyleVar idx)
|
||||
case ImGuiStyleVar_Alpha: return &g.Style.Alpha;
|
||||
case ImGuiStyleVar_WindowRounding: return &g.Style.WindowRounding;
|
||||
case ImGuiStyleVar_TreeNodeSpacing: return &g.Style.TreeNodeSpacing;
|
||||
case ImGuiStyleVar_ColumnsMinSpacing: return &g.Style.ColumnsMinSpacing;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@ -2819,7 +2818,7 @@ void ImGui::PopStyleVar(int count)
|
||||
}
|
||||
}
|
||||
|
||||
const char* ImGui::GetStyleColorName(ImGuiCol idx)
|
||||
const char* ImGui::GetStyleColName(ImGuiCol idx)
|
||||
{
|
||||
// Create switch-case from enum with regexp: ImGuiCol_{.*}, --> case ImGuiCol_\1: return "\1";
|
||||
switch (idx)
|
||||
@ -6719,7 +6718,7 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref)
|
||||
ImGui::ColorEditMode(edit_mode);
|
||||
for (int i = 0; i < ImGuiCol_COUNT; i++)
|
||||
{
|
||||
const char* name = GetStyleColorName(i);
|
||||
const char* name = ImGui::GetStyleColName(i);
|
||||
if (!filter.PassFilter(name))
|
||||
continue;
|
||||
ImGui::PushID(i);
|
||||
|
9
imgui.h
9
imgui.h
@ -280,11 +280,11 @@ namespace ImGui
|
||||
IMGUI_API void Color(const char* prefix, const ImVec4& v);
|
||||
IMGUI_API void Color(const char* prefix, unsigned int v);
|
||||
|
||||
// Logging: All text output can be redirected to tty/file/clipboard. Tree nodes are automatically opened.
|
||||
// Logging: All text output from your interface are redirected to tty/file/clipboard. Tree nodes are automatically opened.
|
||||
IMGUI_API void LogToTTY(int max_depth = -1); // start logging to tty
|
||||
IMGUI_API void LogToFile(int max_depth = -1, const char* filename = NULL); // start logging to file
|
||||
IMGUI_API void LogToClipboard(int max_depth = -1); // start logging to OS clipboard
|
||||
IMGUI_API void LogFinish(); // stop logging (close file, etc.)
|
||||
IMGUI_API void LogFinish(); // stop logging (close file, etc.)
|
||||
IMGUI_API void LogButtons(); // helper to display buttons for logging to tty/file/clipboard
|
||||
|
||||
// Utilities
|
||||
@ -303,7 +303,7 @@ namespace ImGui
|
||||
IMGUI_API ImVec2 GetMousePos(); // shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls
|
||||
IMGUI_API float GetTime();
|
||||
IMGUI_API int GetFrameCount();
|
||||
IMGUI_API const char* GetStyleColorName(ImGuiCol idx);
|
||||
IMGUI_API const char* GetStyleColName(ImGuiCol idx);
|
||||
IMGUI_API void GetDefaultFontData(const void** fnt_data, unsigned int* fnt_size, const void** png_data, unsigned int* png_size);
|
||||
IMGUI_API ImVec2 CalcTextSize(const char* text, const char* text_end = NULL, bool hide_text_after_double_hash = false, float wrap_width = -1.0f);
|
||||
|
||||
@ -419,7 +419,6 @@ enum ImGuiStyleVar_
|
||||
ImGuiStyleVar_ItemSpacing, // ImVec2
|
||||
ImGuiStyleVar_ItemInnerSpacing, // ImVec2
|
||||
ImGuiStyleVar_TreeNodeSpacing, // float
|
||||
ImGuiStyleVar_ColumnsMinSpacing // float
|
||||
};
|
||||
|
||||
// Enumeration for ColorEditMode()
|
||||
@ -445,13 +444,13 @@ struct ImGuiStyle
|
||||
float Alpha; // Global alpha applies to everything in ImGui
|
||||
ImVec2 WindowPadding; // Padding within a window
|
||||
ImVec2 WindowMinSize; // Minimum window size
|
||||
float WindowRounding; // Radius of window corners rounding. Set to 0.0f to have rectangular windows
|
||||
ImVec2 FramePadding; // Padding within a framed rectangle (used by most widgets)
|
||||
ImVec2 ItemSpacing; // Horizontal and vertical spacing between widgets/lines
|
||||
ImVec2 ItemInnerSpacing; // Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its label)
|
||||
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)
|
||||
float WindowFillAlphaDefault; // Default alpha of window background, if not specified in ImGui::Begin()
|
||||
float WindowRounding; // Radius of window corners rounding. Set to 0.0f to have rectangular windows
|
||||
float TreeNodeSpacing; // Horizontal spacing when entering a tree node
|
||||
float ColumnsMinSpacing; // Minimum horizontal spacing between two columns
|
||||
float ScrollBarWidth; // Width of the vertical scroll bar
|
||||
|
Loading…
Reference in New Issue
Block a user