You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dep/imgui/include/imconfig.h
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,8 @@
15
15
#pragma once
16
16
17
17
//---- Define assertion handler. Defaults to calling assert().
18
-
// If your macro uses multiple statements, make sure is enclosed in a 'do { .. } while (0)' block so it can be used as a single statement.
18
+
// - If your macro uses multiple statements, make sure is enclosed in a 'do { .. } while (0)' block so it can be used as a single statement.
19
+
// - Compiling with NDEBUG will usually strip out assert() to nothing, which is NOT recommended because we use asserts to notify of programmer mistakes.
//---- Use FreeType to build and rasterize the font atlas (instead of stb_truetype which is embedded by default in Dear ImGui)
85
86
// 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).
87
+
// Note that imgui_freetype.cpp may be used _without_ this define, if you manually call ImFontAtlas::SetFontLoader(). The define is simply a convenience.
86
88
// On Windows you may use vcpkg with 'vcpkg install freetype --triplet=x64-windows' + 'vcpkg integrate install'.
87
89
#defineIMGUI_ENABLE_FREETYPE
88
90
@@ -129,6 +131,10 @@
129
131
//#define IM_DEBUG_BREAK IM_ASSERT(0)
130
132
//#define IM_DEBUG_BREAK __debugbreak()
131
133
134
+
//---- Debug Tools: Enable highlight ID conflicts _before_ hovering items. When io.ConfigDebugHighlightIdConflicts is set.
135
+
// (THIS WILL SLOW DOWN DEAR IMGUI. Only use occasionally and disable after use)
// - Add '#define IMGUI_ENABLE_FREETYPE_PLUTOSVG' to use plutosvg (not provided). See #7927.
@@ -62,7 +62,7 @@ namespace ImGuiFreeType
62
62
{
63
63
// This is automatically assigned when using '#define IMGUI_ENABLE_FREETYPE'.
64
64
// If you need to dynamically select between multiple builders:
65
-
// - you can manually assign this builder with 'atlas->FontLoader = ImGuiFreeType::GetFontLoader()'
65
+
// - you can manually assign this builder with 'atlas->SetFontLoader(ImGuiFreeType::GetFontLoader())'
66
66
// - prefer deep-copying this into your own ImFontLoader instance if you use hot-reloading that messes up static data.
67
67
IMGUI_API const ImFontLoader* GetFontLoader();
68
68
@@ -75,7 +75,7 @@ namespace ImGuiFreeType
75
75
76
76
// Obsolete names (will be removed)
77
77
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
78
-
//IMGUI_API const ImFontBuilderIO* GetBuilderForFreeType(); // Renamed/changed in 1.92. Change 'io.Fonts->FontBuilderIO = ImGuiFreeType::GetBuilderForFreeType()' to 'io.Fonts.FontLoader = ImGuiFreeType::GetFontLoader()' if you need runtime selection.
78
+
//IMGUI_API const ImFontBuilderIO* GetBuilderForFreeType(); // Renamed/changed in 1.92. Change 'io.Fonts->FontBuilderIO = ImGuiFreeType::GetBuilderForFreeType()' to 'io.Fonts->SetFontLoader(ImGuiFreeType::GetFontLoader())' if you need runtime selection.
Copy file name to clipboardExpand all lines: dep/imgui/include/imstb_textedit.h
+75-36Lines changed: 75 additions & 36 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,8 @@
5
5
// - Fix in stb_textedit_find_charpos to handle last line (see https://github.com/ocornut/imgui/issues/6000 + #6783)
6
6
// - Added name to struct or it may be forward declared in our code.
7
7
// - Added UTF-8 support (see https://github.com/nothings/stb/issues/188 + https://github.com/ocornut/imgui/pull/7925)
8
-
// Grep for [DEAR IMGUI] to find the changes.
8
+
// - Changed STB_TEXTEDIT_INSERTCHARS() to return inserted count (instead of 0/1 bool), allowing partial insertion.
9
+
// Grep for [DEAR IMGUI] to find some changes.
9
10
// - Also renamed macros used or defined outside of IMSTB_TEXTEDIT_IMPLEMENTATION block from STB_TEXTEDIT_* to IMSTB_TEXTEDIT_*
10
11
11
12
// stb_textedit.h - v1.14 - public domain - Sean Barrett
@@ -39,6 +40,7 @@
39
40
//
40
41
// VERSION HISTORY
41
42
//
43
+
// !!!! (2025-10-23) changed STB_TEXTEDIT_INSERTCHARS() to return inserted count (instead of 0/1 bool), allowing partial insertion.
42
44
// 1.14 (2021-07-11) page up/down, various fixes
43
45
// 1.13 (2019-02-07) fix bug in undo size management
44
46
// 1.12 (2018-01-29) user can change STB_TEXTEDIT_KEYTYPE, fix redo to avoid crash
@@ -147,7 +149,8 @@
147
149
// as manually wordwrapping for end-of-line positioning
148
150
//
149
151
// STB_TEXTEDIT_DELETECHARS(obj,i,n) delete n characters starting at i
150
-
// STB_TEXTEDIT_INSERTCHARS(obj,i,c*,n) insert n characters at i (pointed to by STB_TEXTEDIT_CHARTYPE*)
152
+
// STB_TEXTEDIT_INSERTCHARS(obj,i,c*,n) try to insert n characters at i (pointed to by STB_TEXTEDIT_CHARTYPE*)
153
+
// returns number of characters actually inserted. [DEAR IMGUI]
151
154
//
152
155
// STB_TEXTEDIT_K_SHIFT a power of two that is or'd in to a keyboard input to represent the shift key
153
156
//
@@ -181,10 +184,10 @@
181
184
//
182
185
// To support UTF-8:
183
186
//
184
-
// STB_TEXTEDIT_GETPREVCHARINDEX returns index of previous character
185
-
// STB_TEXTEDIT_GETNEXTCHARINDEX returns index of next character
187
+
// STB_TEXTEDIT_GETPREVCHARINDEX returns index of previous character
188
+
// STB_TEXTEDIT_GETNEXTCHARINDEX returns index of next character
186
189
// Do NOT define STB_TEXTEDIT_KEYTOTEXT.
187
-
// Instead, call stb_textedit_text() directly for text contents.
190
+
// Instead, call stb_textedit_text() directly for text contents.
188
191
//
189
192
// Keyboard input must be encoded as a single integer value; e.g. a character code
190
193
// and some bitflags that represent shift states. to simplify the interface, SHIFT must
@@ -260,7 +263,7 @@
260
263
//
261
264
// text: (added 2025)
262
265
// call this to directly send text input the textfield, which is required
263
-
// for UTF-8 support, because stb_textedit_key() + STB_TEXTEDIT_KEYTOTEXT()
266
+
// for UTF-8 support, because stb_textedit_key() + STB_TEXTEDIT_KEYTOTEXT()
264
267
// cannot infer text length.
265
268
//
266
269
//
@@ -427,7 +430,7 @@ typedef struct
427
430
//
428
431
429
432
// traverse the layout to locate the nearest character to a display position
if (str->LastMoveDirectionLR==ImGuiDir_Right&&str->Stb->cursor>0&&str->Stb->cursor==i+r.num_chars&&STB_TEXTEDIT_GETCHAR(str, i+r.num_chars-1) !=STB_TEXTEDIT_NEWLINE) // [DEAR IMGUI] Wrapping point handling
589
+
break;
575
590
if (i+r.num_chars==z&&z>0&&STB_TEXTEDIT_GETCHAR(str, z-1) !=STB_TEXTEDIT_NEWLINE) // [DEAR IMGUI] special handling for last line
0 commit comments