Commit Graph

2067 Commits

Author SHA1 Message Date
ocornut 94c46d7486 InputText: Fixed not returning true when buffer is cleared by ImGuiInputTextFlags_EscapeClearsAll. (#5688, #2620) 2023-06-21 14:20:13 +02:00
ocornut e7a4327eb8 IsWindowHovered: Added support for ImGuiHoveredFlags_Stationary. 2023-06-20 15:04:14 +02:00
ocornut b60acfa87d Tooltips: Added SetItemTooltip(), BeginItemTooltip(). Improved Demo section. 2023-06-20 15:04:14 +02:00
ocornut 0f72652c2d IsItemHovered, Tooltips: Added io.HoveredFlagsForTooltipMouse, io.HoveredFlagsForTooltipNav now pulled by ImGuiHoveredFlags_Tooltip. (#1485) 2023-06-20 15:04:14 +02:00
ocornut b3b8cbd001 IsItemHovered, Tooltips: Added ImGuiHoveredFlags_ForTooltip, ImGuiHoveredFlags_Stationary. (#1485)
Update demo accordingly.
2023-06-20 15:04:14 +02:00
ocornut d4b94bd65b (Breaking) Moved io.HoverDelayShort/io.HoverDelayNormal to style.HoverDelayShort/style.HoverDelayNormal. (#1485) 2023-06-20 15:04:13 +02:00
ocornut f09ef23ae6 IsItemHovered, Tooltips: Tweak default delay again. (#1485)
Amend eec344c
2023-06-20 14:43:38 +02:00
ocornut d96bbf0aae TreeNode: Added undocumented ImGuiTreeNodeFlags_UpsideDownArrow flag. (#6517)
+ Minor tweak comment/layout in ImGuiIO
2023-06-19 14:33:23 +02:00
ocornut 194916135a Internals: renamed HoverDelay fields. 2023-06-16 16:56:33 +02:00
ocornut eec344cc1e Tweak HoverDelayClearTimer. Not exposing since I am unsure logic is viable (and is rather complex with upcoming addition of stationary logic). (#1485)
+ Tweaked default value of io.HoverDelayNormal from 0.30 to 0.35.
2023-06-14 18:29:49 +02:00
ocornut e95d66faa8 Clipper: Rework inner logic to allow functioning with a zero-clear constructor. (#5856) 2023-06-13 14:55:02 +02:00
ocornut 9c16976749 Debug Tools: Added 'io.ConfigDebugIniSettings' option to save .ini data with extra comments.
Moved from compile-time to runtime flag. Note: commit in master is not particularly useful. Docking version will add stuff.
2023-06-13 11:54:29 +02:00
ocornut 4fab72b40e BeginChild/Tables: Fixed BeginChild temporary activation id collision. Fixes regression in 1.89.6 leading to the first column of tables with either ScrollX or ScrollY flags from being impossible to resize. (#6503) 2023-06-09 14:01:21 +02:00
ocornut 61ebb37843 Version 1.89.7 WIP 2023-06-01 11:22:43 +02:00
ocornut 5319d1cffa Version 1.89.6 2023-05-31 14:47:32 +02:00
ocornut 7e03ae3240 Window: Fixed resizing from upper border when io.ConfigWindowsMoveFromTitleBarOnly is set. (#6390) 2023-05-25 15:23:01 +02:00
ocornut 45c8c3b611 Listbox: commented out obsolete/redirecting functions that were marked obsolete more than two years ago: ListBoxHeader(), ListBoxFooter().
+ Added default parameter to SeparatorEx() amend 2c558d5
2023-05-22 10:09:20 +02:00
ocornut 7348e99269 CI: temporarily use Emscripten 3.1.37 because 3.1.18 has a regression.
Ref https://github.com/emscripten-core/emscripten/issues/19363
2023-05-18 12:33:47 +02:00
ocornut ecb0aaa7c2 Clipper: Renamed ForceDisplayRangeByIndices() to IncludeRangeByIndices(). (#6424, #3841) + commented out obsolete ImGuiListClipper() constructor. 2023-05-15 12:06:29 +02:00
ocornut bcfc1ad8f6 Nav: Forwarded (wrap/loop) request don't mistakenly wreck reference pos.
Amend 6656553
2023-05-10 15:22:17 +02:00
ocornut 430c05991c Docs: added more detailed information about UTF-8 encoding.
+ Revert mistakenly committed Win32+DX11 main.cpp from last commit.
2023-05-10 12:54:51 +02:00
ocornut 0397321be0 Debug Tools: Added 'io.ConfigDebugIgnoreFocusLoss' option. (#4388, #4921) 2023-05-09 20:28:08 +02:00
ocornut 6656553fa4 Nav: Record/restore preferred position on each given axis.
Tagging #6344 #6003 #2694 #1688 as it relates to scoring, however this doesn't technically fix any of them fully yet.
But e.g. once we restore axial path for #2694 this commit will allow going back and forth to initial location.
2023-05-09 17:26:27 +02:00
ocornut 6cdedf5834 Drag, Sliders: if the format string doesn't contain any %, when using CTRL+Click to input we use a default format. (#6405) 2023-05-09 12:04:04 +02:00
Koostosh fd943182bd ImVec2: Added unary minus operator (#6368) 2023-04-25 16:24:50 +02:00
ocornut d3ad2f357f Menus: Fixed an issue when opening a menu hierarchy in a given menu-bar would allow opening another via simple hovering. (#3496, #4797)
Amend 48f26333
2023-04-25 12:17:37 +02:00
ocornut 4d42450a73 Focus: amend ImGuiFocusRequestFlags_UnlessBelowModal to bring to front-most below the modal, simplify code in Begin(). (#6357, #4317) 2023-04-21 19:07:45 +02:00
ocornut 00d3f9295e Nav: Fixed navigation within tables/columns where item boundaries goes beyond columns limits. (#2221) 2023-04-20 16:42:52 +02:00
ocornut 064153fca4 Version 1.89.6 WIP 2023-04-17 14:40:00 +02:00
ocornut 1ebb913827 Version 1.89.5 2023-04-13 16:17:49 +02:00
ocornut 47a07d8476 ButtonBehavior: Fixed an edge case where changing widget type/behavior while active and using same id could lead to an assert. (#6304)
+ Demo: use BeginDisabled() block in BackendFlags section.
I'd still consider this undefined behavior as some combination may not work properly, but let's fix things while we can as we encounter them.
2023-04-05 18:34:49 +02:00
ocornut c9fe7ebc7b IO: Input queue trickling adjustment for touch screens. (#2702, #4921)
+ amend two comments in imgui.h
2023-04-04 21:05:27 +02:00
ocornut a16f99c6a2 IO: Added io.AddMouseSourceEvent() and ImGuiMouseSource enum. (#2702, #2334, #2372, #3453, #5693) 2023-04-04 20:18:57 +02:00
ocornut 9a1e09eb1f Fixed ImVec2 operator[] warning.in Clang. (#6272)
Added by a38e3c2
2023-04-04 19:26:48 +02:00
ocornut 13931fd851 Redirecting domain name
Tired of paying/maintaining two domains names and .org tend to be fluctuating + changing host company for sponsoring.
2023-04-03 15:07:20 +02:00
ocornut e8206db829 InputText: Fixed crash introduced by 5a2b1e848 (#6292, #4714) 2023-04-02 17:29:56 +02:00
ocornut 84fd0c7ff4 Inputs, IO: record MouseWheelRequestAxisSwap information. Apply in UpdateMouseWheel() before legacy ctrl+wheel. 2023-03-29 17:09:58 +02:00
ocornut a38e3c222f Fixed ImVec2 operator[] violating aliasing rules causing issue with Intel C++ compiler. (#6272)
Note that this is not BayesBug's exact intended solution, so issues would be my responsibility ;)
Amended.
2023-03-29 12:51:41 +02:00
AJ Weeks 821814b450 InputText: Reworked prev/next-word behavior . Include period as delimiter and tweak prev/next words logic. (#6067) 2023-03-22 20:48:47 +01:00
ocornut 89d09070e3 Nav: Made Ctrl+Tab/Ctrl+Shift+Tab windowing register ownership to held modifier. (#4828, #3255, #5641) 2023-03-22 15:42:14 +01:00
ocornut e55a0ef107 IO: avoid changing context in AddKeyAnalogEvent(). Amend 7269498. (#6199, #6256, #4921, #5856) 2023-03-21 14:32:37 +01:00
ocornut 5a2b1e8482 InputText: Fixed a tricky edge case, ensuring value is always written back on the frame where IsItemDeactivated() returns true (#4714)
Altered ItemAdd() clipping rule to keep previous-frame ActiveId unclipped to support that late commit.

Also, MarkItemEdited() may in theory need to do:
if (g.ActiveIdPreviousFrame == id)
        g.ActiveIdPreviousFrameHasBeenEditedBefore = true;
But this should already be set so not adding now.
2023-03-16 21:12:57 +01:00
ocornut 24a44b9abe Version 1.89.5 WIP 2023-03-15 12:25:20 +01:00
ocornut f3f6295d53 Version 1.89.4
Commented out obsolete enums/functions names: ImGuiSliderFlags_ClampOnInput, ImGuiInputTextFlags_AlwaysInsertMode, ImDrawList::AddBezierCurve(), ImDrawList::PathBezierCurveTo()()
2023-03-14 16:36:19 +01:00
ocornut cc2177de15 Debug Tools: Added io.ConfigDebugBeginReturnValueOnce / io.ConfigDebugBeginReturnValueLoop options. 2023-03-14 15:25:13 +01:00
ocornut c426e32247 Tables: Fixed an issue where user's Y cursor movement within a hidden column would have side-effects.
- Afaik the "to allow ImGuiListClipper to function" was added early during Tables development (prior to commit 55) and later replaced by support in ImGuiListCipper, it seems unnecessary.
- Also removed RowPosY2 being accted in TableEndCell().
+ Comments about 2bb9e35 + fix example bb224c8
2023-03-13 16:26:38 +01:00
ocornut 2bb9e35a48 Nav: Tabbing now cycles through all items when ImGuiConfigFlags_NavEnableKeyboard is set. (#3092, #5759, #787) 2023-03-10 18:35:52 +01:00
ocornut e83fb468c6 Renamed PushAllowKeyboardFocus()/PopAllowKeyboardFocus() to PushTabStop()/PopTabStop(). (#3092) 2023-03-09 18:53:57 +01:00
ocornut 3b2f617652 BeginTooltip: Added 'bool' return value to BeginTooltip() for API consistency. Updated demo.
Add SetWindowHiddendAndSkipItemsForCurrentFrame().
2023-03-09 15:16:40 +01:00
Marc Delorme c8ad25caa6 Make classes not depend on the implicit GImGui context (#5856, #6199): ImGuiWindow, ImGuiInputTextCallbackData, ImGuiListClipper, ImGuiStackSizes
This commit is a preparation toward adding ImGui apis with explicit context
and making ImGui applications being able to use multiple context at the same time
whatever their concurrency model.

This commit modifies ImGuiInputTextCallback, ImGuiListClipper and ImGuiStackSize so those classes do not to depend on GImGui context anymore.

About ImGuiInputTextCallback:
- ImGuiInputTextCallback depends on ImGuiContext because it has a
  `InsertChars` method adding character to `g.InputTextState`
- To make ImGuiInputTextCallback aware of which context to use, the
  appropriate context is given as argument of ImGuiInputTextCallback
  constructor.

About ImGuiListClipper:
- ImGuiListClipper apply to a context through its `Begin`, `End`, and `Step`
  method.
- To make ImGuiListClipper aware of which context to use, the
  appropriate context is given as argument of ImGuiListClipper
  constructor.
- Since the behavior is different than previously the class has been
  renamed ImGuiListClipperEx
- In order to preserve backward compatibility, a subclass of ImGuiListClipperEx
  named ImGuiListClipper has been defined and forward the implicit context
  to ImGuiListClipperEx parent.

About ImGuiTextFilter:
- ImGuiTextFilter depends on the implicit context because the Draw(..)
  method call ImGui::InputText(...)
- Instead from that commit the Draw(...) method takes an explicit context
  as first argument
- Since the behavior is different than previously the class has been
  renamed ImGuiTextFilterEx
- In order to preserve backward compatibility, a subclass of ImGuiTextFilterEx
  named ImGuiTextFilter has been defined. This subclass has a draw method
  override which and forward the implicit context to the parent class Draw(...)

About ImGuiStackSizes:
- ImGuiStackSizes was depending on ImGuiContext because of its
  `SetToCurrentState` and `CompareWithCurrentState` method
- ImGuiStackSizes is an helper object use
  for comparing state of context. It does not necessarily need to
  compare the same context. For that reason, as opposed to previous
  classes it takes the context it wants to compare to as argument of
  its method.
- For this occasion `SetToCurrentState` and `CompareWithCurrentState`
  have been renamed `SetToContextState` and `CompareWithContextState`
  to match the new method signature.

ImGuiListClipper

ImGuiInputTextCallbackData
2023-03-08 15:55:38 +01:00