mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 03:58:47 +02:00
imgui-test: Added extra item info callbacks. Using nav_bb for interactions when possible. Comments, Demo tweaks.
This commit is contained in:
10
imgui.cpp
10
imgui.cpp
@ -1278,6 +1278,7 @@ ImVec2 ImTriangleClosestPoint(const ImVec2& a, const ImVec2& b, const ImVec2& c,
|
||||
return proj_ca;
|
||||
}
|
||||
|
||||
// Consider using _stricmp/_strnicmp under Windows or strcasecmp/strncasecmp. We don't actually use either ImStricmp/ImStrnicmp in the codebase any more.
|
||||
int ImStricmp(const char* str1, const char* str2)
|
||||
{
|
||||
int d;
|
||||
@ -1294,10 +1295,11 @@ int ImStrnicmp(const char* str1, const char* str2, size_t count)
|
||||
|
||||
void ImStrncpy(char* dst, const char* src, size_t count)
|
||||
{
|
||||
if (count < 1) return;
|
||||
if (count < 1)
|
||||
return;
|
||||
if (count > 1)
|
||||
strncpy(dst, src, count-1);
|
||||
dst[count-1] = 0;
|
||||
strncpy(dst, src, count - 1);
|
||||
dst[count - 1] = 0;
|
||||
}
|
||||
|
||||
char* ImStrdup(const char* str)
|
||||
@ -2796,7 +2798,7 @@ bool ImGui::ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb_arg)
|
||||
|
||||
#ifdef IMGUI_ENABLE_TEST_ENGINE
|
||||
if (id != 0)
|
||||
ImGuiTestEngineHook_ItemAdd(&g, bb, id);
|
||||
ImGuiTestEngineHook_ItemAdd(&g, nav_bb_arg ? *nav_bb_arg : bb, id);
|
||||
#endif
|
||||
|
||||
// Clipping test
|
||||
|
Reference in New Issue
Block a user