835b50b773
Internals: Nav: Tweak NavUpdatePageUpPageDown() to make it more readable.
omar2019-07-22 17:27:41 -07:00
363d33f64e
Increased IMGUI_VERSION_NUM to facilitate transition of OSX clipboard support for framework using/embedding any version of imgui. Amend 29d9394. (#2546)
omar2019-07-22 10:23:27 -07:00
cbd5a21fb0
Backends: DX10/DX11: Backup, clear and restore Geometry Shader is any is bound when calling renderer. Backends: DX11: Clear Hull Shader, Domain Shader, Compute Shader before rendering. Not backing/restoring them.
omar2019-07-21 19:26:13 -07:00
29d9394a41
OSX: Disabled default native Mac clipboard copy/paste implementation in core library (added in 1.71), because it needs application to be linked with '-framework ApplicationServices'. It can be explicitly enabled back by using '#define IMGUI_ENABLE_OSX_DEFAULT_CLIPBOARD_FUNCTIONS' in imconfig.h. Re-added equivalent using NSPasteboard api in the imgui_impl_osx.mm experimental back-end. (#2546)
omar2019-07-21 19:06:07 -07:00
0f86116a69
Adding an ImGuiKey 'ImGuiKey_EnterSecondary' to support platforms that differentiate the enter (return key) and the numpad enter key.
Aaron Cooperandomar2019-07-18 17:24:56 -07:00
4b44f25c9a
Fixed incorrect application of io.DisplaySafeAreaPadding which would be problematic with multi-viewports when a monitor uses negative coordinates (correct clamping is done right below). (#2674)
omar2019-07-21 18:19:56 -07:00
f1ba217a92
Internals: Extracted some code out of the NewFrame() function.
omar2019-07-21 12:13:44 -07:00
c37f21788f
Columns: Made GetColumnOffset() and GetColumnWidth() behave when there's no column set, consistently with other column functions + fixed Columns demo (#2683)
omar2019-07-21 11:23:15 -07:00
b443bc0a64
Columns: Improved honoring alignment with various values of ItemSpacing.x and WindowPadding.x. (#125, #2666)
omar2019-07-19 14:22:33 -07:00
4abc2a82e0
Columns: Made the right-most edge reaches up to the clipping rectangle (removing WindowPadding.x*0.5 worth of asymmetrical/extraneous padding). (#125, #2666) + Moved a few things in BeginColumns().
omar2019-07-19 13:28:40 -07:00
493795cdd1
Columns: Fix support for BeginColumns() with a count of 1 (not that this isn't available via the old Columns() api). Tweaked Demo to facilitate testing for it.
omar2019-07-19 12:11:00 -07:00
047dc16af5
Debug Tools: Added DebugStartItemPicker() in imgui_internal.h to facilitate binding this anywhere in user's tool. Adedd highlight. Added IMGUI_DEBUG_TOOL_ITEM_PICKER_EX to break in ItemAdd().
ocornut2019-07-19 10:48:22 -07:00
44336950e9
Revert "Columns: Improved honoring left-most and right-most alignment with various values of ItemSpacing.x and WindowPadding.x. In particular, the right-most edge now reaches up to the clipping rectangle while ensuring that the right-most column clipping width matches others. (#125, #2666)"
omar2019-07-19 11:22:39 -07:00
6c16ba6490
Columns: Improved honoring left-most and right-most alignment with various values of ItemSpacing.x and WindowPadding.x. In particular, the right-most edge now reaches up to the clipping rectangle while ensuring that the right-most column clipping width matches others. (#125, #2666)
omar2019-07-17 18:40:48 -07:00
e28d20c3e2
Columns: Fixed a regression from 1.71 where the right-side of the contents rectangle within each column would wrongly use a WindowPadding.x instead of ItemSpacing.x like it always did. (#125, #2666)
omar2019-07-17 17:09:47 -07:00
61c7f0194e
Misc: Made Button(), ColorButton() not trigger an "edited" event leading to IsItemDeactivatedAfterEdit() returning true. This also effectively make ColorEdit4() not incorrect trigger IsItemDeactivatedAfterEdit() when clicking the color button to open the picker popup. (#1875) Demo: Added Button with repeater and InputFloat with +/- button to the status query test demo.
omar2019-07-17 15:11:52 -07:00
1f3feb481e
Internals: Refactor: Moved all Columns code from imgui.cpp to imgui_widgets.cpp (#125) Also moved NextColumn between BeginColumn and NextColumn which makes it easier to work on that code.
omar2019-07-17 14:02:45 -07:00
ea79992d9a
Fixed old SetWindowFontScale() api value from not being inherited by child window. Added comments about the right way to scale your UI (load a font at the right side, rebuild atlas, scale style). + Added missing IMGUI_API marker to the EmptyString storage used by ImGuiTextBuffer. (#2672)
omar2019-07-17 09:59:10 -07:00
130b44994e
Debug, Metrics: Added "Tools->Item Picker" tool which allow clicking on a widget to break in the debugger within the item code. The tool calls IM_DEBUG_BREAK() which can be redefined in imconfig.h if needed.
omar2019-07-16 18:25:49 -07:00
e6a286b3a5
Style: Added style.ColorButtonButton (left/right, defaults to ImGuiDir_Right) to move the color button of ColorEdit3/ColorEdit4 functions to either side of the inputs.
omar2019-07-16 16:43:21 -07:00
a35f42f123
Removed TreeAdvanceToLabelPos() which is rarely used and only does SetCursorPosX(GetCursorPosX() + GetTreeNodeToLabelSpacing()). Kept redirection function (will obsolete). (#581, #324)
omar2019-07-15 18:14:14 -07:00
3d07c7cbe4
TabBar: Fixed unfocused tab bar separator color (was using ImGuiCol_Tab, should use ImGuiCol_TabUnfocusedActive).
omar2019-07-15 17:56:20 -07:00
7a9d32acee
Fixed unnecessary test in UpdateMouseWheel() (thanks PVS). TreeNodeBehavior: avoid computing bg_col for non-framed non-active tree nodes. Comments, binaries update, minor typos.
omar2019-07-14 18:01:06 -07:00
e461e7bc7a
Moved ImGuiColumnsFlags erroneously forward declared in imgui.h + demo bit.
omar2019-07-14 12:28:42 -07:00
71d20abbc3
Settings: Minor optimization to reduce calls in SettingsHandlerWindow_WriteAll.
omar2019-07-12 13:33:24 +02:00
e66799f79a
Prefixed internal structs exposed in imgui.h with a fully qualified name to facilitate auto-generation with cimgui.
omar2019-07-12 11:54:22 +02:00
3436132d4b
Combo: Hide arrow when there's not enough space even for the square button. + Various todo items.
omar2019-07-11 17:20:39 +02:00
d23f1b1409
fonts/binary_to_compress: display error message when failing to open file + misc comments.
omar2019-07-10 11:36:43 +02:00
54c49b5fb1
Window: Mouse wheel scrolling while hovering a child window is automatically forwarded to parent window if ScrollMax is zero on the scrolling axis. Also still case if ImGuiWindowFlags_NoScrollWithMouse is set (not new), but previously the forwarding would be disabled if ImGuiWindowFlags_NoScrollbar was set on the child window, which is not the case any more (amend #1502, #1380).
omar2019-07-02 18:28:53 +02:00
e16564e67a
Scrollbar: Avoid overlapping the opposite side when window (often a child window) is forcibly too small.
omar2019-07-01 20:57:15 +02:00
58c9f8a194
Misc: Added IMGUI_DISABLE_METRICS_WINDOW imconfig.h setting to explicitly compile out ShowMetricsWindow(). + Internals: Minor renaming.
omar2019-07-01 18:48:21 +02:00
caf119a982
Added 'SetScrollHereX' and 'SetScrollFromPosX' (#1580)
kevrecoandomar2018-01-30 21:51:28 +01:00
2a3517a399
Internals: Checkbox: Added undocumented mixed/indeterminate/tristate support via ImGuiItemFlags_MixedValue. (#2644)
omar2019-06-30 12:03:09 +02:00
a89f05a10e
Child windows inherit Hidden frames setting from parent more accurately, so HiddenFramesCannotSkipItems is honored by child windows.
omar2019-06-27 16:35:56 +02:00
401e05147c
Internals: Moved CalcListClipping close to ImGuiListClipper code (no-op)
omar2019-06-29 18:55:06 +02:00
82711251b6
Internals: ImGuiListClipper using absolute coordinate (instead of relative one). Minor no-op tweaks + ImDrawListSplitter assert
omar2019-06-27 18:03:19 +02:00
1dd322c6fb
Style: Attenuated default opacity of ImGuiCol_Separator in Classic and Light styles.
omar2019-06-27 12:20:18 +02:00
4b95e7c2f3
Doc: Tweak and extra mention of AddCustomRectFontGlyph + made the example register two rectangles.
omar2019-06-26 12:15:32 +02:00
eb3e271c24
Demo: Using ImVec2(-FLT_MIN,0.0f) instead of ImVec2(-1.0f,0.0f) where it makes sense. (#2449)
omar2019-06-21 19:38:33 +02:00
41e2d4b5ae
ImDrawListSplitter: Fixed memory leak when using low-level split api (was not affecting ImDrawList api, also this type was added in 1.71 and not advertised as a public-facing feature).
omar2019-06-20 16:09:31 +02:00
f563e1a504
Internals: Renamed GetFrontMostPopupModal() to GetTopMostPopupModal() to be consistent. Renamed other locals to follow that terminology.
omar2019-06-19 18:14:24 +02:00
dd41df3e98
Word-wrapping: Fixed overzealous word-wrapping when glyph edge lands exactly on the limit. Because of this, auto-fitting exactly unwrapped text would make it wrap. (fixes initial 1.15 commit, 78645a7d).
omar2019-06-18 12:50:34 +02:00
516c3dee80
Examples: SDL+DX11: Changelog, readme, batch files, fixed vcxproj, minor stylistic fixes + minor sync of other main.cpp files. (#2632)
omar2019-06-18 11:28:26 +02:00
ae2c9f7101
Internals: Columns: Poke into WorkRect and use them in the GetContentRegionMax() functions. This should be a no-op, but preparing us to transition toward using WorkRect instead of ContentRegionRect. Removed one use of ContentsRegionRect.
omar2019-06-10 21:43:05 +02:00
e9b92d1cef
Disable -Wpragmas warning in GCC to avoid relying on version checks, as unusual/forks/mods don't appear to always have same warning<>version. (#2618) + Fix version number in imgui.h
omar2019-06-17 11:32:00 +02:00
b82e99c032
ImDrawList: Fixed CloneOutput() helper crashing. Also removed unnecessary risk from ImDrawList::Clear(), draw lists are being clear before use each frame anyway. (#1860)
omar2019-06-17 11:06:36 +02:00
2645a2516f
ImDrawList::ChannelsSplit(), ImDrawListSlitter: Fixed an issue with merging draw commands between channels 0 and 1. (#2624) Introduced by cef88f6aae.
omar2019-06-14 12:06:15 +02:00
af3080b81b
Removed redirecting functions/enums that were obsoleted in version 1.51 (June 2017): ImGuiCol_Column*, ImGuiSetCond_*, IsItemHoveredRect(), IsPosHoveringAnyWindow(), IsMouseHoveringAnyWindow(), IsMouseHoveringWindow(), IMGUI_ONCE_UPON_A_FRAME.
omar2019-06-14 11:57:33 +02:00
5286ecb8a7
Version 1.72 WIP
omar2019-06-14 11:58:45 +02:00
2da1c66d15
Version 1.71 + comments
omar2019-06-12 16:15:08 +02:00
5ae268c0a3
Internals: Reworked RenderTextEllipsis() to satisfy what we need for table headers.
omar2019-06-11 16:12:00 +02:00
c3a348aa25
CollapsingHeader: Minor fix to align right side of frames (which is extruded past the Work/Contents rect) with clipping rectangle.
omar2019-06-11 15:52:36 +02:00
a8eb64fc54
Log/Capture: Fixed BeginTabItem() label not being included in a text log/capture. Extracted tab rendering code into a RenderTextEllipsis() function.
omar2019-06-11 14:02:46 +02:00
a9b5c834b6
ImDrawListSplitter: Don't merge draw commands when crossing a VtxOffset boundary + Renamed fields ImDrawChannels to consistently suggest those are internal structures.
omar2019-06-10 15:41:04 +02:00
0770449630
Window: child windows outer decorations (e.g. scrollbar) are rendered as part of their parent window, avoiding the creation of an extraneous draw command. + Metrics: inverted color of clip rect vs vertices bounding box when hovering a draw command, so the color matches the per-vertex preview.
omar2019-05-10 17:24:22 +02:00
afa3978ff6
Internals: Added drawlist and color arg to RenderArrow(), RenderBullet(). Reordered args for RenderPixelEllipsis.
omar2019-05-20 11:45:32 +02:00
32ab0a82d6
imgui-test: Added IMGUI_TEST_ENGINE_LOG macro to emit into test log from core or user land.
omar2019-06-06 17:54:25 +02:00
2b997141cf
Made PushID() behave the same in 32-bit and 64-bit, by not padding the integer into a void*. (Also technically faster.)
omar2019-06-06 16:36:26 +02:00
431aa4e456
Synced/merged minor cruft from docking branch to minimize drift. AFAIK the only meaningful no-op change is that the call UpdateHoveredWindowAndCaptureFlags() was moved above UpdateMouseMovingNewFrame() to match what docking branch has been doing for a while.
omar2019-06-06 16:13:30 +02:00
fea5f70611
ImDrawCallback: Allow to override the signature of ImDrawCallback by #define-ing it. This is meant to facilitate custom rendering back-ends passing local render-specific data to the draw callback.
omar2019-06-06 00:20:29 +02:00
480d57e6a2
Revert "Changed syntax for (very rarely used) IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT mechanism, instead you only need to '#define ImDrawVert MyDrawVert' to use this feature, avoiding the need to declare the entire structure within an awkward macro. Using the old macro will now error with a message pointing you to the new method. (#38, #103, #1172, #1231, #2489)"
omar2019-06-06 00:59:07 +02:00
597c024904
Changed syntax for (very rarely used) IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT mechanism, instead you only need to '#define ImDrawVert MyDrawVert' to use this feature, avoiding the need to declare the entire structure within an awkward macro. Using the old macro will now error with a message pointing you to the new method. (#38, #103, #1172, #1231, #2489)
omar2019-06-06 00:42:27 +02:00
c96f2c4057
Window: Fixed one case where auto-resize by double-clicking the resize grip would make either scrollbar appear for a single frame after the resize. Moved Scrollbar visibility block.
omar2019-06-05 15:33:41 +02:00
300d8dd656
Internals: Moved scrollbar visibility calculation block below the call to UpdateManualResize(). This commit is _intended_ to have no side-effect (next commit will). Also moved ItemWidthDefault calculation below rectangles.
omar2019-06-05 15:32:37 +02:00
c1a61d25a7
Scrollbar overlap an extra WindowBorderSize amount on the left to make all distances consistent. Reverted to BorderSize not affecting work/contents rectangles. Scrollbar, Style: Changed default style.ScrollbarSize from 16 to 14.
omar2019-06-05 15:23:01 +02:00
15282261dd
Internals: Minor no-op tidying up toward solving the WindowPadding / WindowBorderSize / ScrollbarSize overlapping mess. + Demo: Use SetScrollY().
omar2019-06-04 16:22:47 +02:00
4149d22e85
Fixed newly created window (e.g. appearing child window) from having scrollbar active on the first frame. (fix 6e03b27) + reworded code a little. (+1 squashed commits) Fixed auto-resize with AlwaysVerticalScrollbar or AlwaysHorizontalScrollbar flags not taking account of the expect scrollbar sizes.
omar2019-06-03 19:25:03 +02:00
06f1d2c101
Internals: Storing ScrollMax into a member. Mostly to facilitate debugging. Also locking down window->Scroll slightly lower in the Begin function.
omar2019-06-03 18:51:12 +02:00
d6df777ff2
TextWrapped, PushTextWrapPos(0.0f) within a window with horizontal scrolling from not covering the full horizontal area (previously only worked with an explicit contents size).
omar2019-06-03 17:07:43 +02:00
fe32fde376
Internals: Renamed SizeContents to ContentSize, SizeContentsExplicit to ContentSizeExplicit. Tweaked Metrics->Show Rectangles functionality.
omar2019-06-03 16:55:48 +02:00
f95c77eeea
Window rectangles: Changed WorkRect to cover the whole region including scrolling (toward obsolete ContentsRegionRect) + using full WindowPadding*1 padding. Tweaked InnerClipRect. TreeNode, CollapsingHeader: Fixed highlight frame not covering horizontal area fully when using horizontal scrolling. (#2211, #2579) TabBar: Fixed BeginTabBar() within a window with horizontal scrolling from creating a feedback loop with the horizontal contents size. Columns: Fixed Columns() within a window with horizontal scrolling from not covering the full horizontal area (previously only worked with an explicit contents size). (#125) Demo: Added demo code to test contentsrect/workrect
omar2019-05-28 21:49:22 +02:00
a0994d74c2
Clarified behavior of SetNextWindowContentSize(). Content size is defined as the size available after removal of WindowPadding on each sides. So SetNextWindowContentSize(ImVec2(100,100)) + auto-resize will always allow submitting a 100x100 item without creating a scrollbar, regarding of WindowPadding.The exact meaning of ContentSize for decorated windows was previously ill-defined.
omar2019-06-03 15:35:55 +02:00
09bcf9fbc5
Window rectangles: Made InnerRect not affected by window border sizes. its few users shouldn't be meaningfully affected.
omar2019-05-28 16:18:30 +02:00
b9874a2423
Comments about obsoleted features version. Todo. Clarify tab bar initial offset (useful if we decide to remove the half-windowpadding clip margin).
omar2019-06-05 12:05:53 +02:00
57d8ab62f4
Nav: Fixed rare crash when e.g. releasing Alt-key while focusing a window with a menu at the same frame as clearing the focus. This was in most noticeable in some back-ends with emits key release events when focusing another viewport. (#2609)
omar2019-06-05 00:25:21 +02:00
6614bab883
Combo: Fixed rounding not applying with the ImGuiComboFlags_NoArrowButton flag. (#2606, #2607)
DucaRiiandomar2019-06-04 16:37:45 +02:00
eb7849b477
Nav: Fixed gamepad/keyboard moving of window affecting contents size incorrectly, sometimes leading to scrollbars appearing during the movement. + minor fix with the mostly dead Ctrl+wheel scaling.
omar2019-05-31 20:48:52 +02:00
cef88f6aae
ImDrawListSplitter: Support merging consecutive draw commands straddling two channels. Support zero-init.
omar2019-05-10 18:50:59 +02:00
f1f4b42d91
ImDrawListSplitter: extracted out of ImDrawList. Down the line we may obsolete the ImDrawList functions and encourage users to store the splitter aside, in the meanwhile ImDrawList holds a splitter. (This will allow columns/table to recurse.)
omar2019-05-31 12:00:00 +02:00
8abf1313aa
ImDrawList: Fix broken channel splitting (another issue when the first channel is empty) (#2591) + fixed warnings with newer VS
omar2019-05-31 11:35:42 +02:00
546b728199
Internals: Window rectangles: Fixed ContentsRegion lag by moving back after Scrollbar, fixes b50c61c9. Shuffling setup order and added comments.
omar2019-05-28 16:00:34 +02:00
21ebdcafc9
Internals: Window rectangles: Renaming of all rectangles toward their final form. Should be a no-op. Renamed GetWorkRectMax() to GetContentRegionMaxAbs(). Metrics shows SizeContents.
omar2019-05-28 15:54:55 +02:00
c3d600abed
Fixed imgui_impl_opengl3 broken in previous few commits. (#2591, #2593, #2594)
omar2019-05-30 16:45:59 +02:00
ed79b4d22e
Examples/Backends: Metal: Added support for large meshes (64k+ vertices) with 16-bits indices, enable 'ImGuiBackendFlags_HasVtxOffset' config flag in back-end. (#2591, #2592)
Max Thrunandomar2019-05-29 10:35:41 -07:00
7755cbbef2
Renamed ImGuiBackendFlags_HasVtxOffset to ImGuiBackendFlags_RendererHasVtxOffset to match naming convention already used in viewport/docking branch. (#2591) + Fix OpenGL3 code missing flag.
omar2019-05-29 16:29:17 +02:00
b3dd03f582
Examples/Backends: DirectX9/10/11/12, Vulkan, OpenGL3 (Desktop GL only): Added support for large meshes (64k+ vertices) with 16-bits indices, enable 'ImGuiBackendFlags_HasVtxOffset' config flag in back-end. (#2591)
omar2019-05-29 15:53:36 +02:00
d1e8b698d0
ImDrawList: Added ImDrawCmd::VtxOffset value to support large meshes (64k+ vertices) using 16-bits indices. To enable the feature, the renderer back-end needs to set 'io.BackendFlags |= ImGuiBackendFlags_HasVtxOffset' and honor the ImDrawCmd::VtxOffset field. Otherwise the value will always be zero. This has the advantage of preserving smaller index buffers and allowing to execute on hardware that do not support 32-bits indices. ImDrawList: Added ImDrawCmd::IdxOffset value, equivalent to summing element count for each draw command. This is provided for convenience and consistency with VtxOffset. (#2591)
omar2019-05-29 15:25:53 +02:00
40b9e5e0b4
ImDrawList: Store initial flags for the frame in ImDrawListSharedData, reducing code duplication in setting up the flags.
omar2019-05-29 12:52:29 +02:00
cb7ba60d3f
CollapsingHeader: When a close button is enabled, better clip the label to avoid overlap. (#600)
omar2019-05-28 21:22:18 +02:00