Refactor internal SliderBehavior() to take flags instead of a bool.

Sorry!
This commit is contained in:
ocornut
2015-10-30 11:43:23 +01:00
parent 3eabad0321
commit 1a42a3f91b
2 changed files with 18 additions and 11 deletions

View File

@ -39,6 +39,7 @@ struct ImGuiWindow;
typedef int ImGuiLayoutType; // enum ImGuiLayoutType_
typedef int ImGuiButtonFlags; // enum ImGuiButtonFlags_
typedef int ImGuiTreeNodeFlags; // enum ImGuiTreeNodeFlags_
typedef int ImGuiSliderFlags; // enum ImGuiSliderFlags_
//-------------------------------------------------------------------------
// STB libraries
@ -158,6 +159,11 @@ enum ImGuiTreeNodeFlags_
ImGuiTreeNodeFlags_NoAutoExpandOnLog = 1 << 1
};
enum ImGuiSliderFlags_
{
ImGuiSliderFlags_Vertical = 1 << 0,
};
enum ImGuiSelectableFlagsPrivate_
{
// NB: need to be in sync with last value of ImGuiSelectableFlags_
@ -677,7 +683,7 @@ namespace ImGui
IMGUI_API bool ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool* out_held, ImGuiButtonFlags flags = 0);
IMGUI_API bool ButtonEx(const char* label, const ImVec2& size_arg = ImVec2(0,0), ImGuiButtonFlags flags = 0);
IMGUI_API bool SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_min, float v_max, float power, int decimal_precision, bool horizontal);
IMGUI_API bool SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_min, float v_max, float power, int decimal_precision, ImGuiSliderFlags flags = 0);
IMGUI_API bool SliderFloatN(const char* label, float* v, int components, float v_min, float v_max, const char* display_format, float power);
IMGUI_API bool SliderIntN(const char* label, int* v, int components, int v_min, int v_max, const char* display_format);