Skip to content

Commit 3930472

Browse files
committed
Merge branch 'master' into docking
# Conflicts: # imgui.cpp
2 parents 6d03f93 + 7524362 commit 3930472

File tree

9 files changed

+177
-115
lines changed

9 files changed

+177
-115
lines changed

docs/CHANGELOG.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ Other Changes:
118118
- Selectable: Allow using ImGuiSelectableFlags_SpanAllColumns in other columns than first. (#125)
119119
- TreeNode: Made clicking on arrow with _OpenOnArrow toggle the open state on the Mouse Down
120120
event rather than the Mouse Down+Up sequence (this is rather standard behavior).
121+
- Nav: Fixed interactions with ImGuiListClipper, so e.g. Home/End result would not clip the
122+
landing item on the landing frame. (#787)
123+
- Nav: Fixed currently focused item from ever being clipped by ItemAdd(). (#787)
121124
- Scrolling: Fixed scrolling centering API leading to non-integer scrolling values and initial
122125
cursor position. This would often get fixed after the fix item submission, but using the
123126
ImGuiListClipper as the first thing after Begin() could largely break size calculations. (#3073)
@@ -130,13 +133,20 @@ Other Changes:
130133
- sizeof(ImWchar) goes from 2 to 4. IM_UNICODE_CODEPOINT_MAX goes from 0xFFFF to 0x10FFFF.
131134
- Various structures such as ImFont, ImFontGlyphRangesBuilder will use more memory, this
132135
is currently not particularly efficient.
136+
- Columns: undid the change in 1.75 were Columns()/BeginColumns() were preemptively limited
137+
to 64 columns with an assert. (#3037, #125)
133138
- Window: Fixed a bug with child window inheriting ItemFlags from their parent when the child
134139
window also manipulate the ItemFlags stack. (#3024) [@Stanbroek]
135140
- Font: Fixed non-ASCII space occasionally creating unnecessary empty polygons.
141+
- Misc: Added an explicit compile-time test for non-scoped IM_ASSERT() macros to redirect users
142+
to a solution rather than encourage people to add braces in the codebase.
136143
- Misc: Added additional checks in EndFrame() to verify that io.KeyXXX values have not been
137144
tampered with between NewFrame() and EndFrame().
138145
- Misc, Freetype: Fixed support for IMGUI_STB_RECT_PACK_FILENAME compile time directive
139146
in imgui_freetype.cpp (matching support in the regular code path). (#3062) [@DonKult]
147+
- Metrics: Made Tools section more prominent. Showing wire-frame mesh directly hovering the ImDrawCmd
148+
instead of requiring to open it. Added options to disable bounding box and mesh display.
149+
Added notes on inactive/gc-ed windows.
140150
- Demo: Added black and white and color gradients to Demo>Examples>Custom Rendering.
141151
- CI: Added more tests on the continuous-integration server: extra warnings for Clang/GCC, building
142152
SDL+Metal example, building imgui_freetype.cpp, more compile-time imconfig.h settings: disabling
@@ -187,6 +197,7 @@ Breaking Changes:
187197
- ImDrawList::AddCircle()/AddCircleFilled() functions don't accept negative radius.
188198
- Limiting Columns()/BeginColumns() api to 64 columns with an assert. While the current code
189199
technically supports it, future code may not so we're putting the restriction ahead.
200+
[Undid that change in 1.76]
190201
- imgui_internal.h: changed ImRect() default constructor initializes all fields to 0.0f instead
191202
of (FLT_MAX,FLT_MAX,-FLT_MAX,-FLT_MAX). If you used ImRect::Add() to create bounding boxes by
192203
adding points into it without explicit initialization, you may need to fix your initial value.

docs/FAQ.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,13 @@ e.g. `if (ImGui::GetIO().WantCaptureMouse) { ... }`
9696
**Note:** You should always pass your mouse/keyboard inputs to Dear ImGui, even when the io.WantCaptureXXX flag are set false.
9797
This is because imgui needs to detect that you clicked in the void to unfocus its own windows.
9898

99-
**Note:** The `io.WantCaptureMouse` is more accurate that any manual attempt to "check if the mouse is hovering a window" (don't do that!). It handle mouse dragging correctly (both dragging that started over your application or over an imgui window) and handle e.g. modal windows blocking inputs. Those flags are updated by `ImGui::NewFrame()`. Preferably read the flags after calling NewFrame() if you can afford it, but reading them before is also perfectly fine, as the bool toggle fairly rarely. If you have on a touch device, you might find use for an early call to `UpdateHoveredWindowAndCaptureFlags()`.
99+
**Note:** The `io.WantCaptureMouse` is more correct that any manual attempt to "check if the mouse is hovering a window" (don't do that!). It handle mouse dragging correctly (both dragging that started over your application or over a Dear ImGui window) and handle e.g. popup and modal windows blocking inputs.
100100

101-
**Note:** Text input widget releases focus on "Return KeyDown", so the subsequent "Return KeyUp" event that your application receive will typically have `io.WantCaptureKeyboard == false`. Depending on your application logic it may or not be inconvenient. You might want to track which key-downs were targeted for Dear ImGui, e.g. with an array of bool, and filter out the corresponding key-ups.)
101+
**Note:** Those flags are updated by `ImGui::NewFrame()`. However it is generally more correct and easier that you poll flags from the previous frame, then submit your inputs, then call `NewFrame()`. If you attempt to do the opposite (which is generally harder) you are likely going to submit your inputs after `NewFrame()`, and therefore too late.
102+
103+
**Note:** If you are using a touch device, you may find use for an early call to `UpdateHoveredWindowAndCaptureFlags()` to correctly dispatch your initial touch. We will work on better out-of-the-box touch support in the future.
104+
105+
**Note:** Text input widget releases focus on the "KeyDown" event of the Return key, so the subsequent "KeyUp" event that your application receive will typically have `io.WantCaptureKeyboard == false`. Depending on your application logic it may or not be inconvenient to receive that KeyUp event. You might want to track which key-downs were targeted for Dear ImGui, e.g. with an array of bool, and filter out the corresponding key-ups.)
102106

103107
##### [Return to Index](#index)
104108

examples/imgui_impl_win32.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ IMGUI_IMPL_API void ImGui_ImplWin32_NewFrame();
1818
//#define IMGUI_IMPL_WIN32_DISABLE_GAMEPAD
1919
//#define IMGUI_IMPL_WIN32_DISABLE_LINKING_XINPUT
2020

21-
// Win32 message handler
22-
// - Intentionally commented out in a '#if 0' block to avoid dragging dependencies on <windows.h>
23-
// - You can COPY this line into your .cpp code to forward declare the function.
21+
// Win32 message handler your application need to call.
22+
// - Intentionally commented out in a '#if 0' block to avoid dragging dependencies on <windows.h> from this helper.
23+
// - You should COPY the line below into your .cpp code to forward declare the function and then you can call it.
2424
#if 0
2525
extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
2626
#endif

0 commit comments

Comments
 (0)