Skip to content

Commit 64b88da

Browse files
committed
Merge branch 'master' into docking
# Conflicts: # docs/CHANGELOG.txt # imgui.cpp # imgui.h
2 parents caf4b7f + cb48c81 commit 64b88da

11 files changed

+71
-104
lines changed

backends/imgui_impl_opengl3_loader.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99
// YOU SHOULD NOT NEED TO INCLUDE/USE THIS DIRECTLY. THIS IS USED BY imgui_impl_opengl3.cpp ONLY.
1010
// THE REST OF YOUR APP SHOULD USE A DIFFERENT GL LOADER: ANY GL LOADER OF YOUR CHOICE.
1111
//
12+
// IF YOU GET BUILD ERRORS IN THIS FILE (commonly macro redefinitions or function redefinitions):
13+
// IT LIKELY MEANS THAT YOU ARE BUILDING 'imgui_impl_opengl3.cpp' OR INCUDING 'imgui_impl_opengl3_loader.h'
14+
// IN THE SAME COMPILATION UNIT AS ONE OF YOUR FILE WHICH IS USING A THIRD-PARTY OPENGL LOADER.
15+
// (e.g. COULD HAPPEN IF YOU ARE DOING A UNITY/JUMBO BUILD, OR INCLUDING .CPP FILES FROM OTHERS)
16+
// YOU SHOULD NOT BUILD BOTH IN THE SAME COMPILATION UNIT.
17+
// BUT IF YOU REALLY WANT TO, you can '#define IMGUI_IMPL_OPENGL_LOADER_CUSTOM' and imgui_impl_opengl3.cpp
18+
// WILL NOT BE USING OUR LOADER, AND INSTEAD EXPECT ANOTHER/YOUR LOADER TO BE AVAILABLE IN THE COMPILATION UNIT.
19+
//
1220
// Regenerate with:
1321
// python gl3w_gen.py --output ../imgui/backends/imgui_impl_opengl3_loader.h --ref ../imgui/backends/imgui_impl_opengl3.cpp ./extra_symbols.txt
1422
//

docs/CHANGELOG.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ Breaking changes:
127127
- requires an explicit identifier. You may still use e.g. PushID() calls and then pass an empty identifier.
128128
- always uses style.FramePadding for padding, to be consistent with other buttons. You may use PushStyleVar() to alter this.
129129
- As always we are keeping a redirection function available (will obsolete later).
130+
- Commented out redirecting functions/enums names that were marked obsolete in 1.77 and 1.78 (June 2020): (#3361)
131+
- DragScalar(), DragScalarN(), DragFloat(), DragFloat2(), DragFloat3(), DragFloat4()
132+
- SliderScalar(), SliderScalarN(), SliderFloat(), SliderFloat2(), SliderFloat3(), SliderFloat4()
133+
- For old signatures ending with (..., const char* format, float power = 1.0f) -> use (..., format ImGuiSliderFlags_Logarithmic) if power != 1.0f.
134+
- BeginPopupContextWindow(const char*, ImGuiMouseButton, bool) -> use BeginPopupContextWindow(const char*, ImGuiPopupFlags)
130135
- Obsoleted using SetCursorPos()/SetCursorScreenPos() to extend parent window/cell boundaries. (#5548)
131136
This relates to when moving the cursor position beyond current boundaries WITHOUT submitting an item.
132137
- Previously this would make the window content size ~200x200:
@@ -148,6 +153,8 @@ Other Changes:
148153
Enter keep the input active and select all text.
149154
- InputText: numerical fields automatically accept full-width characters (U+FF01..U+FF5E)
150155
by converting them to half-width (U+0021..U+007E).
156+
- InputText: added support for shift+click style selection. (#5619) [@procedural]
157+
- InputText: clarified that callbacks cannot modify buffer when using the ReadOnly flag.
151158
- IsItemHovered: Added ImGuiHoveredFlags_DelayNormal and ImGuiHoveredFlags_DelayShort flags,
152159
allowing to introduce a shared delay for tooltip idioms. The delays are respectively
153160
io.HoverDelayNormal (default to 0.30f) and io.HoverDelayFast (default to 0.10f). (#1485)
@@ -157,6 +164,10 @@ Other Changes:
157164
next row in such state where subsequent SameLine() would move back to previous row.
158165
- Tabs: Fixed a crash when closing multiple windows (possible with docking only) with an
159166
appended TabItemButton(). (#5515, #3291) [@rokups]
167+
- Tabs: Fixed shrinking policy leading to infinite loops when fed unrounded tab widths. (#5652)
168+
- Tabs: Fixed shrinking policy sometimes erroneously making right-most tabs stray a little out
169+
bar boundaries (bug in 1.88). (#5652).
170+
- Tabs: Enforcing minimum size of 1.0f, fixed asserting on zero-tab widths. (#5572)
160171
- Window: Fixed a potential crash when appending to a child window. (#5515, #3496, #4797) [@rokups]
161172
- IO: Added ImGuiKey_MouseXXX aliases for mouse buttons/wheel so all operations done on ImGuiKey
162173
can apply to mouse data as well. (#4921)

docs/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Steps:
5858
- If you are involved in cheating schemes (e.g. DLL injection) for competitive online multi-player games, please don't try posting here. We won't answer and you will be blocked. It doesn't matter if your question relates to said project. We've had too many of you and need to project our time and sanity.
5959
- Due to frequent abuse of this service from aforementioned users, if your GitHub account is anonymous and was created five minutes ago please understand that your post will receive more scrutiny and incomplete questions will be harshly dismissed.
6060

61-
If you have been using dear imgui for a while or have been using C/C++ for several years or have demonstrated good behavior here, it is ok to not fullfill every item to the letter. Those are guidelines and experienced users or members of the community will know which information are useful in a given context.
61+
If you have been using dear imgui for a while or have been using C/C++ for several years or have demonstrated good behavior here, it is ok to not fulfill every item to the letter. Those are guidelines and experienced users or members of the community will know which information is useful in a given context.
6262

6363
## How to open a Pull Request
6464

@@ -67,7 +67,7 @@ If you have been using dear imgui for a while or have been using C/C++ for sever
6767
- **When adding a feature,** please describe the usage context (how you intend to use it, why you need it, etc.). Be mindful of [The XY Problem](http://xyproblem.info/).
6868
- **When fixing a warning or compilation problem,** please post the compiler log and specify the compiler version and platform you are using.
6969
- **Attach screenshots (or gif/video) to clarify the context and demonstrate the feature at a glance.** You can drag pictures/files in the message edit box. Prefer the long term longevity of GitHub attachments over 3rd party hosting (you can drag pictures into your post).
70-
- **Make sure your code follows the coding style already used in the codebase:** 4 spaces identations (no tabs), `local_variable`, `FunctionName()`, `MemberName`, `// Text Comment`, `//CodeComment();`, C-style casts, etc.. We don't use modern C++ idioms and tend to use only a minimum of C++11 features. The applications under examples/ are generally less consistent because they sometimes try to mimic the coding style often adopted by a certain ecosystem (e.g. DirectX-related code tend to use the style of their sample).
70+
- **Make sure your code follows the coding style already used in the codebase:** 4 spaces indentations (no tabs), `local_variable`, `FunctionName()`, `MemberName`, `// Text Comment`, `//CodeComment();`, C-style casts, etc.. We don't use modern C++ idioms and tend to use only a minimum of C++11 features. The applications under examples/ are generally less consistent because they sometimes try to mimic the coding style often adopted by a certain ecosystem (e.g. DirectX-related code tend to use the style of their sample).
7171
- **Make sure you create a branch dedicated to the pull request**. In Git, 1 PR is associated to 1 branch. If you keep pushing to the same branch after you submitted the PR, your new commits will appear in the PR (we can still cherry-pick individual commits).
7272

7373
Thank you for reading!

docs/EXAMPLES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ DirectX12 example, Windows only. <BR>
205205
This is quite long and tedious, because: DirectX12.
206206
207207
208-
### Miscallaneous
208+
### Miscellaneous
209209
210210
**Building**
211211

docs/FAQ.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# FAQ (Frequenty Asked Questions)
1+
# FAQ (Frequently Asked Questions)
22

33
You may link to this document using short form:
44
https://www.dearimgui.org/faq
@@ -56,7 +56,7 @@ or view this file with any Markdown viewer.
5656
- The [Glossary](https://github.com/ocornut/imgui/wiki/Glossary) page may be useful.
5757
- The [Issues](https://github.com/ocornut/imgui/issues) and [Discussions](https://github.com/ocornut/imgui/discussions) sections can be searched for past questions and issues.
5858
- Your programming IDE is your friend, find the type or function declaration to find comments associated with it.
59-
- The `ImGui::ShowMetricsWindow()` function exposes lots of internal information and tools. Although it is primary designed as a debugging tool, having access to that information tends to help understands concepts.
59+
- The `ImGui::ShowMetricsWindow()` function exposes lots of internal information and tools. Although it is primarily designed as a debugging tool, having access to that information tends to help understands concepts.
6060

6161
##### [Return to Index](#index)
6262

@@ -123,7 +123,7 @@ void MyLowLevelMouseButtonHandler(int button, bool down)
123123
```
124124
125125
126-
**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.
126+
**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 handles 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.
127127
128128
**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.
129129
@@ -240,7 +240,7 @@ Button("OK"); // ERROR: ID collision with the first button! Interacting wit
240240
Button(""); // ERROR: ID collision with Begin("MyWindow")!
241241
End();
242242
```
243-
Fear not! this is easy to solve and there are many ways to solve it!
243+
Fear not! This is easy to solve and there are many ways to solve it!
244244
245245
- Solving ID conflict in a simple/local context:
246246
When passing a label you can optionally specify extra ID information within string itself.
@@ -259,7 +259,7 @@ End();
259259
```cpp
260260
Checkbox("##On", &b); // Label = "", ID = hash of (..., "##On") // No visible label, just a checkbox!
261261
```
262-
- Occasionally/rarely you might want change a label while preserving a constant ID. This allows
262+
- Occasionally/rarely you might want to change a label while preserving a constant ID. This allows
263263
you to animate labels. For example you may want to include varying information in a window title bar,
264264
but windows are uniquely identified by their ID. Use "###" to pass a label that isn't part of ID:
265265
```cpp
@@ -310,7 +310,7 @@ PushID("node");
310310
PopID();
311311
PopID();
312312
```
313-
- Tree nodes implicitly creates a scope for you by calling `PushID()`:
313+
- Tree nodes implicitly create a scope for you by calling `PushID()`:
314314
```cpp
315315
Button("Click"); // Label = "Click", ID = hash of (..., "Click")
316316
if (TreeNode("node")) // <-- this function call will do a PushID() for you (unless instructed not to, with a special flag)
@@ -346,7 +346,7 @@ Long explanation:
346346
- Each rendering function decides on a data type to represent "textures". The concept of what is a "texture" is entirely tied to your underlying engine/graphics API.
347347
We carry the information to identify a "texture" in the ImTextureID type.
348348
ImTextureID is nothing more that a void*, aka 4/8 bytes worth of data: just enough to store 1 pointer or 1 integer of your choice.
349-
Dear ImGui doesn't know or understand what you are storing in ImTextureID, it merely pass ImTextureID values until they reach your rendering function.
349+
Dear ImGui doesn't know or understand what you are storing in ImTextureID, it merely passes ImTextureID values until they reach your rendering function.
350350
- In the [examples/](https://github.com/ocornut/imgui/tree/master/examples) backends, for each graphics API we decided on a type that is likely to be a good representation for specifying an image from the end-user perspective. This is what the _examples_ rendering functions are using:
351351
```cpp
352352
OpenGL:
@@ -499,7 +499,7 @@ Applications in the `examples/` folder are not DPI aware partly because they are
499499
The reason DPI is not auto-magically solved in stock examples is that we don't yet have a satisfying solution for the "multi-dpi" problem (using the `docking` branch: when multiple viewport windows are over multiple monitors using different DPI scale). The current way to handle this on the application side is:
500500
- Create and maintain one font atlas per active DPI scale (e.g. by iterating `platform_io.Monitors[]` before `NewFrame()`).
501501
- Hook `platform_io.OnChangedViewport()` to detect when a `Begin()` call makes a Dear ImGui window change monitor (and therefore DPI).
502-
- In the hook: swap atlas, swap style with correctly sized one, remap the current font from one atlas to the other (may need to maintain a remapping table of your fonts at variying DPI scale).
502+
- In the hook: swap atlas, swap style with correctly sized one, remap the current font from one atlas to the other (may need to maintain a remapping table of your fonts at varying DPI scale).
503503
504504
This approach is relatively easy and functional but come with two issues:
505505
- It's not possibly to reliably size or position a window ahead of `Begin()` without knowing on which monitor it'll land.

docs/FONTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
149149

150150
**Font Atlas too large?**
151151

152-
- If you have very large number of glyphs or multiple fonts, the texture may become too big for your graphics API. The typical result of failing to upload a texture is if every glyphs appears as white rectangles.
152+
- If you have very large number of glyphs or multiple fonts, the texture may become too big for your graphics API. The typical result of failing to upload a texture is if every glyph appears as a white rectangle.
153153
- Mind the fact that some graphics drivers have texture size limitation. If you are building a PC application, mind the fact that your users may use hardware with lower limitations than yours.
154154

155155
Some solutions:
@@ -316,7 +316,7 @@ ImFont* font = io.Fonts->AddFontFromMemoryCompressedBase85TTF(compressed_data_ba
316316
**Please note that many new C/C++ users have issues loading their files _because the filename they provide is wrong_.**
317317
318318
Two things to watch for:
319-
- Make sure your IDE/debugger settings starts your executable from the right working directory. In Visual Studio you can change your working directory in project `Properties > General > Debugging > Working Directory`. People assume that their execution will start from the root folder of the project, where by default it oftens start from the folder where object or executable files are stored.
319+
- Make sure your IDE/debugger settings starts your executable from the right working directory. In Visual Studio you can change your working directory in project `Properties > General > Debugging > Working Directory`. People assume that their execution will start from the root folder of the project, where by default it often starts from the folder where object or executable files are stored.
320320
```cpp
321321
// Relative filename depends on your Working Directory when running your program!
322322
io.Fonts->AddFontFromFileTTF("MyImage01.jpg", ...);

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Dear ImGui allows you to **create elaborate tools** as well as very short-lived
9696

9797
### How it works
9898

99-
Check out the Wiki's [About the IMGUI paradigm](https://github.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section if you want to understand the core principles behind the IMGUI paradigm. An IMGUI tries to minimize superfluous state duplication, state synchronization and state retention from the user's point of view. It is less error prone (less code and less bugs) than traditional retained-mode interfaces, and lends itself to create dynamic user interfaces.
99+
Check out the Wiki's [About the IMGUI paradigm](https://github.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section if you want to understand the core principles behind the IMGUI paradigm. An IMGUI tries to minimize superfluous state duplication, state synchronization and state retention from the user's point of view. It is less error-prone (less code and less bugs) than traditional retained-mode interfaces, and lends itself to create dynamic user interfaces.
100100

101101
Dear ImGui outputs vertex buffers and command lists that you can easily render in your application. The number of draw calls and state changes required to render them is fairly small. Because Dear ImGui doesn't know or touch graphics state directly, you can call its functions anywhere in your code (e.g. in the middle of a running algorithm, or in the middle of your own rendering process). Refer to the sample applications in the examples/ folder for instructions on how to integrate Dear ImGui with your existing codebase.
102102

imgui.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,10 @@ CODE
392392
- likewise io.MousePos and GetMousePos() will use OS coordinates.
393393
If you query mouse positions to interact with non-imgui coordinates you will need to offset them, e.g. subtract GetWindowViewport()->Pos.
394394

395+
- 2022/09/05 (1.89) - commented out redirecting functions/enums names that were marked obsolete in 1.77 and 1.78 (June 2020):
396+
- DragScalar(), DragScalarN(), DragFloat(), DragFloat2(), DragFloat3(), DragFloat4(): For old signatures ending with (..., const char* format, float power = 1.0f) -> use (..., format ImGuiSliderFlags_Logarithmic) if power != 1.0f.
397+
- SliderScalar(), SliderScalarN(), SliderFloat(), SliderFloat2(), SliderFloat3(), SliderFloat4(): For old signatures ending with (..., const char* format, float power = 1.0f) -> use (..., format ImGuiSliderFlags_Logarithmic) if power != 1.0f.
398+
- BeginPopupContextWindow(const char*, ImGuiMouseButton, bool) -> use BeginPopupContextWindow(const char*, ImGuiPopupFlags)
395399
- 2022/09/02 (1.89) - obsoleted using SetCursorPos()/SetCursorScreenPos() to extend parent window/cell boundaries.
396400
this relates to when moving the cursor position beyond current boundaries WITHOUT submitting an item.
397401
- previously this would make the window content size ~200x200:
@@ -18865,7 +18869,7 @@ void ImGui::DebugNodeTabBar(ImGuiTabBar* tab_bar, const char* label)
1886518869
PushID(tab);
1886618870
if (SmallButton("<")) { TabBarQueueReorder(tab_bar, tab, -1); } SameLine(0, 2);
1886718871
if (SmallButton(">")) { TabBarQueueReorder(tab_bar, tab, +1); } SameLine();
18868-
Text("%02d%c Tab 0x%08X '%s' Offset: %.1f, Width: %.1f/%.1f",
18872+
Text("%02d%c Tab 0x%08X '%s' Offset: %.2f, Width: %.2f/%.2f",
1886918873
tab_n, (tab->ID == tab_bar->SelectedTabId) ? '*' : ' ', tab->ID, (tab->Window || tab->NameOffset != -1) ? tab_bar->GetTabName(tab) : "???", tab->Offset, tab->Width, tab->ContentWidth);
1887018874
PopID();
1887118875
}

0 commit comments

Comments
 (0)