1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-13 18:50:58 +01:00
Commit Graph

345 Commits

Author SHA1 Message Date
Tracy Ma
8f40020ca6 Disable Win32 clipboard and IME functions when build target UWP (#2892, #2895) 2019-11-15 12:19:44 +01:00
omar
be05e12e21 Misc: Using static_assert() when using C++11, instead of our own construct (avoid zealous Clang warnings). 2019-11-14 18:02:18 +01:00
omar
25eee91542 Error handling: Assert if user mistakenly calls End() instead of EndChild() on a child window. (#1651)
Internals: Moved some error handling code.
2019-11-13 21:51:38 +01:00
omar
6e8e2c0fa9 Scrollbar: Fixed an issue where scrollbars wouldn't display on the frame following a frame where all child window contents would be culled.
Demo: Fixed a small bug with scrolling demo.
Metrics: Tweaks.
2019-11-08 19:01:54 +01:00
omar
57dc34f4e8 TreeNode: Added IsItemToggledOpen() to explicitly query if item was just open/closed, facilitating interactions with custom multi-selections patterns. (#1896, #1861) 2019-11-08 15:30:15 +01:00
omar
011d475532 TreeNode: The collapsing arrow accepts click even if modifier keys are being held, facilitating interactions with multi-select patterns. (#2886, #1896, #1861) 2019-11-08 15:30:15 +01:00
omar
4c13807b7d Misc: Optimized storage of window settings data (reducing allocation count). 2019-11-05 22:43:53 +01:00
omar
3929255b77 Examples: Emscripten: Removed BINARYEN_TRAP_MODE=clamp from Makefile which was removed in Emscripten 1.39.0 but required prior to 1.39.0, making life easier for absolutely no-one. (#2877, #2878) [@podsvirov] 2019-11-05 12:53:30 +01:00
omar
792a8631aa Metrics: Expose basic details of each window key/value state storage. 2019-10-31 14:01:35 +01:00
omar
d62a413476 Misc: Windows: Do not use _wfopen() if IMGUI_DISABLE_WIN32_FUNCTIONS is defined. (#2815) 2019-10-29 21:47:43 +01:00
omar
f002a11898 Backends: OpenGL3: Fix building with pre-3.2 GL bindings which do not expose glDrawElementsBaseVertex(), using runtime GL version to decide if we set ImGuiBackendFlags_RendererHasVtxOffset. (#2866, #2852) [@dpilawa] 2019-10-25 11:56:44 +02:00
Rokas Kupstys
d5b5a81946 GitHub Actions CI script for Windows/Linux/MacOS/iOS/Emscripten builds. 2019-10-24 11:24:54 +02:00
omar
ec0e953cca Fixed a couple of subtle bounding box vertical positioning issues relating to text baseline alignment.
The issue would generally manifest when laying out multiple items on a same line, with varying heights and text baseline offsets. (#2833)
Some specific examples, e.g. a button with regular frame padding followed by another item with a multi-line label and no frame padding, such as: multi-line text, small button, tree node item, etc. The second item was correctly offset to match text baseline, and would interact/display correctly,but it wouldn't push the contents area boundary low enough.
Note: previously the second parameter to ItemSize() was 0.0f was default, now -1.0f to signify "no text baseline offset request". If you have code using ItemSize() with an hardcoded zero you may need to change it. (+1 squashed commits)
2019-10-23 18:05:44 +02:00
Alexey
be9f1e8f00 ColorPicker: Fixed SV triangle gradient to block (broken in 1.73). (#2864, #2711). [@lewa-j] 2019-10-23 00:43:40 +02:00
omar
23c1ff4907 Removed redirecting functions/enums names that were marked obsolete in 1.52 (October 2017).
- Begin() [old 5 args version]     -> use Begin() [3 args], use SetNextWindowSize() SetNextWindowBgAlpha() if needed
- IsRootWindowOrAnyChildHovered()  -> use IsWindowHovered(ImGuiHoveredFlags_RootAndChildWindows)
- AlignFirstTextHeightToWidgets()  -> use AlignTextToFramePadding();
- SetNextWindowPosCenter()         -> use SetNextWindowPos() with a pivot of (0.5f, 0.5f)
- ImFont::Glyph                    -> use ImFontGlyph
If you were still using the old names, read "API Breaking Changes" section of imgui.cpp to find out the new names or equivalent features, or see how they were implemented until 1.73.
2019-10-22 14:45:11 +02:00
omar
6ffee0e75e Backends: DX12: Added extra ID3D12DescriptorHeap parameter to ImGui_ImplDX12_Init() function. The value is unused in master branch but will be used by the multi-viewport features (docking branch). (#2851)
+ Using SafeRelease() in master.
2019-10-18 18:32:48 +02:00
omar
eedc8f993f Examples: DX12: Using IDXGIDebug1::ReportLiveObjects() when DX12_ENABLE_DEBUG_LAYER is enabled. 2019-10-18 18:20:53 +02:00
malte-v
4de32cc87e Backends: GLFW: Restore previously installed user callbacks in ImplGlfw when ImGui shuts down (#2836) 2019-10-18 16:27:40 +02:00
omar
5fc427a49e Improved and moved FAQ to docs/FAQ.md so it can be readable on the web. (#2848) 2019-10-16 11:04:00 +02:00
omar
a41f0b2df4 Inputs: Fixed a miscalculation in the keyboard/mouse "typematic" repeat delay/rate calculation, used by keys and e.g. repeating mouse buttons as well as the GetKeyPressedAmount() function.
IMPORTANT: Renamed internal CalcTypematicPressedRepeatAmount to CalcTypematicRepeatAmount and reordered the t1, t0 arguments to t0, t1 !!
If you were using a non-default value for io.KeyRepeatRate (previous default was 0.250), you can add +io.KeyRepeatDelay to it to compensate for the fix.  The function was triggering on: 0.0 and (delay+rate*N) where (N>=1). Fixed formula responds to (N>=0).
Effectively it made io.KeyRepeatRate behave like it was set to (io.KeyRepeatRate + io.KeyRepeatDelay).
Fixed the code and altered default io.KeyRepeatRate,Delay from 0.250,0.050 to 0.300,0.050 to compensate.
If you never altered io.KeyRepeatRate nor used GetKeyPressedAmount() this won't affect you.
2019-10-14 23:07:06 +02:00
omar
aeb6481499 InputText: Filter out Ascii 127 (DEL) emitted by low-level OSX layer, as we are using the Key value. (#2578) 2019-10-12 14:27:37 +02:00
omar
fc10ba8d24 Amend f0238ece9c (#2817, #2818) 2019-10-11 14:20:04 +02:00
omar
bf746c4215 DragScalar, SliderScalar, InputScalar: Added p_ prefix to parameter that are pointers to the datato clarify how they are used, and more comments redirecting to the demo code. (#2844) 2019-10-11 12:04:28 +02:00
omar
3b271b1847 Demo: Added simple item reordering demo in Widgets -> Drag and Drop section. (#2823, #143) [@rokups] 2019-10-07 17:52:31 +02:00
omar
ee3373d067 TreeNode: Fixed combination of ImGuiTreeNodeFlags_SpanFullWidth and ImGuiTreeNodeFlags_OpenOnArrow incorrectly locating the arrow hit position to the left of the frame. (#2451, #2438, #1897) 2019-10-04 19:21:29 +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
c262276988 Version 1.74 WIP 2019-09-30 14:27:56 +02:00
omar
d5efe16157 Version 1.73 2019-09-24 17:02:26 +02:00
omar
664f9e76b9 Documentation: Various tweaks and improvements to the README page. [@ker0chan] 2019-09-24 15:46:08 +02:00
goran-w
e100523917 CollapsingHeader: Added support for ImGuiTreeNodeFlags_Bullet and ImGuiTreeNodeFlags_Leaf on framed nodes. (#2159, #2160)
The Bullet and Leaf ImGuiTreeNodeFlags are now taken into account for Framed/CollapsingHeader tree nodes as well. TreeNodeEx() can be used to specify these flags. A choice was made to left-adjust the Framed text when no Bullet/Arrow is rendered, since this was deemed to look better in the Framed context (especially when considering that CollapsingHeader is drawn using NoTreePushOnOpen, so child/sibling Text items etc will often be non-indented).
2019-09-24 12:48:49 +02:00
omar
ca858c084b Demo tweaks. Comments. Compacting the rarely used AutoFitXXX fields in ImGuiWindowTempData. 2019-09-23 20:15:25 +02:00
omar
25849234f6 Internal: Tree: tweaks (initially tried to implement auto-scrolling, stashed) 2019-09-23 13:11:38 +02:00
omar
97691643b7 Backends: OpenGL3: Attempt to automatically detect default GL loader by using __has_include. Followup to 44cd8e3 (#2798) 2019-09-22 23:19:04 +02:00
omar
f47a0a85cc ImVector: added find, find_erase, find_erase_unsorted helpers. 2019-09-22 19:06:20 +02:00
omar
eab03f4467 Selectable: Added ImGuiSelectableFlags_AllowItemOverlap flag in public api (was previously internal only). 2019-09-22 19:03:51 +02:00
omar
f7468d05fe Fixed mouse event forwarding in macos example (#2710, #1961) 2019-09-20 15:48:51 +02:00
omar
38d22bc47d ColorPicker / ColorEdit: restore Hue when zeroing Saturation. (#2722, #2770) - changelog, fixed uninitialized variables, tweaks, renaming. 2019-09-20 15:31:39 +02:00
omar
9d02ed51e3 TreeNode: Added ImGuiTreeNodeFlags_SpanAvailWidth and ImGuiTreeNodeFlags_SpanFullWidth flags (#2451, #2438, #1897)
Added demo bits.
2019-09-18 17:13:41 +02:00
omar
098591fe4c ImDrawListSplitter: fixed an issue merging channels if the last submitted draw command used a different texture. (#2506) 2019-09-17 20:27:15 +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
57623c15dd Font: Narrow ellipsis: various minor stylistic tweaks (#2775) 2019-09-17 11:13:34 +02:00
omar
3dcf323c35 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)
2019-09-16 19:15:43 +02:00
omar
b05f6f6f50 Nav, Scrolling: Added support for Home/End key. (#787) 2019-09-16 19:01:40 +02:00
Bagrat Dabaghyan
3cf519c9cb Fix DragScalar for unsigned types (#2780)
decreasing the value was broken on arm64
2019-09-16 19:01:39 +02:00
omar
cc288e073c Backends: OpenGL3: Tweaked initialization code allow application calling ImGui_ImplOpenGL3_CreateFontsTexture() before ImGui_ImplOpenGL3_NewFrame() if for some reason they wanted. 2019-09-16 12:08:40 +02:00
omar
0537ac005f ColorEdit: Disable Hue edit when Saturation==0 instead of letting Hue values jump around. 2019-08-30 20:33:35 +02:00
omar
b59ec7b9b7 DragInt, DragFloat, DragScalar: Using (v_min > v_max) allows locking any edit to the value. 2019-08-30 20:30:21 +02:00
omar
3f99890f40 TabBar: feed desired width (sum of unclipped tabs width) into layout system to allow for auto-resize. (#2768)
Before 1.71 tab bars fed the sum of current width which created feedback loops in certain situations. Amend f95c77eeea.
2019-08-29 14:57:34 +02:00
omar
f8d3d8d7f5 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. 2019-08-29 12:21:09 +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