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
Rokas Kupstys
accb0261b8
ColorPicker / ColorEdit: restore Hue when zeroing Saturation. ( #2722 , #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.
2019-09-20 15:31:15 +02:00
omar
74e01e62ce
Fixed unused static function warning for some compilers. ( #2793 )
2019-09-18 13:21:12 +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
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
omar
b05f6f6f50
Nav, Scrolling: Added support for Home/End key. ( #787 )
2019-09-16 19:01:40 +02:00
omar
c077dd4872
Fixed missing IMGUI_API for IsMouseDragPastThreshold().
2019-08-31 19:59:51 +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
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
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
f624455d7b
Version 1.73 WIP
2019-08-01 10:57:13 -07:00
omar
9bd7846f07
Internal: Made ScrollToBringRectIntoView() handle recursing back to scroll parent window, so the function can be called elsewhere (instead of 1 deep recursion done in NavUpdateMoveResult().
2019-07-31 18:37:55 -07:00
omar
6a0d0dab5a
Version 1.72b (patch for nav)
2019-07-31 14:31:06 -07:00
omar
27079e68c2
Nav: Made hovering non-MenuItem Selectable not re-assign the source item for keyboard navigation.
2019-07-31 14:31:06 -07:00
omar
4cfaf7d89c
Scrolling, Nav: Fixed programmatic scroll leading to a slightly incorrect scroll offset when the window has decorations or a menu-bar (broken in 1.71). This was mostly noticeable when a keyboard/gamepad movement led to scrolling the view, or using e.g. SetScrollHereY() function. Fix/amend a0994d74
.
2019-07-31 14:31:06 -07:00
omar
3548fb8013
Internal refactor: moved all Scroll related functions in a same spot.
2019-07-30 20:04:02 -07:00
omar
1b1e539288
Internal: Moved NavScrollToBringItemIntoView() declaration to imgui_internal.h. Fixed spacing missing in 494d804
. Fixed changelog wreck from 1.72.
2019-07-30 18:21:44 -07:00
omar
494d804735
Internal: Added ImGuiInputTextState::ClearText() helper.
2019-07-30 15:02:40 -07:00
omar
9183e7c426
Version 1.73 WIP
2019-07-29 15:54:32 -07:00
omar
ecb9b1e2eb
Version 1.72
2019-07-27 18:15:07 -07:00
omar
7a26a49f08
Internal: Added IsMouseDragPastThreshold(). Tweaks. Todo.
...
Demo: Showing how to use the format parameter of Slider/Drag functions to display the name of an enum value instead of the underlying integer value
2019-07-26 17:19:01 -07:00
omar
824e8c53b4
Internals: Added IMGUI_DEBUG_INI_SETTINGS. Made IMGUI_DEBUG_LOG redefinable in imconfig.h. Comments. Fix to allow Metrics's NodeWindow() being called with a NULL window.
2019-07-23 21:37:09 -07:00
omar
baae057a03
Internals: Merge in minor noise from wip Tables branch to simplify further merging.
2019-07-23 13:28:36 -07:00
omar
26f14e056c
Scrolling: Made mouse-wheel scrolling lock the underlying window until the mouse is moved again or until a short delay expires (2 seconds). This allow uninterrupted scroll even if child windows are passing under the mouse cursor. ( #2604 )
2019-07-22 18:49:52 -07:00
omar
dcd03f62a7
Scrolling: Made it possible for mouse wheel and navigation-triggered scrolling to override a call to SetScrollX()/SetScrollY(), making it possible to use a simpler stateless pattern for auto-scrolling.
...
Demo: Log, Console: Using a simpler stateless pattern for auto-scrolling.
2019-07-22 18:49:51 -07:00
ocornut
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().
2019-07-19 11:28:03 -07:00
omar
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.
2019-07-17 17:10:27 -07:00
omar
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 )
2019-07-17 10:01:49 -07:00
omar
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.
2019-07-16 18:25:49 -07:00
omar
e461e7bc7a
Moved ImGuiColumnsFlags erroneously forward declared in imgui.h + demo bit.
2019-07-14 12:29:23 -07:00
omar
2a3517a399
Internals: Checkbox: Added undocumented mixed/indeterminate/tristate support via ImGuiItemFlags_MixedValue. ( #2644 )
2019-06-30 12:03:09 +02:00
omar
f563e1a504
Internals: Renamed GetFrontMostPopupModal() to GetTopMostPopupModal() to be consistent. Renamed other locals to follow that terminology.
2019-06-19 18:16:38 +02:00
omar
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.
2019-06-17 12:14:34 +02:00
omar
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
2019-06-17 11:32:00 +02:00
omar
5286ecb8a7
Version 1.72 WIP
2019-06-14 11:58:58 +02:00
omar
2da1c66d15
Version 1.71 + comments
2019-06-12 18:30:06 +02:00
omar
4597632662
Readme, comments, dear imgui prefixes
2019-06-11 16:11:36 +02:00
omar
a8eb64fc54
Log/Capture: Fixed BeginTabItem() label not being included in a text log/capture.
...
Extracted tab rendering code into a RenderTextEllipsis() function.
2019-06-11 14:03:13 +02:00
omar
afa3978ff6
Internals: Added drawlist and color arg to RenderArrow(), RenderBullet(). Reordered args for RenderPixelEllipsis.
2019-06-07 17:32:51 +02:00
omar
32ab0a82d6
imgui-test: Added IMGUI_TEST_ENGINE_LOG macro to emit into test log from core or user land.
2019-06-07 13:46:54 +02:00
omar
2b997141cf
Made PushID() behave the same in 32-bit and 64-bit, by not padding the integer into a void*. (Also technically faster.)
2019-06-06 16:36:26 +02:00
omar
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.
2019-06-06 16:13:30 +02:00
omar
06f1d2c101
Internals: Storing ScrollMax into a member. Mostly to facilitate debugging. Also locking down window->Scroll slightly lower in the Begin function.
2019-06-05 15:59:13 +02:00
omar
fe32fde376
Internals: Renamed SizeContents to ContentSize, SizeContentsExplicit to ContentSizeExplicit. Tweaked Metrics->Show Rectangles functionality.
2019-06-05 15:59:13 +02:00
omar
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
2019-06-05 15:59:13 +02:00
omar
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.
2019-06-05 15:59:13 +02:00
omar
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.
2019-05-31 20:48:52 +02:00
omar
21ebdcafc9
Internals: Window rectangles: Renaming of all rectangles toward their final form. Should be a no-op. Renamed GetWorkRectMax() to GetContentRegionMaxAbs(). Metrics shows SizeContents.
2019-05-30 18:04:21 +02:00
omar
40b9e5e0b4
ImDrawList: Store initial flags for the frame in ImDrawListSharedData, reducing code duplication in setting up the flags.
2019-05-29 14:26:03 +02:00
omar
cb7ba60d3f
CollapsingHeader: When a close button is enabled, better clip the label to avoid overlap. ( #600 )
2019-05-28 21:25:28 +02:00
omar
70d9f79312
Internal: Renamed InnerMainRect to InnerVisibleRect. Printing coordinates in Metrics window.
2019-05-28 11:23:04 +02:00
omar
9c35344175
Comments, todo entries, moved ImGuiSelectableFlagsPrivate in higher ranges to match others.
2019-05-27 16:50:56 +02:00
omar
6c3697f6f1
Internal: CloseButton takes an upper-left corner + a size to be consistent with similar widgets.
2019-05-24 17:58:21 +02:00
omar
ec3ec24157
Internals: Extracted some of the tab bar shrinking code into a ShrinkWidths() function so columns/table can use it.
2019-05-24 14:32:33 +02:00
omar
7bc03f7155
Internals: Added InnerWorkRect equal to old InnerClipRect, added InnerWorkRectClipped actually clipped.
2019-05-22 23:56:31 +02:00
omar
a2eec8f5b5
Fix OuterRectClipped not being clipped correctly, which resulted in child window outside visible bound to not be marked with SkipItems. Broken in b50c61c961
.
...
+ Comments on InnerClipRect being misleading. Demo: Tweak to sizing of child window in the Layout->Scrolling section.
2019-05-22 22:14:31 +02:00
omar
f242cd4d8a
Fixed GCC mem-access warnings ( #2565 )
...
+ using "if defined" more consistently for Clang.
2019-05-19 17:15:14 +02:00
omar
fc3c3de551
Fixed uses of IsItemDeactivated(), IsItemDeactivatedAfterEdit() on multi-components widgets and after EndGroup(). ( #2550 , #1875 )
2019-05-13 19:05:41 +02:00
omar
99a845053a
Internal: Renamed fields + minor tweaks (probably shallow break stack-layout pr, sorry!)
2019-05-13 18:26:28 +02:00
omar
64dbd932d2
Internal: Removed GetNextItemWidth(), relying on ItemAdd or NextItemData.ClearFlags() to clear the width data. Amend 5078fa20
and undo some of its effects of imgui_widgets.cpp
2019-05-13 15:29:00 +02:00
omar
632469d2e5
Renamed SetNextTreeNodeOpen() to SetNextItemOpen(). Refactored SetNextItemXXX stuff to match SetNextWindowXXX code closely.
2019-05-13 15:11:25 +02:00
omar
36e714a459
Internal: Storing flags for NextWindowData so that we can clear everything with a single write and remove dummy condition fields.
2019-05-13 14:57:30 +02:00
omar
0b485f12d7
Internal: Minor tidying/reordering of sections within ImGuiContext / window DC.
2019-05-13 14:02:03 +02:00
omar
37174c85e2
Internal: Scrollbar: Extracted scrollbar code for other uses (eg. table v2 scrolling without using a child window).
2019-05-10 18:52:23 +02:00
omar
e29176df53
Internals: Columns: Renamed fields. Comments and tweak. Moved a demo block.
2019-05-09 13:12:09 +02:00
omar
a4d0b0efa4
Internal: Refactored Separator into SeparatorEx(), exposed ImGuiSeparatorFlags_SpanAllColumns in imgui_internal.h and support without. ( #759 ) + misc comments
2019-05-09 12:55:01 +02:00
omar
b7c2759f95
Columns: Fixed Separator from creating an extraneous draw command. Fixed Selectable with SpanAllColumns flag from creating an extraneous draw command. ( #125 )
2019-05-09 12:10:36 +02:00
omar
42fc563fed
Version 1.71 WIP + fixed minor typo
2019-05-07 16:36:08 +02:00
omar
d1d5075b66
Version 1.70
2019-05-06 14:17:39 +02:00
omar
86f92fe756
Demo: Improved trees in columns demo. ( #2136 )
2019-05-02 21:32:36 +02:00
omar
ce19cb465f
Internals: Rename GetContentRegionMaxScreen() -> GetWorkRectMax(). At this point this is mostly useful to facilitate merge of other branches.
2019-05-02 16:29:40 +02:00
omar
842a720e72
Popups: Closes popup at the time of FocusWindow(). Fixes right-click from closing all popups instead of aiming at the hovered popup level (regression in 1.67's ae76a1fd
).
2019-04-28 22:33:58 +02:00
omar
bda2cde68e
Popups: Closing a popup restores the focused/nav window in place at the time of the popup opening, instead of restoring the window that was in the window stack at the time of the OpenPopup call. ( #2517 )
...
Among other things, this allows opening a popup while no window are focused, and pressing Escape to clear the focus again.
2019-04-28 22:18:51 +02:00
omar
3276b12765
Internals: Added DataTypeApplyOp, DataTypeApplyOpFromText to imgui_internal.h
2019-04-28 20:55:51 +02:00
omar
4e81b2d093
Internals: Renaming. Renamed ImGuiPopupRef to ImGuiPopupData for consistency and added constructor.
2019-04-28 17:15:08 +02:00
omar
3d363c91fd
Internals: Exposed ImGuiDataTypeInfo, DataTypeGetInfo(), DataTypeFormatString(). Comments.
2019-04-28 15:27:18 +02:00
omar
0ca1675ff9
Internals: TempInputText: Rename InputScalarAsWidgetReplacement() -> TempInputTextScalar(), ScalarAsInputTextId -> TempInputTextId, small tidying up in affected functions.
2019-04-25 16:03:47 +02:00
omar
59a3f0476d
Internals: Using more explicit PushOverrideID() helper + renamed equivalent internal tree helper.
2019-04-25 15:21:22 +02:00
omar
6db0766564
Misc comments, internal renaming, added disable indentation option to Columns demo section.
2019-04-24 17:40:07 +02:00
omar
59f012d656
Internals: ImHashStr() default parameter.
2019-04-19 19:48:51 +02:00
omar
5078fa208b
Added SetNextItemWidth() helper to avoid using PushItemWidth/PopItemWidth() for single items.
2019-04-18 18:29:28 +02:00
omar
f355a40367
Added commentary about ContentRegion functions. Added internal GetContentRegionMaxScreen() to facilitate internal code at the moment.
2019-04-18 15:46:13 +02:00
omar
9d4a893a77
Internals: Moved CalcItemSize next to CalcItemWidth, added comments to clarify their respective intent. Should have no side effect.
2019-04-18 15:46:12 +02:00
omar
1aeee9d40f
Internals: Columns: Tweaks, renaming. Metrics: Show rectangles for child windows.
...
Renamed SameLine() first parameter.
2019-04-17 22:12:17 +02:00
omar
742b5f4c68
Merged a bunch of small changes from Docking branch to reduce the difference between branches.
...
Noticeable: horizontal alignment of CloseButton. Menu fill take account of border. Various stylistic tweaks to accomodate other changes in Docking.
2019-04-16 13:07:43 +02:00
omar
311469e9d6
Internals: Columns: Some renaming, extracted code into GetColumnsID().
2019-04-16 11:58:54 +02:00
omar
fb2626c21b
Tests: Added hook/tweaks for imgui-test engine. + Fixed warnings.
2019-04-13 00:29:27 +02:00
omar
ee02cdbf03
Internals, Docs: Added a bunch of clarification about ButtonBehavior in the form of a table (and to facilitate writing tests)
2019-04-12 17:49:40 +02:00
omar
07a70dc972
Internals: Merge minor things from range_select branch. Added ImGuiButtonFlags_NoHoveredOnNav. Added IsItemToggledSelected() - unused here. Renaming.
2019-04-11 15:40:36 +02:00
omar
1391904fd2
Internals: Selectable: Added ImGuiSelectableFlags_AllowItemOverlap in imgui_internal.h (~ #684 , #2341 )
2019-04-08 17:59:25 +02:00
omar
8dab7ac021
InputText: Made Shift+Tab consistently do nothing regardless of whether the back-end emits both char and keys or just keys. ( #2467 , #1336 )
2019-04-03 11:14:34 +02:00
omar
9a0e71a6ec
Internals: Renamed the ImGuiWindow HiddenFrameXXX fields to decorrelate them from resizing behavior, as those values are set by other logic.
2019-03-28 15:41:49 +01:00
omar
221bf93a55
Comments, todo list, remove trailing spaces.
2019-03-17 00:56:21 +01:00
omar
cf2c52282d
Version 1.70 WIP
2019-03-15 13:07:30 +01:00
omar
55c02099c5
Version 1.69, comments, typos
2019-03-13 15:29:43 +01:00
omar
53e0c13be2
TabBar: Reworked scrolling policy (when ImGuiTabBarFlags_FittingPolicyScroll is set) to teleport the view when aiming at a tab far away the visible section, and otherwise accelerate the scrolling speed to cap the scrolling time to 0.3 seconds.
2019-03-12 20:57:02 +01:00
omar
65c2220049
Internal: Removed unused fields from ImGuiMenuColumns.
2019-03-11 20:14:56 +01:00
Bruce Mitchener
b5d57a6615
Fix typos. ( #2413 )
2019-03-09 10:10:17 +01:00
Bruce Mitchener
17c567c3a9
Don't use const qualified parameters in declarations.
...
This fixes warnings from clang-tidy like this:
parameter 'v_max' is const-qualified in the function declaration;
const-qualification of parameters only has an effect in function definitions
Since values (rather than references or pointers) don't need to be
const, they don't need to be marked that way in the function declaration.
2019-03-08 18:21:11 +01:00
Lucas Lazare
ab80ee6453
Added InputTextWithHint() ( #2400 )
...
Squashed commit of the following:
commit 1970d84051
Author: Lucas Lazare <lazarelucas@yahoo.fr>
Date: Tue Mar 5 12:20:39 2019 -0500
Removing sneaky tabulations #2 (why, editor T-T)
I should update my settings, I guess
commit 219bdfcb7f
Author: Lucas Lazare <lazarelucas@yahoo.fr>
Date: Tue Mar 5 12:17:27 2019 -0500
Removing useless check introduced in b0d172
commit 8afd7a2b45
Author: Lucas Lazare <lazarelucas@yahoo.fr>
Date: Tue Mar 5 11:49:24 2019 -0500
Removing sneaky tabulations
commit 8e04908631
Author: Lucas Lazare <lazarelucas@yahoo.fr>
Date: Tue Mar 5 11:45:13 2019 -0500
Moving InputTextHinted code to InputTextEx
commit b0d1723a2f
Author: Lucas Lazare <lazarelucas@yahoo.fr>
Date: Tue Mar 5 00:23:02 2019 -0500
C++11 to C++98
commit 9afeae3998
Author: Lucas Lazare <lazarelucas@yahoo.fr>
Date: Mon Mar 4 23:43:28 2019 -0500
Added InputTextHinted
2019-03-06 17:33:05 +01:00
omar
26328fc9fe
Internal: Tabbing/Focus: Tidying up old code, moved some state to context instead of window. Storing new data will allow us to fix the bug mentioned in #2215 (probably in next commit).
2019-03-05 19:51:27 +01:00
omar
ce4e62649a
Internal: Tabbing: Tweaks to FocusableItemRegister and using the standard mechanism to allow/block Tab being interpreting by tabbing instead of InputText() widget.
2019-03-05 18:24:59 +01:00
omar
1ed3c4cf4a
Internal: Text: Extracted TextUnformatted into TextEx over which we can freely atter the signature. Clarified current large text behavior of TextUnformatted with explicit ImGuiTextFlags_NoWidthForLargeClippedText flag (always set).
2019-03-05 17:35:45 +01:00
omar
94e794f81b
Renamed GetOverlayDrawList() to GetForegroundDrawList() for consistency. Kept redirection function (will obsolete). ( #2391 )
...
Demo: Using GetBackgroundDrawList() and GetForegroundDrawList() in "Custom Rendering" demo.
2019-03-04 16:35:50 +01:00
omar
96b13760d4
Added GetBackgroundDrawList() helper to quickly get access to a ImDrawList that will be rendered behind every other windows. ( #2391 )
2019-03-04 16:10:51 +01:00
omar
f02705fbaa
InputInt, InputScalar: +/- buttons now respects the natural type limits instead of overflowing or underflowing the value.
2019-02-27 18:59:17 +01:00
omar
cf3cb7cf7e
InputText: Fixed various display corruption related to swapping the underlying buffer while a input widget is active (both for writable and read-only paths). Often they would manifest when manipulating the scrollbar of a multi-line input text.
2019-02-26 12:50:44 +01:00
omar
b7b82520b4
Internal: InputText: Minor changes (intended to have side-effect but clarify next commit, however there is rarely such a thing as zero side effect in InputText land!)
2019-02-26 12:28:27 +01:00
omar
6cbf4b8121
Fixed uninitialized variable (leading to asserts in the docking branch). ( #2376 , #2371 )
2019-02-23 17:00:59 +01:00
omar
9558e327d2
Log/Capture: Fixed extraneous leading carriage return. Fixed an issue when empty string on a new line would not emit a carriage return.
2019-02-23 16:22:55 +01:00
omar
cd67d4d3c1
Log/Capture: Fixed LogXXX functions 'auto_open_depth' parameter being treated as an absolute tree depth instead of a relative one. Fixed CollapsingHeader trailing ascii representation being "#" instead of "##". Minor tidying up the of code.
2019-02-23 16:07:01 +01:00
omar
2cd7de5666
Internal: Log/Capture: Rework to add an internal LogToBuffer() function which is useful for writing automated tests. Clarified logging state by adding an enum.
2019-02-23 15:57:06 +01:00
omar
0f83145aa8
TabBar: Fixed a crash when using BeginTabBar() recursively (didn't affect docking). ( #2371 )
...
Added ImPool::Contains() helper.
2019-02-22 12:24:27 +01:00
omar
332f8f2462
Internal: InputText: Made clipboard copy/cut use its own temporary buffer (like paste) so we can guarantee that TempBuffer if not altered and can be preserved. Renamed TempBufferA to TextA to celebrate this.
2019-02-21 19:55:37 +01:00
omar
81a8730022
Internal: InputText: Renamed is_editable to !is_readonly, Hopefully more explicit. Renamed internal member. Shuffled some code. Added comments, assert (_will_ trigger on !readonly > readonly edge, old bug).
2019-02-21 19:55:36 +01:00
omar
677e64e71e
Internal: InputText: Comments. Renamed internal member. Renamed ImGuiStb->ImStb.
2019-02-20 21:34:08 +01:00
omar
257f5d204e
Version 1.69 WIP
2019-02-20 00:11:36 +01:00
omar
93b06e6e7c
Internal: Changed Scrollbar() signature. Using GetScrollbarID() in InputTextMultiline().
...
Removed multiple semi-colons (#2368 )
2019-02-20 00:08:21 +01:00
omar
3c15dffc94
Version 1.68
2019-02-19 12:50:46 +01:00
omar
93d1179805
Examples: Extracted gamepad code into ImGui_ImplGlfw_UpdateGamepads(). Renamed matching Win32 function for consistency.
...
Added more link to nothing's oversample document. Spacing bits.
2019-02-14 19:29:09 +01:00
omar
0236bc246f
Scrollbar: Fade out and disable interaction when too small, in order to facilitate using the resize grab on very small window, as well as reducing visual noise/overlap. (+1 squashed commits)
...
Internals: Added GetScrollbarID(). (#1185 )
2019-02-14 14:07:59 +01:00
omar
f366828dd2
Minor tweaks to reduce false positive of PVS Studio static analyzer.
2019-02-06 13:16:52 +01:00
omar
97ed97b8ce
Plot: Register an ID to take the click the same way as other framed widgets. Set HoveredId in the FramePadding zone (between inner_bb and frame_bb).
2019-02-05 21:17:04 +01:00
omar
d38f4dc143
Tabs: Non-docking tab bars are storing names to allow tab list button + whole style scaling. Added ImGuiTabBarFlags_TabListPopupButton flag to show a popup button on manual tab bars. Locking FramePadding for the scope of a tab-bar to avoid sheering/clipping of tab item. Made scaling of tab ellipsis less awkward. ( #261 , #351 )
2019-02-05 13:23:44 +01:00
omar
c23a19c26f
Internals: Exposed internal SetWindowPos to imgui_internal.h (for imgui-test)
2019-02-03 17:29:51 +01:00
omar
5cb7040f66
Internals: Tracking dummy select scope id (currently always zero) to facilitate merging of the range_select branch. ( #1861 )
2019-02-01 12:14:38 +01:00
omar
0d4a2a2cd0
Internals: Track ActiveIdHasBeenPressed (similar to ActiveIdHasBeenEdited). This is currently mostly for the benefit of the range_select branch. ( #1861 )
2019-02-01 12:14:37 +01:00
omar
52a9f8bd3e
Merged from Docking branch: Various small changes, comments, typos fixes, moved blocks. To reduce overall drift. Should be no-op.
2019-02-01 10:26:08 +01:00
omar
fb4f1ff7f6
InputText: Fixed a bug where ESCAPE would be first captured by the Keyboard Navigation code. ( #2321 , #787 )
2019-01-30 15:16:09 +01:00
omar
0a233a505d
imgui-test: Added extra item info callbacks. Using nav_bb for interactions when possible. Comments, Demo tweaks.
2019-01-30 12:53:01 +01:00
omar
c3c2cd1e82
Fix various XCode and PVS-Studio static analyzer warnings ( #2309 )
2019-01-27 16:18:23 +01:00
omar
f14f93ef6e
Fixed range-version of PushID() and GetID() not honoring the ### operator to restart from the seed value.
2019-01-21 16:50:27 +01:00
omar
2c38b32db1
Removed trailing spaces ( #2038 , #2299 )
2019-01-20 17:56:17 +01:00
omar
f94ba546ba
Added checks for "zero-as-null-pointer-constant" warnings for older Clang ( #2299 , followup to #2277 )
2019-01-20 17:46:00 +01:00
omar
95ee99e6aa
Version 1.68 WIP
2019-01-15 20:19:05 +01:00
omar
d38d7c6628
TODO update + internals: changed order or ImGuiLayoutType enums to allow using them for indexing.
2019-01-15 15:06:24 +01:00
omar
7a5058e3bf
Version 1.67
2019-01-14 17:41:44 +01:00
omar
6e41745f31
Added a bunch of diagnostic ignore to cope with Clang -Weverything being absurd. Also fixed two legit warnings. ( #2277 )
2019-01-13 18:57:46 +01:00
omar
9a9712807e
ImFontAtlas: Rewrote stb_truetype based builder.
...
- Atlas width is now properly based on total surface rather than glyph count (unless overridden with TexDesiredWidth).
- Fixed atlas builder so missing glyphs won't influence the atlas texture width. (#2233 )
- Fixed atlas builder so duplicate glyphs (when merging fonts) won't be included in the rasterized atlas.
2019-01-10 22:23:05 +01:00
omar
e3ccc96789
Internals: Added ImBoolVector helper.
2019-01-10 16:10:02 +01:00
omar
1f6e0b2f98
ImVector: Made a struct. Using T/T* in the code instead of value_type/iterator. Renamed index_from_pointer() to index_from_ptr() (was not documented, added in 1.63, users not supposed to use ImVector, hopefully not a big deal).
2019-01-10 15:51:08 +01:00
omar
81eaa49773
Internals: Added comment index in imgui_internal.h
2019-01-10 15:51:08 +01:00
omar
f53cd3ee0f
Internals: LowerBound: Use raw pointer typedefs, we never use iterator anywhere else in the codebase.
...
Demo: Typo.
C98 fix.
2019-01-08 17:37:07 +01:00
omar
b33977bc15
Tests: Reworking hook prototypes for imgui-test to be faster and multi-context friendly.
2019-01-07 23:59:05 +01:00
omar
c2db7f63bd
Selectable() should have an ID even though they are disabled, to be consistent with other widgets. Not sure of the reasoning ~1.41 which made this turn to 0.
2019-01-07 23:48:50 +01:00
omar
3997e8b555
Fixed animated window titles from being updated when displayed in the CTRL+Tab list. + Adding overkill helpers for reusing buffers. ( #787 )
2019-01-07 22:46:42 +01:00
omar
acfa4050ec
Tweak changelog + tweak internal render helper functions.
2019-01-07 16:43:55 +01:00
omar
d223d1e951
Added bindings in Readme. Added internal IMGUI_DEBUG_LOG() helper. Comments, missing breaking changes note relative to imgui_impl_xxxx changes, not really part of core but worth adding in the imgui.cpp breaking change section.
2019-01-04 18:01:43 +01:00
omar
237109caa5
Internals: Extracted code out of EndFrame() into UpdateMouseMovingWindowEndFrame()
2019-01-02 23:08:32 +01:00
omar
b3469fa94b
Alternative fix for bug introduced in d845135
( #1651 ), fix CTRL+Tab and fallback tooltip.
2019-01-02 23:08:32 +01:00
omar
ae76a1fda7
Window, Focus, Popup: Fixed an issue where closing a popup by clicking another window with the _NoMove flag would refocus the parent window of the popup instead of the newly clicked window.
2018-12-18 15:01:15 +01:00
omar
65dac02171
Internals: Popups: Renamed CurrentPopupStack to BeginPopupStack which is much less ambiguous.
2018-12-14 18:44:17 +01:00
omar
f1c7596409
Internals: Popup related comments. Renamed the misleading internal ClosePopup() function. Added bool* test to BeginPopupModal in demo.
2018-12-14 18:42:22 +01:00
omar
587506dd57
Tests: Changed prototype of ImGuiTestEngineHook_ItemAdd to match functions called in same spot. Made ButtonBehavior submit fallback item info if ItemAdd() was not called (for resize grips, resize borders, scrollbar, columns, etc.)
2018-12-14 11:27:02 +01:00
omar
54a60aaa40
Added BETA api for Tab Bar/Tabs widgets. ( #261 , #351 ) (merged this feature from the from Docking branch so it can be used earlier as as standalone feature)
...
- Added BeginTabBar(), EndTabBar(), BeginTabItem(), EndTabItem(), SetTabItemClosed() API.
- Added ImGuiTabBarFlags flags for BeginTabBar().
- Added ImGuiTabItemFlags flags for BeginTabItem().
- Style: Added ImGuiCol_Tab, ImGuiCol_TabHovered, ImGuiCol_TabActive, ImGuiCol_TabUnfocused, ImGuiCol_TabUnfocusedActive colors.
- Demo: Added Layout->Tabs demo code.
- Demo: Added "Documents" example app showcasing possible use for tabs.
2018-12-11 12:36:47 +01:00
omar
15447f5b7b
Using named flags instead of 0 + shallow formatting tweaks from other branches.
2018-12-11 12:14:27 +01:00
omar
d20e3ee710
Tests: Adding imgui-test engine hooks (experimental) to provide missing widget state to the testing system.
2018-12-10 14:30:41 +01:00
omar
125e62491e
Internals: Nav: Added ImGuiNavLayer_ to clarify semantic of previously integer NavLayer values, and not pretend that increment/decrement operators on them super flexible. + Storage tweaks.
2018-12-04 14:34:49 +01:00
omar
10e13dd6bb
Version 1.67 WIP (again, this time IMGUI_VERSION_NUM has leeway for another hot-fix).
2018-12-03 12:19:23 +01:00
omar
801645d350
Version 1.66b (will revisit how to change IMGUI_VERSION_NUM across versions, this commit reduces the numerical IMGUI_VERSION_NUM compared to the commit on Nov 22).
2018-12-03 10:17:17 +01:00
omar
baf67d393f
When the focused window become inactive don't restore focus to a window with the ImGuiWindowFlags_NoInputs flag. ( #2213 )
2018-11-29 23:25:29 +01:00
omar
0c4dee083c
Internals: Added ImPool helper data structure (used by testing system, and already in docking branch)
2018-11-22 18:59:57 +01:00
omar
d27ffefbd4
Version 1.67 WIP
2018-11-22 18:59:57 +01:00
omar
da3c4330c1
Version 1.66
2018-11-22 15:11:52 +01:00
omar
6b4443755d
Internals: Added FindWindowByID() helper. ( #2190 )
2018-11-15 16:41:48 +01:00
omar
aa668c410a
Nav: Fixed an assert in certain circumstance (mostly when using popups) when mouse positions stop being valid. ( #2168 ) + adding a else block to make NavCalcPreferredRefPos() more explicit.
2018-11-15 13:56:27 +01:00
omar
6c1ae6cc71
Internals: DragBehavior: Added support for ImGuiDragFlags_Vertical to implement a vertical drag widget (no frontend function provided).
2018-11-09 14:41:40 +01:00
omar
ac9aaf4b6e
Comments in demo and opengl code + Internals: Added HoveredIdNotActiveTimer tracking hovering time unless the item is active, which is a commonly useful pattern.
2018-10-25 17:45:48 +02:00
omar
ed4dcd9072
Shutdown: Unlock font atlas before destroying context, so we can destroy a context between NewFrame and EndFrame if we wait (facilitate main loop structures). Internals: GetWindowScrollMaxX(), GetWindowScrollMaxY()
2018-10-11 22:38:26 +02:00
omar
cf0afb48ac
TextUnformatted: Using memchr(), fixed not properly testing for text_end bound + comments.
...
Internals: Added ImStreolRange() + used in LogRenderedText() + comments.
2018-10-11 12:53:10 +02:00
omar
1efafa1d29
Comments + internal using Tab Stop terminology (ImGuiItemFlags_NoTabStop instead of !ImGuiItemFlags_AllowKeyboardFocus)
2018-10-10 12:09:06 +02:00
omar
e2436ca625
Nav, Focus: Fixed ImGuiWindowFlags_NoBringToFrontOnFocus windows not being restoring focus properly after the main menu bar or last focused window is deactivated.
2018-09-10 20:40:21 +02:00
omar
eb7033e75b
Version 1.66 WIP
2018-09-06 21:44:59 +02:00
omar
e0cab5664a
Version 1.65
2018-09-06 15:58:58 +02:00
omar
5a679a45cc
Renamed stb_truetype.h to imstb_truetype.h, stb_textedit.h to imstb_textedit.h, and stb_rect_pack.h to imstb_rectpack.h. ( #1718 , #2036 )
...
If you were conveniently using the imgui copy of those STB headers in your project, you will have to update your include paths.
The reason for this change is to avoid conflicts for projects that may also be importing their own copy of the STB libraries. Note that imgui's copy of stb_textedit.h is modified.
2018-09-06 15:58:25 +02:00
omar
b944aa623c
Minor mostly inconsequential merges from Viewport + LoadIniSettingsFromMemory() entirely skip lines starting with ';'
2018-09-05 11:52:48 +02:00
omar
d07f494305
Internals: Exposed SliderBehaviorT, DragBehaviorT, RoundScalarWithFormatT, SliderCalcRatioFromValueT. ( #2036 )
...
Renamed RoundScalarWithFormat -> RoundScalarWithFormatT.
Renamed SliderBehaviorCalcRatioFromValue -> SliderCalcRatioFromValueT
2018-09-03 14:49:13 +02:00
omar
bcb1441ce7
Version 1.65 WIP
2018-09-03 14:38:04 +02:00
omar
48db5713d6
Version 1.64
2018-08-31 10:00:03 +02:00
omar
15172f0742
Refactor: Internals: Moved Settings functions in imgui.cpp in their own section. ( #2036 )
2018-08-30 19:23:10 +02:00
omar
f2aa124eb8
Version 1.64 WIP
2018-08-30 14:25:23 +02:00
omar
9e0f24dcb6
Version 1.63
2018-08-29 16:20:25 +02:00
omar
92edb7a4e3
Internals: Tidying up, moving helpers to imgui_internal.h (in prevision of 1.64 refactor)
2018-08-29 16:12:54 +02:00
omar
f9634feb66
Internals: Merged some changes to facilitate 1D->2D transition for some elements, and merging the stack layout PR ( #846 )
2018-08-28 19:10:59 +02:00
omar
06e917f135
Internals: Renaming of non-user facing parts from ValueChanged to Edited terminology. ( #2034 , #820 , #956 , #1875 )
2018-08-23 13:47:37 +02:00
omar
abaa274592
Internals: Wired a ImGuiItemStatusFlags_ValueChanged into ItemStatusFlags, for an hypothetical IsItemValueChanged() function. ( #2034 )
2018-08-22 22:31:51 +02:00
omar
102d5e6de6
Rearrange header comments to find enums easily + fixed inconsistent sorting.
2018-08-22 22:13:05 +02:00
omar
2dc5ec95d7
Internals: InputText: Renaming. Comments.
2018-08-22 12:46:46 +02:00
omar
9f393c38e9
InputText: Renamed ImGuiTextEditCallback to ImGuiInputTextCallback, ImGuiTextEditCallbackData to ImGuiInputTextCallbackData for consistency. Kept redirection types (will obsolete).
2018-08-22 12:46:45 +02:00
omar
24ff259816
InputText: Added support for buffer size/capacity changes via the ImGuiInputTextFlags_CallbackResize flag. ( #2006 , #1443 , #1008 ).
2018-08-21 21:36:07 +02:00
omar
4de6e1f7e4
InputText: Internal renaming of some fields + final copy uses edit_state.CurLenA+1 instead of buf_size.
2018-08-21 15:14:10 +02:00
omar
4910629f6a
Internals: Moved code out of SliderBehaviorT to reduce code bloat and also because caller may have use for the grab_bb for styling purposes.
2018-08-20 09:59:51 +02:00
omar
bb2de30e3e
Internals: Added ImTextCountUtf8BytesFromChar() helper.
2018-08-17 11:33:45 -07:00
omar
341ebd961b
Fixed assertion when transitioning from an active ID to another within a group, affecting ColorPicker (broken in 1.62). Made ActiveIdIsAlive track the actual ID to avoid incorrect polling in BeginGroup/EndGroup when the ID changes within the group. ( #2023 , #820 , #956 , #1875 ).
2018-08-16 13:33:16 -07:00
omar
4e33aeed82
Selectable: Added ImGuiSelectableFlags_Disabled flag in the public API. ( #211 )
2018-08-14 16:07:01 -07:00
omar
d4cd121ae1
TODO + added missing _None enum for some internals flags.
2018-08-09 21:03:17 +02:00
omar
fda9dc8e18
Internals: Extracted RenderMouseCursor() out of EndFrame(). Moved to imgui_draw.cpp along with RenderArrowPointingAt(). Comments. ( #2013 )
2018-08-09 18:07:49 +02:00
omar
0905202f44
Internals: Minor renaming for consistency.
2018-08-05 18:13:24 +02:00
omar
65b46f62ef
Fixed PushID() from keeping alive the new ID Stack top value (if a previously active widget shared the ID it would be erroneously kept alive) (drag and drop demo could soft-lock the UI until pressing Escape!)
2018-07-31 17:28:18 +02:00