|
28 | 28 |
|
29 | 29 | //---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to avoid using soon-to-be obsolete function/names.
|
30 | 30 | //#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
| 31 | +//#define IMGUI_DISABLE_OBSOLETE_KEYIO // 1.87: disable legacy io.KeyMap[]+io.KeysDown[] in favor io.AddKeyEvent(). This will be folded into IMGUI_DISABLE_OBSOLETE_FUNCTIONS in a few versions. |
31 | 32 |
|
32 |
| -//---- Disable all of Dear ImGui or don't implement standard windows. |
33 |
| -// It is very strongly recommended to NOT disable the demo windows during development. Please read comments in imgui_demo.cpp. |
| 33 | +//---- Disable all of Dear ImGui or don't implement standard windows/tools. |
| 34 | +// It is very strongly recommended to NOT disable the demo windows and debug tool during development. They are extremely useful in day to day work. Please read comments in imgui_demo.cpp. |
34 | 35 | //#define IMGUI_DISABLE // Disable everything: all headers and source files will be empty.
|
35 |
| -//#define IMGUI_DISABLE_DEMO_WINDOWS // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty. Not recommended. |
36 |
| -//#define IMGUI_DISABLE_METRICS_WINDOW // Disable metrics/debugger window: ShowMetricsWindow() will be empty. |
| 36 | +//#define IMGUI_DISABLE_DEMO_WINDOWS // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty. |
| 37 | +//#define IMGUI_DISABLE_DEBUG_TOOLS // Disable metrics/debugger and other debug tools: ShowMetricsWindow(), ShowDebugLogWindow() and ShowStackToolWindow() will be empty (this was called IMGUI_DISABLE_METRICS_WINDOW before 1.88). |
37 | 38 |
|
38 | 39 | //---- Don't implement some functions to reduce linkage requirements.
|
39 | 40 | //#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc. (user32.lib/.a, kernel32.lib/.a)
|
|
61 | 62 | // By default the embedded implementations are declared static and not available outside of Dear ImGui sources files.
|
62 | 63 | //#define IMGUI_STB_TRUETYPE_FILENAME "my_folder/stb_truetype.h"
|
63 | 64 | //#define IMGUI_STB_RECT_PACK_FILENAME "my_folder/stb_rect_pack.h"
|
| 65 | +//#define IMGUI_STB_SPRINTF_FILENAME "my_folder/stb_sprintf.h" // only used if enabled |
64 | 66 | //#define IMGUI_DISABLE_STB_TRUETYPE_IMPLEMENTATION
|
65 | 67 | //#define IMGUI_DISABLE_STB_RECT_PACK_IMPLEMENTATION
|
66 | 68 |
|
67 |
| -//---- Use stb_printf's faster implementation of vsnprintf instead of the one from libc (unless IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS is defined) |
68 |
| -// Requires 'stb_sprintf.h' to be available in the include path. 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. |
69 |
| -// #define IMGUI_USE_STB_SPRINTF |
| 69 | +//---- Use stb_sprintf.h for a faster implementation of vsnprintf instead of the one from libc (unless IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS is defined) |
| 70 | +// 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. |
| 71 | +//#define IMGUI_USE_STB_SPRINTF |
70 | 72 |
|
71 | 73 | //---- Use FreeType to build and rasterize the font atlas (instead of stb_truetype which is embedded by default in Dear ImGui)
|
72 | 74 | // Requires FreeType headers to be available in the include path. Requires program to be compiled with 'misc/freetype/imgui_freetype.cpp' (in this repository) + the FreeType library (not provided).
|
|
80 | 82 | //---- Define constructor and implicit cast operators to convert back<>forth between your math types and ImVec2/ImVec4.
|
81 | 83 | // This will be inlined as part of ImVec2 and ImVec4 class declarations.
|
82 | 84 | /*
|
83 |
| -#define IM_VEC2_CLASS_EXTRA \ |
84 |
| - ImVec2(const MyVec2& f) { x = f.x; y = f.y; } \ |
| 85 | +#define IM_VEC2_CLASS_EXTRA \ |
| 86 | + constexpr ImVec2(const MyVec2& f) : x(f.x), y(f.y) {} \ |
85 | 87 | operator MyVec2() const { return MyVec2(x,y); }
|
86 | 88 |
|
87 |
| -#define IM_VEC4_CLASS_EXTRA \ |
88 |
| - ImVec4(const MyVec4& f) { x = f.x; y = f.y; z = f.z; w = f.w; } \ |
| 89 | +#define IM_VEC4_CLASS_EXTRA \ |
| 90 | + constexpr ImVec4(const MyVec4& f) : x(f.x), y(f.y), z(f.z), w(f.w) {} \ |
89 | 91 | operator MyVec4() const { return MyVec4(x,y,z,w); }
|
90 | 92 | */
|
91 | 93 |
|
|
106 | 108 | //#define IM_DEBUG_BREAK IM_ASSERT(0)
|
107 | 109 | //#define IM_DEBUG_BREAK __debugbreak()
|
108 | 110 |
|
109 |
| -//---- Debug Tools: Have the Item Picker break in the ItemAdd() function instead of ItemHoverable(), |
110 |
| -// (which comes earlier in the code, will catch a few extra items, allow picking items other than Hovered one.) |
111 |
| -// This adds a small runtime cost which is why it is not enabled by default. |
112 |
| -//#define IMGUI_DEBUG_TOOL_ITEM_PICKER_EX |
113 |
| - |
114 | 111 | //---- Debug Tools: Enable slower asserts
|
115 | 112 | //#define IMGUI_DEBUG_PARANOID
|
116 | 113 |
|
|
0 commit comments