mirror of
https://github.com/ocornut/imgui.git
synced 2026-06-01 01:34:57 +08:00
Added ImGuiDataType_Bool for convenience.
This commit is contained in:
@@ -28,7 +28,7 @@
|
|||||||
// Library Version
|
// Library Version
|
||||||
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
|
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
|
||||||
#define IMGUI_VERSION "1.91.0 WIP"
|
#define IMGUI_VERSION "1.91.0 WIP"
|
||||||
#define IMGUI_VERSION_NUM 19093
|
#define IMGUI_VERSION_NUM 19094
|
||||||
#define IMGUI_HAS_TABLE
|
#define IMGUI_HAS_TABLE
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1336,6 +1336,7 @@ enum ImGuiDataType_
|
|||||||
ImGuiDataType_U64, // unsigned long long / unsigned __int64
|
ImGuiDataType_U64, // unsigned long long / unsigned __int64
|
||||||
ImGuiDataType_Float, // float
|
ImGuiDataType_Float, // float
|
||||||
ImGuiDataType_Double, // double
|
ImGuiDataType_Double, // double
|
||||||
|
ImGuiDataType_Bool, // bool (provided for user convenience, not supported by scalar widgets)
|
||||||
ImGuiDataType_COUNT
|
ImGuiDataType_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2131,6 +2131,7 @@ static const ImGuiDataTypeInfo GDataTypeInfo[] =
|
|||||||
#endif
|
#endif
|
||||||
{ sizeof(float), "float", "%.3f","%f" }, // ImGuiDataType_Float (float are promoted to double in va_arg)
|
{ sizeof(float), "float", "%.3f","%f" }, // ImGuiDataType_Float (float are promoted to double in va_arg)
|
||||||
{ sizeof(double), "double","%f", "%lf" }, // ImGuiDataType_Double
|
{ sizeof(double), "double","%f", "%lf" }, // ImGuiDataType_Double
|
||||||
|
{ sizeof(bool), "bool", "%d", "%d" }, // ImGuiDataType_Bool
|
||||||
};
|
};
|
||||||
IM_STATIC_ASSERT(IM_ARRAYSIZE(GDataTypeInfo) == ImGuiDataType_COUNT);
|
IM_STATIC_ASSERT(IM_ARRAYSIZE(GDataTypeInfo) == ImGuiDataType_COUNT);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user