From 83efdcec8d564f9750220a7b5cf034d96b56c834 Mon Sep 17 00:00:00 2001 From: Rokas Kupstys Date: Mon, 3 Feb 2020 10:29:08 +0200 Subject: [PATCH 1/5] Canceling text input with [esc] key uses stb_textedit facilities to restore original value. This makes restoration undoable using hotkeys. Fixes #3008. --- docs/CHANGELOG.txt | 1 + imgui_widgets.cpp | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 099f8f08..9a60ef28 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -76,6 +76,7 @@ Other Changes: those improvements in 1.73 makes them unnecessary. (#2722, #2770). [@rokups] - ColorEdit: "Copy As" context-menu tool shows hex values with a '#' prefix instead of '0x'. - ColorEdit: "Copy As" content-menu tool shows hex values both with/without alpha when available. +- InputText: Fix crash when executing undo action after clearing input with ESC (#3008). [@rokups] - MenuBar: Fix minor clipping issue where occasionally a menu text can overlap the right-most border. - Window: Fix SetNextWindowBgAlpha(1.0f) failing to override alpha component. (#3007) [@Albog] - Window: When testing for the presence of the ImGuiWindowFlags_NoBringToFrontOnFocus flag we diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index a5aa86b1..777530bf 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -3828,6 +3828,25 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ { apply_new_text = state->InitialTextA.Data; apply_new_text_length = state->InitialTextA.Size - 1; + + // Select all text + state->OnKeyPressed(STB_TEXTEDIT_K_TEXTSTART); + state->OnKeyPressed(STB_TEXTEDIT_K_TEXTEND | STB_TEXTEDIT_K_SHIFT); + + // Paste converted text or empty buffer + if (state->InitialTextA.size() > 1) + { + ImVector w_text; + const char* apply_new_text_end = apply_new_text + apply_new_text_length + 1; + w_text.resize(ImTextCountCharsFromUtf8(apply_new_text, apply_new_text_end)); + ImTextStrFromUtf8(w_text.Data, w_text.Size, apply_new_text, apply_new_text_end); + ImStb::stb_textedit_paste(state, &state->Stb, w_text.Data, w_text.Size); + } + else + { + ImWchar empty = 0; + ImStb::stb_textedit_paste(state, &state->Stb, &empty, 0); + } } } From bdbb2b21f5643089329e314fa64e92767f89d709 Mon Sep 17 00:00:00 2001 From: omar Date: Mon, 3 Feb 2020 16:37:54 +0100 Subject: [PATCH 2/5] Fix 83efdcec from overflowing buffer + make it a single undo records + comments (#3008) --- docs/CHANGELOG.txt | 3 ++- imgui_widgets.cpp | 40 +++++++++++++++++++++++----------------- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 9a60ef28..1970a63b 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -76,7 +76,8 @@ Other Changes: those improvements in 1.73 makes them unnecessary. (#2722, #2770). [@rokups] - ColorEdit: "Copy As" context-menu tool shows hex values with a '#' prefix instead of '0x'. - ColorEdit: "Copy As" content-menu tool shows hex values both with/without alpha when available. -- InputText: Fix crash when executing undo action after clearing input with ESC (#3008). [@rokups] +- InputText: Fix corruption or crash when executing undo after clearing input with ESC, as a + byproduct we are allowing to later undo the revert with a CTRL+Z. (#3008). - MenuBar: Fix minor clipping issue where occasionally a menu text can overlap the right-most border. - Window: Fix SetNextWindowBgAlpha(1.0f) failing to override alpha component. (#3007) [@Albog] - Window: When testing for the presence of the ImGuiWindowFlags_NoBringToFrontOnFocus flag we diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index 777530bf..67bba187 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -3271,8 +3271,25 @@ static bool STB_TEXTEDIT_INSERTCHARS(STB_TEXTEDIT_STRING* obj, int pos, const Im #define STB_TEXTEDIT_IMPLEMENTATION #include "imstb_textedit.h" +// stb_textedit internally allows for a single undo record to do addition and deletion, but somehow, calling +// the stb_textedit_paste() function creates two separate records, so we perform it manually. (FIXME: Report to nothings/stb?) +static void stb_textedit_replace(STB_TEXTEDIT_STRING* str, STB_TexteditState* state, const STB_TEXTEDIT_CHARTYPE* text, int text_len) +{ + stb_text_makeundo_replace(str, state, 0, str->CurLenW, text_len); + ImStb::STB_TEXTEDIT_DELETECHARS(str, 0, str->CurLenW); + if (text_len <= 0) + return; + if (ImStb::STB_TEXTEDIT_INSERTCHARS(str, 0, text, text_len)) + { + state->cursor = text_len; + state->has_preferred_x = 0; + return; + } + IM_ASSERT(0); // Failed to insert character, normally shouldn't happen because of how we currently use stb_textedit_replace() } +} // namespace ImStb + void ImGuiInputTextState::OnKeyPressed(int key) { stb_textedit_key(this, &Stb, key); @@ -3826,27 +3843,16 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ // Restore initial value. Only return true if restoring to the initial value changes the current buffer contents. if (!is_readonly && strcmp(buf, state->InitialTextA.Data) != 0) { + // Push records into the undo stack so we can CTRL+Z the revert operation itself apply_new_text = state->InitialTextA.Data; apply_new_text_length = state->InitialTextA.Size - 1; - - // Select all text - state->OnKeyPressed(STB_TEXTEDIT_K_TEXTSTART); - state->OnKeyPressed(STB_TEXTEDIT_K_TEXTEND | STB_TEXTEDIT_K_SHIFT); - - // Paste converted text or empty buffer - if (state->InitialTextA.size() > 1) + ImVector w_text; + if (apply_new_text_length > 0) { - ImVector w_text; - const char* apply_new_text_end = apply_new_text + apply_new_text_length + 1; - w_text.resize(ImTextCountCharsFromUtf8(apply_new_text, apply_new_text_end)); - ImTextStrFromUtf8(w_text.Data, w_text.Size, apply_new_text, apply_new_text_end); - ImStb::stb_textedit_paste(state, &state->Stb, w_text.Data, w_text.Size); - } - else - { - ImWchar empty = 0; - ImStb::stb_textedit_paste(state, &state->Stb, &empty, 0); + w_text.resize(ImTextCountCharsFromUtf8(apply_new_text, apply_new_text + apply_new_text_length) + 1); + ImTextStrFromUtf8(w_text.Data, w_text.Size, apply_new_text, apply_new_text + apply_new_text_length); } + stb_textedit_replace(state, &state->Stb, w_text.Data, (apply_new_text_length > 0) ? (w_text.Size - 1) : 0); } } From f694244dec94ca67666d767fd5be59faf74686b9 Mon Sep 17 00:00:00 2001 From: omar Date: Tue, 4 Feb 2020 15:19:49 +0100 Subject: [PATCH 3/5] InputText: Fix using a combination of _CallbackResize + _EnterReturnsTrue + lack of persisting user storage. (#3009) Amend 24ff25981 (#2006, #1443, #1008) --- docs/CHANGELOG.txt | 4 ++++ imgui_widgets.cpp | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 1970a63b..8ea4737f 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -78,6 +78,10 @@ Other Changes: - ColorEdit: "Copy As" content-menu tool shows hex values both with/without alpha when available. - InputText: Fix corruption or crash when executing undo after clearing input with ESC, as a byproduct we are allowing to later undo the revert with a CTRL+Z. (#3008). +- InputText: Fix using a combination of _CallbackResize (e.g. for std::string binding), along with the + _EnterReturnsTrue flag along with the rarely used property of using an InputText without persisting + user-side storage. Previously if you had e.g. a local unsaved std::string and reading result back + from the widget, the user string object wouldn't be resized when Enter key was pressed. (#3009) - MenuBar: Fix minor clipping issue where occasionally a menu text can overlap the right-most border. - Window: Fix SetNextWindowBgAlpha(1.0f) failing to override alpha component. (#3007) [@Albog] - Window: When testing for the presence of the ImGuiWindowFlags_NoBringToFrontOnFocus flag we diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index 67bba187..5faa31b2 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -3857,7 +3857,8 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ } // When using 'ImGuiInputTextFlags_EnterReturnsTrue' as a special case we reapply the live buffer back to the input buffer before clearing ActiveId, even though strictly speaking it wasn't modified on this frame. - // If we didn't do that, code like InputInt() with ImGuiInputTextFlags_EnterReturnsTrue would fail. Also this allows the user to use InputText() with ImGuiInputTextFlags_EnterReturnsTrue without maintaining any user-side storage. + // If we didn't do that, code like InputInt() with ImGuiInputTextFlags_EnterReturnsTrue would fail. + // This also allows the user to use InputText() with ImGuiInputTextFlags_EnterReturnsTrue without maintaining any user-side storage (please note that if you use this property along ImGuiInputTextFlags_CallbackResize you can end up with your temporary string object unnecessarily allocating once a frame, either store your string data, either if you don't then don't use ImGuiInputTextFlags_CallbackResize). bool apply_edit_back_to_user_buffer = !cancel_edit || (enter_pressed && (flags & ImGuiInputTextFlags_EnterReturnsTrue) != 0); if (apply_edit_back_to_user_buffer) { @@ -3951,8 +3952,11 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ // Copy result to user buffer if (apply_new_text) { + // We cannot test for 'backup_current_text_length != apply_new_text_length' here because we have no guarantee that the size + // of our owned buffer matches the size of the string object held by the user, and by design we allow InputText() to be used + // without any storage on user's side. IM_ASSERT(apply_new_text_length >= 0); - if (backup_current_text_length != apply_new_text_length && is_resizable) + if (is_resizable) { ImGuiInputTextCallbackData callback_data; callback_data.EventFlag = ImGuiInputTextFlags_CallbackResize; @@ -3967,6 +3971,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ apply_new_text_length = ImMin(callback_data.BufTextLen, buf_size - 1); IM_ASSERT(apply_new_text_length <= buf_size); } + //IMGUI_DEBUG_LOG("InputText(\"%s\"): apply_new_text length %d\n", label, apply_new_text_length); // If the underlying buffer resize was denied or not carried to the next frame, apply_new_text_length+1 may be >= buf_size. ImStrncpy(buf, apply_new_text, ImMin(apply_new_text_length + 1, buf_size)); From d37d25470af52d9d2d83ce887e1a50cab9882416 Mon Sep 17 00:00:00 2001 From: omar Date: Sun, 9 Feb 2020 17:06:58 +0100 Subject: [PATCH 4/5] Added IMGUI_DISABLE compile-time definition to make all headers and sources empty. --- docs/CHANGELOG.txt | 1 + docs/TODO.txt | 1 + imconfig.h | 10 ++++++---- imgui.cpp | 4 ++++ imgui.h | 4 ++++ imgui_demo.cpp | 4 ++++ imgui_draw.cpp | 4 ++++ imgui_internal.h | 3 +++ imgui_widgets.cpp | 4 ++++ 9 files changed, 31 insertions(+), 4 deletions(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 8ea4737f..fb8c0fc5 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -95,6 +95,7 @@ Other Changes: - Columns: ImDrawList::Channels* functions now work inside columns. Added extra comments to suggest using user-owned ImDrawListSplitter instead of ImDrawList functions. [@rokups] - Misc: Added ImGuiMouseCursor_NotAllowed enum so it can be used by more shared widgets. [@rokups] +- Misc: Added IMGUI_DISABLE compile-time definition to make all headers and sources empty. - Misc: Disable format checks when using stb_printf, to allow using extra formats. Made IMGUI_USE_STB_SPRINTF a properly documented imconfig.h flag. (#2954) [@loicmolinari] - Misc: Added misc/single_file/imgui_single_file.h, We use this to validate compiling all *.cpp diff --git a/docs/TODO.txt b/docs/TODO.txt index f0d5c90b..9f102d7f 100644 --- a/docs/TODO.txt +++ b/docs/TODO.txt @@ -80,6 +80,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i - input text: clean up the mess caused by converting UTF-8 <> wchar. the code is rather inefficient right now and super fragile. - input text: reorganize event handling, allow CharFilter to modify buffers, allow multiple events? (#541) - input text: expose CursorPos in char filter event (#816) + - input text: try usage idiom of using InputText with data only exposed through get/set accessors, without extraneous copy/alloc. (#3009) - input text: access public fields via a non-callback API e.g. InputTextGetState("xxx") that may return NULL if not active. - input text: flag to disable live update of the user buffer (also applies to float/int text input) (#701) - input text: hover tooltip could show unclamped text diff --git a/imconfig.h b/imconfig.h index 6724e40f..09bfd16c 100644 --- a/imconfig.h +++ b/imconfig.h @@ -14,6 +14,7 @@ #pragma once //---- Define assertion handler. Defaults to calling assert(). +// 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. //#define IM_ASSERT(_EXPR) MyAssert(_EXPR) //#define IM_ASSERT(_EXPR) ((void)(_EXPR)) // Disable asserts @@ -25,10 +26,11 @@ //---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to avoid using soon-to-be obsolete function/names. //#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS -//---- Don't implement demo windows functionality (ShowDemoWindow()/ShowStyleEditor()/ShowUserGuide() methods will be empty) -// It is very strongly recommended to NOT disable the demo windows during development. Please read the comments in imgui_demo.cpp. -//#define IMGUI_DISABLE_DEMO_WINDOWS -//#define IMGUI_DISABLE_METRICS_WINDOW +//---- Disable all of Dear ImGui or don't implement standard windows. +// It is very strongly recommended to NOT disable the demo windows during development. Please read comments in imgui_demo.cpp. +//#define IMGUI_DISABLE // Disable everything: all headers and source files will be empty. +//#define IMGUI_DISABLE_DEMO_WINDOWS // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty. Not recommended. +//#define IMGUI_DISABLE_METRICS_WINDOW // Disable debug/metrics window: ShowMetricsWindow() will be empty. //---- Don't implement some functions to reduce linkage requirements. //#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc. diff --git a/imgui.cpp b/imgui.cpp index 4f2993b4..d1bf2639 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -791,6 +791,8 @@ CODE #endif #include "imgui.h" +#ifndef IMGUI_DISABLE + #ifndef IMGUI_DEFINE_MATH_OPERATORS #define IMGUI_DEFINE_MATH_OPERATORS #endif @@ -10282,3 +10284,5 @@ void ImGui::ShowMetricsWindow(bool*) { } #endif //----------------------------------------------------------------------------- + +#endif // #ifndef IMGUI_DISABLE diff --git a/imgui.h b/imgui.h index 4cbe196e..75a4578b 100644 --- a/imgui.h +++ b/imgui.h @@ -45,6 +45,8 @@ Index of this file: #include "imconfig.h" #endif +#ifndef IMGUI_DISABLE + //----------------------------------------------------------------------------- // Header mess //----------------------------------------------------------------------------- @@ -2275,3 +2277,5 @@ struct ImFont #ifdef IMGUI_INCLUDE_IMGUI_USER_H #include "imgui_user.h" #endif + +#endif // #ifndef IMGUI_DISABLE diff --git a/imgui_demo.cpp b/imgui_demo.cpp index 54b3a9f6..6fef81c4 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -65,6 +65,8 @@ Index of this file: #endif #include "imgui.h" +#ifndef IMGUI_DISABLE + #include // toupper #include // INT_MIN, INT_MAX #include // sqrtf, powf, cosf, sinf, floorf, ceilf @@ -4866,3 +4868,5 @@ void ImGui::ShowUserGuide() {} void ImGui::ShowStyleEditor(ImGuiStyle*) {} #endif + +#endif // #ifndef IMGUI_DISABLE diff --git a/imgui_draw.cpp b/imgui_draw.cpp index b457b532..41a7aff8 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -27,6 +27,8 @@ Index of this file: #endif #include "imgui.h" +#ifndef IMGUI_DISABLE + #ifndef IMGUI_DEFINE_MATH_OPERATORS #define IMGUI_DEFINE_MATH_OPERATORS #endif @@ -3458,3 +3460,5 @@ static const char* GetDefaultCompressedFontDataTTFBase85() { return proggy_clean_ttf_compressed_data_base85; } + +#endif // #ifndef IMGUI_DISABLE diff --git a/imgui_internal.h b/imgui_internal.h index 85dcce20..47af16fb 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -22,6 +22,7 @@ Index of this file: */ #pragma once +#ifndef IMGUI_DISABLE //----------------------------------------------------------------------------- // Header mess @@ -1912,3 +1913,5 @@ extern void ImGuiTestEngineHook_Log(ImGuiContext* ctx, const cha #ifdef _MSC_VER #pragma warning (pop) #endif + +#endif // #ifndef IMGUI_DISABLE diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index 5faa31b2..c5509601 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -33,6 +33,8 @@ Index of this file: #endif #include "imgui.h" +#ifndef IMGUI_DISABLE + #ifndef IMGUI_DEFINE_MATH_OPERATORS #define IMGUI_DEFINE_MATH_OPERATORS #endif @@ -7704,3 +7706,5 @@ void ImGui::Columns(int columns_count, const char* id, bool border) } //------------------------------------------------------------------------- + +#endif // #ifndef IMGUI_DISABLE From 58b3e02b95b4c7c5bb9128a28c6d55546501bf93 Mon Sep 17 00:00:00 2001 From: omar Date: Sun, 9 Feb 2020 17:36:00 +0100 Subject: [PATCH 5/5] Version 1.75 Comments --- .github/issue_template.md | 14 +++++++------- docs/CHANGELOG.txt | 10 ++++++---- docs/README.md | 1 + examples/README.txt | 2 +- imgui.cpp | 2 +- imgui.h | 6 +++--- imgui_demo.cpp | 2 +- imgui_draw.cpp | 4 ++-- imgui_internal.h | 2 +- imgui_widgets.cpp | 2 +- 10 files changed, 24 insertions(+), 21 deletions(-) diff --git a/.github/issue_template.md b/.github/issue_template.md index e2c30e07..3812ad0b 100644 --- a/.github/issue_template.md +++ b/.github/issue_template.md @@ -1,16 +1,16 @@ -(Click "Preview" to turn any http URL into a clickable link) +(Click "Preview" above ^ to turn URL into clickable links) 1. PLEASE CAREFULLY READ: [FAQ](https://github.com/ocornut/imgui/blob/master/docs/FAQ.md) -2. PLEASE CAREFULLY READ: https://github.com/ocornut/imgui/issues/2261 +2. PLEASE CAREFULLY READ: [Issue Submitting Guidelines](https://github.com/ocornut/imgui/issues/2261) -2. FOR FIRST-TIME USERS ISSUES COMPILING/LINKING/RUNNING/LOADING FONTS, please use the [Discord server](http://discord.dearimgui.org). +3. FOR FIRST-TIME USERS ISSUES COMPILING/LINKING/RUNNING/LOADING FONTS, please use the [Discord server](http://discord.dearimgui.org). -3. PLEASE MAKE SURE that you have: read the FAQ; explored the contents of `ShowDemoWindow()` including the Examples menu; searched among Issues; used your IDE to search for keywords in all sources and text files; and read the link provided in (1) (2). +4. PLEASE MAKE SURE that you have: read the FAQ; explored the contents of `ShowDemoWindow()` including the Examples menu; searched among Issues; used your IDE to search for keywords in all sources and text files; and read the link provided in (1) (2). -4. Be mindful that messages are being sent to the e-mail box of "Watching" users. Try to proof-read your messages before sending them. Edits are not seen by those users. +5. Be mindful that messages are being sent to the e-mail box of "Watching" users. Try to proof-read your messages before sending them. Edits are not seen by those users. -5. Delete points 1-6 and PLEASE FILL THE TEMPLATE BELOW before submitting your issue. +6. Delete points 1-6 and PLEASE FILL THE TEMPLATE BELOW before submitting your issue. Thank you! @@ -39,7 +39,7 @@ XXX _(you can drag files here)_ **Standalone, minimal, complete and verifiable example:** _(see https://github.com/ocornut/imgui/issues/2261)_ ``` -// Please do not forget this! +// Here's some code anyone can copy and paste to reproduce your issue ImGui::Begin("Example Bug"); MoreCodeToExplainMyIssue(); ImGui::End(); diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index fb8c0fc5..736cb447 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -31,9 +31,11 @@ HOW TO UPDATE? ----------------------------------------------------------------------- - VERSION 1.75 WIP (In Progress) + VERSION 1.75 (Released 2020-02-10) ----------------------------------------------------------------------- +Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.75 + Breaking Changes: - Removed redirecting functions/enums names that were marked obsolete in 1.53 (December 2017): @@ -55,14 +57,14 @@ Breaking Changes: documented and rarely if ever used). Instead we added an explicit PrimUnreserve() API which can be implemented faster. Also clarified pre-existing constraints which weren't documented (can only unreserve from the last reserve call). If you suspect you ever - used that feature before, #define IMGUI_DEBUG_PARANOID in imconfig.h to catch existing - calls. [@ShironekoBen] + used that feature before (very unlikely, but grep for call to PrimReserve in your code), + you can #define IMGUI_DEBUG_PARANOID in imconfig.h to catch existing calls. [@ShironekoBen] - ImDrawList::AddCircle()/AddCircleFilled() functions don't accept negative radius. - Limiting Columns()/BeginColumns() api to 64 columns with an assert. While the current code technically supports it, future code may not so we're putting the restriction ahead. - imgui_internal.h: changed ImRect() default constructor initializes all fields to 0.0f instead of (FLT_MAX,FLT_MAX,-FLT_MAX,-FLT_MAX). If you used ImRect::Add() to create bounding boxes by - adding multiple points into it, you may need to fix your initial value. + adding points into it without explicit initialization, you may need to fix your initial value. Other Changes: diff --git a/docs/README.md b/docs/README.md index 37952f06..cc1ac39e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -193,6 +193,7 @@ Ongoing Dear ImGui development is financially supported by users and private spo - Blizzard Entertainment - Google - Ubisoft +- Nvidia *Double-chocolate sponsors* - Media Molecule, Mobigame, Aras Pranckevičius, Greggman, DotEmu, Nadeo, Supercell, Aiden Koss, Kylotonn. diff --git a/examples/README.txt b/examples/README.txt index 5f45fad9..5bd16be4 100644 --- a/examples/README.txt +++ b/examples/README.txt @@ -1,5 +1,5 @@ ----------------------------------------------------------------------- - dear imgui, v1.75 WIP + dear imgui, v1.75 ----------------------------------------------------------------------- examples/README.txt (This is the README file for the examples/ folder. See docs/ for more documentation) diff --git a/imgui.cpp b/imgui.cpp index d1bf2639..1b78dd83 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -1,4 +1,4 @@ -// dear imgui, v1.75 WIP +// dear imgui, v1.75 // (main code and documentation) // Help: diff --git a/imgui.h b/imgui.h index 75a4578b..c2bbb7f7 100644 --- a/imgui.h +++ b/imgui.h @@ -1,4 +1,4 @@ -// dear imgui, v1.75 WIP +// dear imgui, v1.75 // (headers) // Help: @@ -59,8 +59,8 @@ Index of this file: // Version // (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens) -#define IMGUI_VERSION "1.75 WIP" -#define IMGUI_VERSION_NUM 17401 +#define IMGUI_VERSION "1.75" +#define IMGUI_VERSION_NUM 17500 #define IMGUI_CHECKVERSION() ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx)) // Define attributes of all API symbols declarations (e.g. for DLL under Windows) diff --git a/imgui_demo.cpp b/imgui_demo.cpp index 6fef81c4..7664f1b4 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -1,4 +1,4 @@ -// dear imgui, v1.75 WIP +// dear imgui, v1.75 // (demo code) // Help: diff --git a/imgui_draw.cpp b/imgui_draw.cpp index 41a7aff8..4bb91ccf 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -1,4 +1,4 @@ -// dear imgui, v1.75 WIP +// dear imgui, v1.75 // (drawing and font code) /* @@ -360,7 +360,7 @@ ImDrawListSharedData::ImDrawListSharedData() const float a = ((float)i * 2 * IM_PI) / (float)IM_ARRAYSIZE(CircleVtx12); CircleVtx12[i] = ImVec2(ImCos(a), ImSin(a)); } - memset(CircleSegmentCounts, 0, sizeof(CircleSegmentCounts)); // This will be set by + memset(CircleSegmentCounts, 0, sizeof(CircleSegmentCounts)); // This will be set by SetCircleSegmentMaxError() } void ImDrawListSharedData::SetCircleSegmentMaxError(float max_error) diff --git a/imgui_internal.h b/imgui_internal.h index 47af16fb..5de13c36 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -1,4 +1,4 @@ -// dear imgui, v1.75 WIP +// dear imgui, v1.75 // (internal structures/api) // You may use this file to debug, understand or extend ImGui features but we don't provide any guarantee of forward compatibility! diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index c5509601..6d2c95d9 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -1,4 +1,4 @@ -// dear imgui, v1.75 WIP +// dear imgui, v1.75 // (widgets code) /*