mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-22 11:57:00 +00:00
Added IMGUI_DISABLE_STB_SPRINTF_IMPLEMENTATION config macro to disable stb_sprintf implementation (#6626)
This commit is contained in:
parent
1109de3827
commit
f1781c20a3
@ -83,6 +83,8 @@ Other changes:
|
|||||||
- IO: Changed io.ClearInputsKeys() specs to also clear current frame character buffer
|
- IO: Changed io.ClearInputsKeys() specs to also clear current frame character buffer
|
||||||
(what now obsoleted io.ClearInputCharacters() did), as this is effectively the
|
(what now obsoleted io.ClearInputCharacters() did), as this is effectively the
|
||||||
desirable behavior.
|
desirable behavior.
|
||||||
|
- Misc: Added IMGUI_DISABLE_STB_SPRINTF_IMPLEMENTATION config macro to disable
|
||||||
|
stb_sprintf implementation when using IMGUI_USE_STB_SPRINTF. (#6626) [@septag]
|
||||||
- Demo: Better showcase use of SetNextItemAllowOverlap(). (#6574, #6512, #3909, #517)
|
- Demo: Better showcase use of SetNextItemAllowOverlap(). (#6574, #6512, #3909, #517)
|
||||||
- Demo: Showcase a few more InputText() flags.
|
- Demo: Showcase a few more InputText() flags.
|
||||||
- Backends: Made all backends sources files support global IMGUI_DISABLE. (#6601)
|
- Backends: Made all backends sources files support global IMGUI_DISABLE. (#6601)
|
||||||
|
@ -62,9 +62,10 @@
|
|||||||
// By default the embedded implementations are declared static and not available outside of Dear ImGui sources files.
|
// By default the embedded implementations are declared static and not available outside of Dear ImGui sources files.
|
||||||
//#define IMGUI_STB_TRUETYPE_FILENAME "my_folder/stb_truetype.h"
|
//#define IMGUI_STB_TRUETYPE_FILENAME "my_folder/stb_truetype.h"
|
||||||
//#define IMGUI_STB_RECT_PACK_FILENAME "my_folder/stb_rect_pack.h"
|
//#define IMGUI_STB_RECT_PACK_FILENAME "my_folder/stb_rect_pack.h"
|
||||||
//#define IMGUI_STB_SPRINTF_FILENAME "my_folder/stb_sprintf.h" // only used if enabled
|
//#define IMGUI_STB_SPRINTF_FILENAME "my_folder/stb_sprintf.h" // only used if IMGUI_USE_STB_SPRINTF is defined.
|
||||||
//#define IMGUI_DISABLE_STB_TRUETYPE_IMPLEMENTATION
|
//#define IMGUI_DISABLE_STB_TRUETYPE_IMPLEMENTATION
|
||||||
//#define IMGUI_DISABLE_STB_RECT_PACK_IMPLEMENTATION
|
//#define IMGUI_DISABLE_STB_RECT_PACK_IMPLEMENTATION
|
||||||
|
//#define IMGUI_DISABLE_STB_SPRINTF_IMPLEMENTATION // only disabled if IMGUI_USE_STB_SPRINTF is defined.
|
||||||
|
|
||||||
//---- Use stb_sprintf.h for a faster implementation of vsnprintf instead of the one from libc (unless IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS is defined)
|
//---- Use stb_sprintf.h for a faster implementation of vsnprintf instead of the one from libc (unless IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS is defined)
|
||||||
// Compatibility checks of arguments and formats done by clang and GCC will be disabled in order to support the extra formats provided by stb_sprintf.h.
|
// Compatibility checks of arguments and formats done by clang and GCC will be disabled in order to support the extra formats provided by stb_sprintf.h.
|
||||||
|
@ -1858,13 +1858,15 @@ const char* ImStrSkipBlank(const char* str)
|
|||||||
// and setup the wrapper yourself. (FIXME-OPT: Some of our high-level operations such as ImGuiTextBuffer::appendfv() are
|
// and setup the wrapper yourself. (FIXME-OPT: Some of our high-level operations such as ImGuiTextBuffer::appendfv() are
|
||||||
// designed using two-passes worst case, which probably could be improved using the stbsp_vsprintfcb() function.)
|
// designed using two-passes worst case, which probably could be improved using the stbsp_vsprintfcb() function.)
|
||||||
#ifdef IMGUI_USE_STB_SPRINTF
|
#ifdef IMGUI_USE_STB_SPRINTF
|
||||||
|
#ifndef IMGUI_DISABLE_STB_SPRINTF_IMPLEMENTATION
|
||||||
#define STB_SPRINTF_IMPLEMENTATION
|
#define STB_SPRINTF_IMPLEMENTATION
|
||||||
|
#endif
|
||||||
#ifdef IMGUI_STB_SPRINTF_FILENAME
|
#ifdef IMGUI_STB_SPRINTF_FILENAME
|
||||||
#include IMGUI_STB_SPRINTF_FILENAME
|
#include IMGUI_STB_SPRINTF_FILENAME
|
||||||
#else
|
#else
|
||||||
#include "stb_sprintf.h"
|
#include "stb_sprintf.h"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif // #ifdef IMGUI_USE_STB_SPRINTF
|
||||||
|
|
||||||
#if defined(_MSC_VER) && !defined(vsnprintf)
|
#if defined(_MSC_VER) && !defined(vsnprintf)
|
||||||
#define vsnprintf _vsnprintf
|
#define vsnprintf _vsnprintf
|
||||||
|
Loading…
Reference in New Issue
Block a user