mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-24 00:26:36 +00:00
Removed old ValueColor() helpers. (#346)
This commit is contained in:
parent
fc5ab0cb8d
commit
fed18d3203
18
imgui.cpp
18
imgui.cpp
@ -159,7 +159,8 @@
|
||||
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.
|
||||
Also read releases logs https://github.com/ocornut/imgui/releases for more details.
|
||||
|
||||
- 2017/07/30 (1.51) - removed ColorEditMode() and ImGuiColorEditMode in favor of ImGuiColorEditFlags and parameters to the various Color*() functions. The SetColorEditOptions() allows to initialize default but the user can still change them with right-click context menu.
|
||||
- 2017/08/09 (1.51) - removed ValueColor() helpers, they are equivalent to calling Text(label) + SameLine() + ColorButton().
|
||||
- 2017/08/08 (1.51) - removed ColorEditMode() and ImGuiColorEditMode in favor of ImGuiColorEditFlags and parameters to the various Color*() functions. The SetColorEditOptions() allows to initialize default but the user can still change them with right-click context menu.
|
||||
- changed prototype of 'ColorEdit4(const char* label, float col[4], bool show_alpha = true)' to 'ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags = 0)', where passing flags = 0x01 is a safe no-op (hello dodgy backward compatibility!). - check and run the demo window, under "Color/Picker Widgets", to understand the various new options.
|
||||
- changed prototype of rarely used 'ColorButton(ImVec4 col, bool small_height = false, bool outline_border = true)' to 'ColorButton(const char* desc_id, ImVec4 col, ImGuiColorEditFlags flags = 0, ImVec2 size = ImVec2(0,0))'
|
||||
- 2017/07/20 (1.51) - removed IsPosHoveringAnyWindow(ImVec2), which was partly broken and misleading. ASSERT + redirect user to io.WantCaptureMouse
|
||||
@ -10243,21 +10244,6 @@ void ImGui::Value(const char* prefix, float v, const char* float_format)
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: May want to remove those helpers?
|
||||
void ImGui::ValueColor(const char* prefix, const ImVec4& v)
|
||||
{
|
||||
Text("%s: (%.2f,%.2f,%.2f,%.2f)", prefix, v.x, v.y, v.z, v.w);
|
||||
SameLine();
|
||||
ColorButton(prefix, v);
|
||||
}
|
||||
|
||||
void ImGui::ValueColor(const char* prefix, ImU32 v)
|
||||
{
|
||||
Text("%s: %08X", prefix, v);
|
||||
SameLine();
|
||||
ColorButton(prefix, ColorConvertU32ToFloat4(v));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// PLATFORM DEPENDENT HELPERS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
2
imgui.h
2
imgui.h
@ -363,8 +363,6 @@ namespace ImGui
|
||||
IMGUI_API void Value(const char* prefix, int v);
|
||||
IMGUI_API void Value(const char* prefix, unsigned int v);
|
||||
IMGUI_API void Value(const char* prefix, float v, const char* float_format = NULL);
|
||||
IMGUI_API void ValueColor(const char* prefix, const ImVec4& v);
|
||||
IMGUI_API void ValueColor(const char* prefix, ImU32 v);
|
||||
|
||||
// Tooltips
|
||||
IMGUI_API void SetTooltip(const char* fmt, ...) IM_PRINTFARGS(1); // set text tooltip under mouse-cursor, typically use with ImGui::IsItemHovered(). overidde any previous call to SetTooltip().
|
||||
|
Loading…
Reference in New Issue
Block a user