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
Integrated power saving mode in Allegro example.
Fixed the cursor-blinking issue.
It is now working as expected, i.e. only setting a frame rate
requirement of 6fps when visibly blinking.
Also refactored a bit such that ImGui uses a boolean flag instead of
sharing the FrameRateRequirements object with user code.
Renamed FrameRateRequirements -> UserFrameRateRequirements.
Just so it's more explicit.
Minor formatting fixes [noci]
Implemented support for event waiting timeout in Win32.
Simplified the implementation.
This also addresses a design issue regarding how the application
requests a specific frame rate.
Get rid of the minimum frame rate.
Implemented logic to always render at least 3 frames.
Plus a bit of renaming/refactoring.
Implemented the 3-frame update logic for the SDL example.
Added support for 3-frame updates to Allegro example
+ refactoring of SDL/OpenGL3 example
+ refactoring and bug fix of Win32/DX11 example
Added suppor for 3-frame updates to Glfw example.
Rebased imstb_rectpack on stb_rect_pack v1.00.
SliderScalar: Improved assert when using U32 or U64 types with a large v_max value. (ocornut#2765)
+ misc minor stuff.
Demo: PlotLine example displays the average value. (ocornut#2759) + extra comments
Added a mechanism to compact/free the larger allocations of unused windows (buffers are compacted when a window is unused for 60 seconds, as per io.ConfigWindowsMemoryCompactTimer = 60.0f). Note that memory usage has never been reported as a problem, so this is merely a touch of overzealous luxury. (ocornut#2636)
Disable with ConfigWindowsMemoryCompactTimer < 0.0f (ocornut#2636)
TabBar: improved shrinking for large number of tabs to avoid leaving extraneous space on the right side. Individuals tabs are given integer-rounded width and remainder is spread between tabs left-to-right.
TabBar: feed desired width (sum of unclipped tabs width) into layout system to allow for auto-resize. (ocornut#2768)
Before 1.71 tab bars fed the sum of current width which created feedback loops in certain situations. Amend f95c77e.
DragInt, DragFloat, DragScalar: Using (v_min > v_max) allows locking any edit to the value.
ColorEdit: Disable Hue edit when Saturation==0 instead of letting Hue values jump around.
Fixed missing IMGUI_API for IsMouseDragPastThreshold().
Renamed SetMaxTimeBeforeNewFrame -> SetMaxWaitBeforeNextFrame
Compute the proper time to flip the cursor, instead of using 6fps.
Due to the 3-frame logic, this makes the effective cursor frame
rate go from 15fps to 5fps.
Refactored the event waiting implementation in SDL.
Moved the waiting part into the common implementation file.
This makes the platform+renderer binding simpler and not deviating
much from the existing one, which should make merging/integration
easier, especially for people maintaining their own copies.
Renamed variable to match the method name.
Refactored Win32 waiting code into common platform file
+ fix typo in SDL example
Fixed build
Avoid wasting frames by adding a small margin for the cursor.
Fixed regression
Win32 example: don't render 3 frames on timeouts
+ some refactoring
Refactored+fixed the Allegro5 implementation
Refactored+fixed Glfw example
Refactored+fixed SDL example
Refactoring (renaming)
Some final cleanup/refactoring; make the diff better
Refactored: no need to conditionally (not) poll after wait.
Keep waiting when the window is hidden (or minimized).
Implemented for Allegro, Glfw and SDL.
(does not seem to work with Allegro on Linux)
Implemented blocking when minimized/hidden for Win32
Minor formatting/doc changes.
Knocked off the 3 TODO items implemented by this PR.
Added missing Glfw callback (mouse pos)
This is just to record the event. The mouse pos is still handled as
before.
Small optimization: added shortcut test when feature disabled
This avoids paying the library/syscall cost when not needed.
Backends: OpenGL3: Tweaked initialization code allow application calling ImGui_ImplOpenGL3_CreateFontsTexture() before ImGui_ImplOpenGL3_NewFrame() if for some reason they wanted.
Fix DragScalar for unsigned types (ocornut#2780)
decreasing the value was broken on arm64
Nav, Scrolling: Added support for Home/End key. (ocornut#787)
Columns: Separator: Fixed a bug where non-visible separators within columns would alter the next row position differently than visible ones.
Fixed rounding issues also leading to change of ScrollMax depending on visible items (in particular negative coordinate would be rounded differently)
Fix signed types warning in pasteboard handler (ocornut#2786)
Examples: SDL/GLFW + OpenGL3: Fixes for Makefile (ocornut#2774)
- append CXXFLAGS instead of overwriting them
- add glad.c build rule
BeginTabItem: Fixed case where right-most tab would create an extraneous draw calls (probably related to other tab fitting code in 1.73 wip)
Remove trailing spaces (grep for ' \r?$' in visual studio)
Internal: Offset STB_TEXTURE_K_ defines to remove that change from ocornut#2541 + sponsors update.
Font: implement a way to draw narrow ellipsis without relying on hardcoded 1 pixel dots. (ocornut#2775)
This changeset implements several pieces of the puzzle that add up to a narrow ellipsis rendering.
`ImFontConfig` and `ImFont` received `ImWchar EllipsisCodePoint = -1;` field. User may configure `ImFontConfig::EllipsisCodePoint` a unicode codepoint that will be used for rendering narrow ellipsis. Not setting this field will automatically detect a suitable character or fall back to rendering 3 dots with minimal spacing between them. Autodetection prefers codepoint 0x2026 (narrow ellipsis) and falls back to 0x0085 (NEXT LINE) when missing. Wikipedia indicates that codepoint 0x0085 was used as ellipsis in some older windows fonts. So does default Dear ImGui font. When user is merging fonts - first configured and present ellipsis codepoint will be used, ellipsis characters from subsequently merged fonts will be ignored.
Rendering a narrow ellipsis is surprisingly not straightforward task. There are cases when ellipsis is bigger than the last visible character therefore `RenderTextEllipsis()` has to hide last two characters. In a subset of those cases ellipsis is as big as last visible character + space before it. `RenderTextEllipsis()` tries to work around this case by taking free space between glyph edges into account. Code responsible for this functionality is within `if (text_end_ellipsis != text_end_full) { ... }`.
There are cases when font does not have ellipsis character defined. In this case RenderTextEllipsis() falls back to rendering ellipsis as 3 dots, but with reduced spacing between them. 1 pixel space is used in all cases. This results in a somewhat wider ellipsis, but avoids issues where spaces between dots are uneven (visible in larger/monospace fonts) or squish dots way too much (visible in default font where dot is essentially a pixel). This fallback method obsoleted `RenderPixelEllipsis()` and this function was removed. Note that fallback ellipsis will always be somewhat wider than it could be, however it will fit in visually into every font used unlike what `RenderPixelEllipsis()` produced.
Font: Narrow ellipsis: various minor stylistic tweaks (ocornut#2775)
Font: Narrow ellipsis: once we know an ellipsis is going to be drawn, we can claim the space between pos_max.x and ellipsis_max.x which gives us enough extra space to not requires the further (and otherwise valid) optimizations. Gets us vastly simplified code, yay. (ocornut#2775)
Style: Allow style.WindowMenuButtonPosition to be set to ImGuiDir_None to hide the collapse button. (ocornut#2634, ocornut#2639)
+ Fixocornut#2775
ImDrawListSplitter: fixed an issue merging channels if the last submitted draw command used a different texture. (ocornut#2506)
Fixed unused static function warning for some compilers. (ocornut#2793)
TreeNode: Added ImGuiTreeNodeFlags_SpanAvailWidth and ImGuiTreeNodeFlags_SpanFullWidth flags (ocornut#2451, ocornut#2438, ocornut#1897)
Added demo bits.
Warning fix.
ColorPicker / ColorEdit: restore Hue when zeroing Saturation. (ocornut#2722, ocornut#2770)
Issue is fixed by storing last active color picker color and last hue value when active color picker takes rgb as input. Then if current color picker color matches last active color - hue value will be restored. IDs are not used because ColorEdit4() and ColorWidget4() may call each other in hard-to-predict ways and they both push their own IDs on to the stack. We need hue restoration to happen in entire stack of these widgets if topmost widget used hue restoration. Since these widgets operate on exact same color value - color was chosen as a factor deciding which widgets should restore hue.
ColorPicker / ColorEdit: restore Hue when zeroing Saturation. (ocornut#2722, ocornut#2770) - changelog, fixed uninitialized variables, tweaks, renaming.
Fixed mouse event forwarding in macos example (ocornut#2710, ocornut#1961)
Readme, Wiki: Image loading examples.
Copy file name to clipboardexpand all lines: docs/README.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -244,13 +244,13 @@ See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes) and [Software usi
244
244
The library started its life as "ImGui" due to the fact that I didn't give it a proper name when I released 1.0 and had no particular expectation that it would take off. However, the term IMGUI (immediate-mode graphical user interface) was coined before and is being used in variety of other situations (e.g. Unity uses it own implementation of the IMGUI paradigm). To reduce this ambiguity without affecting existing codebases, I have decided on an alternate, longer name "Dear ImGui" that people can use to refer to this specific library. Please try to refer to this library as "Dear ImGui".
245
245
246
246
**How can I tell whether to dispatch mouse/keyboard to Dear ImGui or to my application?**
247
-
<br>**How can I display an image? What is ImTextureID, how does it works?**
247
+
<br>**How can I display an image? What is ImTextureID, how does it works?** ([examples](https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples))
248
248
<br>**Why are multiple widgets reacting when I interact with a single one? How can I have multiple widgets with the same label or with an empty label? A primer on labels and the ID Stack...**
249
249
<br>**How can I use my own math types instead of ImVec2/ImVec4?**
250
250
<br>**How can I load a different font than the default?**
251
251
<br>**How can I easily use icons in my application?**
252
252
<br>**How can I load multiple fonts?**
253
-
<br>**How can I display and input non-latin characters such as Chinese, Japanese, Korean, Cyrillic?** ([example](https://github.com/ocornut/imgui/wiki/Loading-Font-Example))
253
+
<br>**How can I display and input non-latin characters such as Chinese, Japanese, Korean, Cyrillic?** ([examples](https://github.com/ocornut/imgui/wiki/Loading-Font-Example))
254
254
<br>**How can I interact with standard C++ types (such as std::string and std::vector)?**
255
255
<br>**How can I use the drawing facilities without a Dear ImGui window? (using ImDrawList API)**
256
256
<br>**How can I use this without a mouse, without a keyboard or without a screen? (gamepad, input share, remote display)**
@@ -311,10 +311,10 @@ Ongoing dear imgui development is financially supported by users and private spo
311
311
- Media Molecule, Mobigame, Aras Pranckevičius, Greggman, DotEmu, Nadeo, Supercell, Runner, Aiden Koss, Kylotonn.
- Remedy Entertainment, Recognition Robotics, ikrima, Geoffrey Evans, Mercury Labs, Singularity Demo Group, Lionel Landwerlin, Ron Gilbert, Brandon Townsend, G3DVu, Cort Stratton, drudru, Harfang 3D, Jeff Roberts, Rainway inc, Ondra Voves, Mesh Consultants, Unit 2 Games, Neil Bickford, Bill Six, Graham Manders.
315
315
316
316
**Caramel supporters**
317
-
- Jerome Lanquetot, Daniel Collin, Ctrl Alt Ninja, Neil Henning, Neil Blakey-Milner, Aleksei, NeiloGD, Eric, Game Atelier, Vincent Hamm, Colin Riley, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Josh Faust, Martin Donlon, Codecat, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Jonas Bernemann, Johan Andersson, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey, Steven Kah Hien Wong, Bartosz Bielecki, Oscar Penas, A M, Liam Moynihan, Artometa, Mark Lee, Dimitri Diakopoulos, Pete Goodwin, Johnathan Roatch, nyu lea, Oswald Hurlem, Semyon Smelyanskiy, Le Bach, Jeong MyeongSoo, Chris Matthews, Astrofra, Frederik De Bleser, Anticrisis.
317
+
- Jerome Lanquetot, Daniel Collin, Ctrl Alt Ninja, Neil Henning, Neil Blakey-Milner, Aleksei, NeiloGD, Eric, Game Atelier, Vincent Hamm, Morten Skaaning, Colin Riley, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Josh Faust, Martin Donlon, Codecat, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Jonas Bernemann, Johan Andersson, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey, Steven Kah Hien Wong, Bartosz Bielecki, Oscar Penas, A M, Liam Moynihan, Artometa, Mark Lee, Dimitri Diakopoulos, Pete Goodwin, Johnathan Roatch, nyu lea, Oswald Hurlem, Semyon Smelyanskiy, Le Bach, Jeong MyeongSoo, Chris Matthews, Astrofra, Frederik De Bleser, Anticrisis.
318
318
319
319
And all other past and present supporters; THANK YOU!
320
320
(Please contact me if you would like to be added or removed from this list)
Copy file name to clipboardexpand all lines: docs/TODO.txt
+9-6
Original file line number
Diff line number
Diff line change
@@ -93,6 +93,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
93
93
- input text: a side bar that could e.g. preview where errors are. probably left to the user to draw but we'd need to give them the info there.
94
94
- input text: a way for the user to provide syntax coloring.
95
95
- input text: Shift+TAB with ImGuiInputTextFlags_AllowTabInput could eat preceding blanks, up to tab_count.
96
+
- input text: facilitate patterns like if (InputText(..., obj.get_string_ref()) { obj.set_string(...); } relying on internally held buffer.
96
97
- input text multi-line: don't directly call AddText() which does an unnecessary vertex reserve for character count prior to clipping. and/or more line-based clipping to AddText(). and/or reorganize TextUnformatted/RenderText for more efficiency for large text (e.g TextUnformatted could clip and log separately, etc).
97
98
- input text multi-line: support for cut/paste without selection (cut/paste the current line)
98
99
- input text multi-line: line numbers? status bar? (follow up on #200)
@@ -111,6 +112,9 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
111
112
- layout: more generic alignment state (left/right/centered) for single items?
112
113
- layout: clean up the InputFloatN/SliderFloatN/ColorEdit4 layout code. item width should include frame padding.
113
114
- layout: vertical alignment of mixed height items (e.g. buttons) within a same line (#1284)
115
+
- layout: null layout mode were items are not rendered but user can query GetItemRectMin()/Max/Size.
116
+
- layout: (R&D) local multi-pass layout mode.
117
+
- layout: (R&D) bind authored layout data (created by an off-line tool), items fetch their pos/size at submission, self-optimize data structures to stable linear access.
114
118
115
119
- group: BeginGroup() needs a border option. (~#1496)
116
120
- group: IsHovered() after EndGroup() covers whole aabb rather than the intersection of individual items. Is that desirable?
@@ -275,6 +279,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
275
279
- font: MergeMode: flags to select overwriting or not (this is now very easy with refactored ImFontAtlasBuildWithStbTruetype)
276
280
- font: free the Alpha buffer if user only requested RGBA.
277
281
!- font: better CalcTextSizeA() API, at least for simple use cases. current one is horrible (perhaps have simple vs extended versions).
282
+
- font: for the purpose of RenderTextEllipsis(), it might be useful that CalcTextSizeA() can ignore the trailing padding?
278
283
- font: a CalcTextHeight() helper could run faster than CalcTextSize().y
279
284
- font: enforce monospace through ImFontConfig (for icons?) + create dual ImFont output from same input, reusing rasterized data but with different glyphs/AdvanceX
280
285
- font: finish CustomRectRegister() to allow mapping Unicode codepoint to custom texture data
@@ -300,12 +305,14 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
300
305
- font/opt: Considering storing standalone AdvanceX table as 16-bit fixed point integer?
301
306
- font/opt: Glyph currently 40 bytes (2+9*4). Consider storing UV as 16 bits integer? (->32 bytes). X0/Y0/X1/Y1 as 16 fixed-point integers? Or X0/Y0 as float and X1/Y1 as fixed8_8?
302
307
308
+
- nav: some features such as PageUp/Down/Home/End should probably work without ImGuiConfigFlags_NavEnableKeyboard? (where do we draw the line?)
309
+
- nav: configuration flag to disable global shortcuts (currently only CTRL-Tab) ?
310
+
- nav: Home/End behavior when navigable item is not fully visible at the edge of scrolling? should be backtrack to keep item into view?
303
311
- nav: NavScrollToBringItemIntoView() with item bigger than view should focus top-right? Repro: using Nav in "About Window"
304
312
- nav: wrap around logic to allow e.g. grid based layout (pressing NavRight on the right-most element would go to the next row, etc.). see internal's NavMoveRequestTryWrapping().
305
313
- nav: patterns to make it possible for arrows key to update selection
306
-
- nav: restore/find nearest navid when current one disappear (e.g. pressed a button that disappear, or perhaps auto restoring when current button change name)
314
+
- nav: restore/find nearest NavId when current one disappear (e.g. pressed a button that disappear, or perhaps auto restoring when current button change name)
307
315
- nav: SetItemDefaultFocus() level of priority, so widget like Selectable when inside a popup could claim a low-priority default focus on the first selected iem
308
-
- nav: allow input system to be be more tolerant of io.DeltaTime=0.0f
309
316
- nav: ESC within a menu of a child window seems to exit the child window.
310
317
- nav: NavFlattened: ESC on a flattened child should select something.
311
318
- nav: NavFlattened: broken: in typical usage scenario, the items of a fully clipped child are currently not considered to enter into a NavFlattened child.
@@ -323,7 +330,6 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
323
330
- nav: esc/enter default behavior for popups, e.g. be able to mark an "ok" or "cancel" button that would get triggered by those keys.
324
331
- nav: when activating a button that changes label (without a static ID) or disappear, can we somehow automatically recover into a nearest highlight item?
325
332
- nav: there's currently no way to completely clear focus with the keyboard. depending on patterns used by the application to dispatch inputs, it may be desirable.
326
-
- nav: configuration flag to disable global shortcuts (currently only CTRL-tab) ?
327
333
- focus: preserve ActiveId/focus stack state, e.g. when opening a menu and close it, previously selected InputText() focus gets restored (#622)
328
334
- focus: SetKeyboardFocusHere() on with >= 0 offset could be done on same frame (else latch and modulate on beginning of next frame)
329
335
- focus: unable to use SetKeyboardFocusHere() on clipped widgets. (#787)
@@ -336,7 +342,6 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
336
342
- inputs: add mouse cursor for unavailable/no? IDC_NO/SDL_SYSTEM_CURSOR_NO.
337
343
- inputs/scrolling: support for smooth scrolling (#2462, #2569)
338
344
339
-
- misc: idle: expose "woken up" boolean (set by inputs) and/or animation time (for cursor blink) for back-end to be able stop refreshing easily.
340
345
- misc: idle: if cursor blink if the _only_ visible animation, core imgui could rewrite vertex alpha to avoid CPU pass on ImGui:: calls.
341
346
- misc: idle: if cursor blink if the _only_ visible animation, could even expose a dirty rectangle that optionally can be leverage by some app to render in a smaller viewport, getting rid of much pixel shading cost.
342
347
- misc: make the ImGuiCond values linear (non-power-of-two). internal storage for ImGuiWindow can use integers to combine into flags (Why?)
@@ -357,9 +362,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
357
362
- demo: add virtual scrolling example?
358
363
- demo: demonstrate Plot offset
359
364
- examples: window minimize, maximize (#583)
360
-
- examples: provide a zero frame-rate/idle example.
361
365
- examples: apple: example_apple should be using modern GL3.
362
-
- examples: glfw: could go idle when minimized? if (glfwGetWindowAttrib(window, GLFW_ICONIFIED)) { glfwWaitEvents(); continue; } // issue: DeltaTime will be super high on resume, perhaps provide a way to let impl know (#440)
363
366
- examples: opengl: rename imgui_impl_opengl2 to impl_opengl_legacy and imgui_impl_opengl3 to imgui_impl_opengl? (#1900)
364
367
- examples: opengl: could use a single vertex buffer and glBufferSubData for uploads?
365
368
- examples: opengl: explicitly disable GL_STENCIL_TEST in bindings.
0 commit comments