mirror of
https://github.com/ocornut/imgui.git
synced 2025-02-08 23:19:40 +01:00
Data types: moved ImGuiDataType_String to public API as a convenience enum value only. (#8266)
This commit is contained in:
parent
f169102c8e
commit
80aafbc81b
3
imgui.h
3
imgui.h
@ -29,7 +29,7 @@
|
||||
// Library Version
|
||||
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
|
||||
#define IMGUI_VERSION "1.91.7 WIP"
|
||||
#define IMGUI_VERSION_NUM 19163
|
||||
#define IMGUI_VERSION_NUM 19164
|
||||
#define IMGUI_HAS_TABLE
|
||||
|
||||
/*
|
||||
@ -1399,6 +1399,7 @@ enum ImGuiDataType_
|
||||
ImGuiDataType_Float, // float
|
||||
ImGuiDataType_Double, // double
|
||||
ImGuiDataType_Bool, // bool (provided for user convenience, not supported by scalar widgets)
|
||||
ImGuiDataType_String, // char* (provided for user convenience, not supported by scalar widgets)
|
||||
ImGuiDataType_COUNT
|
||||
};
|
||||
|
||||
|
@ -827,8 +827,7 @@ struct ImGuiDataTypeInfo
|
||||
// Extend ImGuiDataType_
|
||||
enum ImGuiDataTypePrivate_
|
||||
{
|
||||
ImGuiDataType_String = ImGuiDataType_COUNT + 1,
|
||||
ImGuiDataType_Pointer,
|
||||
ImGuiDataType_Pointer = ImGuiDataType_COUNT + 1,
|
||||
ImGuiDataType_ID,
|
||||
};
|
||||
|
||||
|
@ -2171,6 +2171,7 @@ static const ImGuiDataTypeInfo GDataTypeInfo[] =
|
||||
{ sizeof(float), "float", "%.3f","%f" }, // ImGuiDataType_Float (float are promoted to double in va_arg)
|
||||
{ sizeof(double), "double","%f", "%lf" }, // ImGuiDataType_Double
|
||||
{ sizeof(bool), "bool", "%d", "%d" }, // ImGuiDataType_Bool
|
||||
{ 0, "char*","%s", "%s" }, // ImGuiDataType_String
|
||||
};
|
||||
IM_STATIC_ASSERT(IM_ARRAYSIZE(GDataTypeInfo) == ImGuiDataType_COUNT);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user