omar
bf4880f6a2
Merge branch 'master' into docking
2019-10-07 19:14:37 +02:00
omar
73fa6509a5
Internal: InputTextEx: tweaked a bit of code (should be a no-op)
2019-10-05 16:57:12 +02:00
omar
e0c0e53edf
Merge branch 'master' into docking
...
# Conflicts:
# docs/CHANGELOG.txt
2019-10-04 19:22:42 +02:00
omar
a6c3be4bda
Internals: Tweaks to ItemSize() should be harmless. Added DebugDrawItemRect() helper.
2019-10-03 18:30:41 +02:00
omar
892dfb1dea
InputText, Nav: Fixed Home/End key broken when activating Keyboard Navigation. ( #787 )
...
Small refactor of ActiveIdUsingXXX inputs flags toward a little more consistent system. (#2637 )
2019-10-02 15:57:36 +02:00
omar
0dad3f436b
Fix harmless float calculation overflow. ( #2813 )
2019-09-30 15:16:30 +02:00
omar
c262276988
Version 1.74 WIP
2019-09-30 14:27:56 +02:00
omar
6994bf10bc
Merge branch 'master' into docking + fix for RenderMouseCursor()
...
# Conflicts:
# docs/CHANGELOG.txt
# examples/imgui_impl_opengl3.cpp
# imgui.cpp
# imgui_draw.cpp
# imgui_internal.h
2019-09-24 17:14:51 +02:00
omar
d5efe16157
Version 1.73
2019-09-24 17:02:26 +02:00
omar
ca858c084b
Demo tweaks. Comments. Compacting the rarely used AutoFitXXX fields in ImGuiWindowTempData.
2019-09-23 20:15:25 +02:00
omar
52deb415e0
Internal: Refactored internal RenderMouseCursor so colors can be specified. ( #2614 )
2019-09-23 14:53:49 +02:00
omar
25849234f6
Internal: Tree: tweaks (initially tried to implement auto-scrolling, stashed)
2019-09-23 13:11:38 +02:00
omar
3233d85d2f
Merge branch 'master' into docking
2019-09-22 22:16:11 +02:00
omar
13f00331da
Docking: Added ImGuiDockNodeFlags_NoDocking flag. ( #2109 )
2019-09-21 14:50:02 +02:00
omar
a45e3b5bb3
Readme, Wiki: Image loading examples.
2019-09-20 19:04:19 +02:00
omar
af93c21cf9
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui_internal.h
2019-09-18 17:27:14 +02:00
omar
74e01e62ce
Fixed unused static function warning for some compilers. ( #2793 )
2019-09-18 13:21:12 +02:00
omar
1ca6ff974c
Viewport: fix to allow multiple shutdown / calls to DestroyPlatformWindows(). ( #2769 )
2019-09-17 18:02:58 +02:00
omar
575df6f192
Merge branch 'master' into docking
...
# Conflicts:
# examples/imgui_impl_opengl3.cpp
# imgui.cpp
# imgui_draw.cpp
# imgui_internal.h
2019-09-17 16:35:50 +02:00
omar
b48dc067ae
Style: Allow style.WindowMenuButtonPosition to be set to ImGuiDir_None to hide the collapse button. ( #2634 , #2639 )
...
+ Fix #2775
2019-09-17 16:33:15 +02:00
omar
3b014d0c31
Merge branch 'features/ellipsis_rendering'
...
# Conflicts:
# imgui.cpp
2019-09-17 12:07:30 +02:00
omar
7d5a17e5e4
Remove trailing spaces (grep for ' \r?$' in visual studio)
2019-09-17 11:33:18 +02:00
omar
1c951dca97
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. ( #2775 )
2019-09-17 11:14:46 +02:00
omar
57623c15dd
Font: Narrow ellipsis: various minor stylistic tweaks ( #2775 )
2019-09-17 11:13:34 +02:00
Rokas Kupstys
45405f0dc9
Font: implement a way to draw narrow ellipsis without relying on hardcoded 1 pixel dots. ( #2775 )
...
This changeset implements several pieces of the puzzle that add up to a narrow ellipsis rendering.
## EllipsisCodePoint
`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.
## Narrow ellipsis
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) { ... }`.
## Fallback (manually rendered dots)
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.
2019-09-17 11:13:07 +02:00
Qix
561e7dd490
Fix signed types warning in pasteboard handler ( #2786 )
2019-09-17 16:21:09 +09:00
omar
b05f6f6f50
Nav, Scrolling: Added support for Home/End key. ( #787 )
2019-09-16 19:01:40 +02:00
omar
0bdc145343
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui_internal.h
2019-08-31 19:19:00 +02:00
omar
d049a7988c
Docking: comments for DockBuilder API.
2019-08-31 16:51:12 +02:00
omar
9e294be5c5
Docking: Fix for node created at the same time as windows that are still resizing (typically with io.ConfigDockingAlwaysTabBar) to not be zero/min sized. ( #2109 )
...
The fix delay their visibility by one frame, which is not ideal but not very problematic as the .ini data gets populated after that
2019-08-29 10:45:33 +02:00
omar
bfcdaeb610
Disable with ConfigWindowsMemoryCompactTimer < 0.0f ( #2636 )
2019-08-28 20:30:36 +02:00
omar
62f75c7fb1
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. ( #2636 )
2019-08-28 20:28:36 +02:00
omar
a01d149369
Fixed context popup windows from not having the NoDocking flag. ( #2763 )
2019-08-28 10:52:17 +02:00
omar
483534b525
Internals: Using simpler ImVec2ih construct + fixed misnamed member.
2019-08-23 12:31:14 +02:00
omar
e1fca8d982
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui_internal.h
2019-08-23 12:21:49 +02:00
omar
cb538fadfe
Internals: Storing settings using ImVec2ih to match what we are doing with dock node. + removed ImMax from reading Size value (done in Begin) + removed seemingly unnecessary FLT_MAX compare in SettingsHandlerWindow_WriteAll.
...
About: Added backquote to text copied into clipboard so it doesn't mess up with github formatting when pasted.
2019-08-23 12:02:52 +02:00
omar
3fb5cf3541
Using offsetof() when available in C++11. Avoids Clang sanitizer complaining about old-style macros. ( #94 )
2019-08-22 16:55:42 +02:00
omar
10a202422a
Docking: Extracted some of BeginDocked() into a DockContextBindNodeToWindow() function.
...
Moved one of the undocking blurb to favor fast path.
(Commit intended to have no functional side effects)
2019-08-22 13:51:17 +02:00
omar
27431dcc6b
Docking: fix BeginDocked() path that creates node so that SetNextWindowDockID() doesn't immediately discard the node..( #2109 )
...
Amend 515ecbddc2
, not sure at this point if the (auto_dock_node) flag was needed at all.
Comments. Exposed DockContextGenNodeID() in imgui_internal.h
2019-08-22 13:51:16 +02:00
omar
d8f9f6ba2a
Viewport: Fixed issue where resize grip would display hovered (before of extruded hit rectangle) while mouse is still off the OS bounds so click would miss it and focus the OS window behind expected one. ( #1542 )
2019-08-22 13:51:16 +02:00
omar
c4b0bf718a
More typos in comments ( #2738 )
2019-08-22 11:40:37 +02:00
omar
a856c670c1
TabBar: fixed single-tab not shrinking their width down.
...
+ minor typo fixes (#2738 )
2019-08-22 11:38:58 +02:00
omar
72090b646f
Fixed incorrect assignment of IsFallbackWindow which would tag dock node host windows created in NewFrame() as such, messing with popup viewport inheritance.
2019-08-22 11:35:17 +02:00
omar
aedcd2fb1a
Merge branch 'master' into docking
...
# Conflicts:
# docs/CHANGELOG.txt
# examples/imgui_impl_dx11.cpp
# imgui.cpp
2019-08-19 21:49:53 +02:00
omar
a33cedda14
Internals: Renaming window size calc functions.
2019-08-19 21:48:52 +02:00
omar
76ccbb899d
Viewport: Fix modal/popup window being stuck in unowned hidden viewport associated to fallback window without stealing it back. ( #1542 )
...
Viewport: Fix modal reference viewport when opened outside of another window.
+ Comments
2019-08-19 11:58:30 +02:00
omar
5d87ee8d82
Internals: Added function index for Viewport and Docking. Renamed a few functions.
2019-08-16 15:29:58 +02:00
omar
9fce278918
ColorPicker: Made rendering aware of global style alpha of the picker can be faded out. ( #2711 )
...
Note that some elements won't accurately fade down with the same intensity, and the color wheel when enabled will have small overlap glitches with (style.Alpha < 1.0).
2019-08-16 11:46:11 +02:00
omar
451c756b01
Docking: Modals don't need to set ImGuiViewportFlags_NoFocusOnClick. This also mitigate the common described by #2445 , which becomes particularly bad with unfocused modal. ( #1542 )
2019-08-01 16:23:54 -07:00
omar
3aa9aae0be
Docking: Fix a crash that could occur with a malformed ini file (DockNode Parent value pointing to a missing node)
2019-08-01 15:50:05 -07:00