Commit Graph

336 Commits (70975fe44d22dc758c5b6ba430107ee2b4a16b74)

Author SHA1 Message Date
omar d8948b5343 ColorButton: Added ImGuiColorEditFlags_NoBorder flag to remove the border normally enforced by default.
omar 58b3e02b95 Version 1.75
Comments
omar d37d25470a Added IMGUI_DISABLE compile-time definition to make all headers and sources empty.
omar f694244dec InputText: Fix using a combination of _CallbackResize + _EnterReturnsTrue + lack of persisting user storage. ()
Amend 24ff25981 (, , )
omar bdbb2b21f5 Fix 83efdcec from overflowing buffer + make it a single undo records + comments ()
Rokas Kupstys 83efdcec8d Canceling text input with [esc] key uses stb_textedit facilities to restore original value. This makes restoration undoable using hotkeys.
Fixes .
omar d19297e2fa InputTextMultiline: Provide label to BeginChildEx so internal window name hold a little more context.
Rokas Kupstys 9cff4d6e5e Columns: ImDrawList::Channels* functions now work inside columns.
Use a private splitter in columns, paving way for removal of obsolete ImDrawList::Channels* functions.
omar 0e89041997 Internals: ButtonEx, ButtonBehavior can support multiple mouse buttons.
omar 5f4dfad5b7 Merge misc/shallow changes from Docking to reduce drift.
Most are comments. Fix menu bar clipping: 07ff47bf1b
omar 6c1a73774d Tooltip: Testing DragDropWithinSourceOrTarget in BeginTooltipEx() instead of just BeginTooltip() - feel this was an overlook. Added tooltip flags instead of using bool.
omar 2eda3585e7 Fixed hoverable/focus bug introduced in 3fe6ae97 ()
+ ArrowButtonEx() internal bits.
omar 2478dbfdb7 Disable warning C5054 introduced in VS 2019 16.2 ()
omar 9ad4c5da7e Fix zealous warnings + Internals: Renamed members from XxxxID to XxxxxId to be more consistent with rest of the codebase (still some inconsistency left that are harder to fix)
omar 2ebe08be40 Focus, Nav: Merged bits from RangeSelect features to enable early manipulation of focus scope for styling purpose.
FocusScopeId is tracked by nav scoring/request and stored in result.
It's all rather WIP and we should reorganize the SetNavIDXXX functions fiasco at some point (soon?).
Didn't separate FocusScope from SelectionScope for now, will re-investigate this later, this is the minimum commit to be able to do some styling.
omar e2eb0b4bc4 Internals: Begin tries to setup WindowTemp/DC members in same order as their declaration. Readme: remove Coverity banner (PVS is better)
omar 02c2d18aa3 Internals: Renaming and marking of legacy focus/tabbing system
omar 52334ad8df Internals: Minor ordering/comments of ImGuiWindowTempData.
omar f56962cb9a ColorEdit: "Copy As" context-menu tool shows hex values with a '#' prefix instead of '0x' + both with/without alpha when available.
omar 4ee7aa72e9 ButtonBehavior: Default assignment of pressed behavior now also test for ImGuiButtonFlags_PressedOnDragDropHold which wasn't the case before.
omar 1eb71fc72b ButtonBehavior: Added ImGuiButtonFlags_PressedOnClickReleaseAnywhere behavior ()
Rearranged flags. Added tests in 'widgets_button_press'
omar 1db78b8ca7 Renaming + missing initialization + missing Changelog update.
Rokas Kupstys 32c33c6659 ColorEdit: Preserve last saturation value when V=0. Disable Hue editing lock.
This workaround is no longer necessary because preserving hue value prevents it from resetting when it is edited in said condition.
Rokas Kupstys e254167afd ColorEdit: Fix label alignment when using ImGuiColorEditFlags_NoInputs. ()
omar d581939387 Removed trailing spaces.
omar e01fb5462d Internals: Separator: Simplify duplicated code.
omar 9d444062f9 Limiting Columns()/BeginColumns() api to 64 columns ()
While the current code technically supports it, future code may not so we're putting the restriction ahead.
omar e4a59d0025 TabItem: honor ImGuiTabItemFlags_NoCloseButton passed as parameter (although undocumented and part of private api) ()
omar b521cd357d Removed implicit default parameter to IsMouseDragging(int button = 0) to be consistent with other mouse functions.
(none of the other functions have it).
omar abaf0256b8 Version 1.75 WIP
Added message to font file loading assert.
omar bdce833636 Version 1.74
omar 51a02b319c Added IM_UNICODE_CODEPOINT_MAX. Changed specs of ImFontAtlas::AddCustomRectRegular() (breaking change).
omar ca63349eb4 Renamed XX-bits -> XX-bit in comments to match what the world appears to be using.
omar 7e232092a6 Internals: Added GetWindowResizeID(), renamed GetScrollbarID() to GetWindowScrollbarID(). Using integer for resize ID so they matches regardless of the pointer size.
Internals: Renamed IMGUI_USER_ERROR to IM_ASSERT_USER_ERROR().
omar 03852470de Internals: Routing recoverable user errors via IMGUI_USER_ERROR() macro. ()
omar b138f8cbcd Internal: Nav rename preparing for nav inputs ownership changes. IsNavInputPressed() -> IsNavInputTest()
omar 57dc34f4e8 TreeNode: Added IsItemToggledOpen() to explicitly query if item was just open/closed, facilitating interactions with custom multi-selections patterns. (, )
omar 011d475532 TreeNode: The collapsing arrow accepts click even if modifier keys are being held, facilitating interactions with multi-select patterns. (, , )
omar 037126ee0e TreeNode: Reworded code for ImGuiTreeNodeFlags_OpenOnArrow (follow up to f79b2d6c) to make it lightweight. Should be a no-op from user's point of view. Will facilitate using the arrow hovering information in the hot path. ()
omar 8fee5a4349 Internals: Renaming for consistency.
stfx 6bf5aed325 Declaration and assignment can be joined, Member function may be 'const'. ()
Rokas Kupstys c863c1f6a1 Clean up number rounding. Now it is more obvious what code is doing. ()
Add IM_ROUND() macro
Replace IM_FLOOR(n + 0.5f) and ImFloor(n + 0.5f) with IM_ROUND(n)
omar 9b323a7ebf SplitterBehavior: not using FrameRounding in render (was in first commit of the function, not sure why). ()
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. ()
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)
Alexey be9f1e8f00 ColorPicker: Fixed SV triangle gradient to block (broken in 1.73). (, ). [@lewa-j]
omar 048b73dfaa Various comments + Doc: Examples readme. Moved main menu bar code below menu bar code.
Rokas Kupstys 714fe29d1a Replace manual flooring with IM_FLOOR() macro. ()
Macro is used to ensure that flooring operation is always inlined even in debug builds. __forceinline does not force inlining in /Od builds with MSVC.

(cherry picked from commit bc165df6fd7969605bbc07b8a6d3d28f9109e8f3)
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.
omar c7bdec7e18 InputText, Nav: Fixed Left!Right keys broken when activating Keyboard Navigation. () Amend 892dfb1
omar aeb6481499 InputText: Filter out Ascii 127 (DEL) emitted by low-level OSX layer, as we are using the Key value. ()