3216 Commits (e21bbee311a13c451a72fb0710fd25d963d2a974)

Author SHA1 Message Date
omar 9a0e71a6ec Internals: Renamed the ImGuiWindow HiddenFrameXXX fields to decorrelate them from resizing behavior, as those values are set by other logic. 6 years ago
omar cf1b02e54e Rearrange code in UpdateMouseWheel(). (#2424, #1463) + Fix old io.FontAllowUserScaling feature (probably should be made obsolete, but until then best fixed) 6 years ago
Luca Rood 1963cc59be Implement horizontal scrolling with Shift+Scroll
This is standard scrolling behaviour in most applications.
6 years ago
omar d9f6ba3035 IsWindowHovered() made change which should have no effect in master but fix result of IsWindowHovered(ImGuiHoveredFlags_ChildWindows) over multiple viewport in docking branch. (#2432) 6 years ago
omar 221bf93a55 Comments, todo list, remove trailing spaces. 6 years ago
omar 857381b9ca GetMouseDragDelta(): also returns the delta on the mouse button released frame. Verify that mouse positions are valid otherwise returns zero. Removed obsolete comment. Tweaked demo. (#2419) 6 years ago
omar cf2c52282d Version 1.70 WIP 6 years ago
omar 55c02099c5 Version 1.69, comments, typos 6 years ago
omar a26085ed53 Internals: Fixed Navigation from reaching ImGuiItemFlags_Disabled items (#211) + Examples comments 6 years ago
Bruce Mitchener b5d57a6615 Fix typos. (#2413) 6 years ago
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.
6 years ago
omar 66936880ba Moved placeholder sections to match Docking branch. Comments. 6 years ago
omar f717df4eb6 Internal: Columns: Allow to use BeginColumns(1) so code designed for variable number of columns can still call NextColumn etc. (#125) 6 years ago
omar 344140004b Fixed IsItemDeactivated()/IsItemDeactivatedAfterEdit() from not correctly returning true when tabbing out of a focusable widget (Input/Slider/Drag) in most situations. (#2215, #1875)
+ Minor renaming of a local variable in widget code.
6 years ago
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). 6 years ago
omar ce4e62649a Internal: Tabbing: Tweaks to FocusableItemRegister and using the standard mechanism to allow/block Tab being interpreting by tabbing instead of InputText() widget. 6 years ago
omar ac4842fa17 Nav: Fixed Ctrl+Tab keeping active InputText() of a previous window active after the switch. (#2380) 6 years ago
omar 94e794f81b Renamed GetOverlayDrawList() to GetForegroundDrawList() for consistency. Kept redirection function (will obsolete). (#2391)
Demo: Using GetBackgroundDrawList() and GetForegroundDrawList() in "Custom Rendering" demo.
6 years ago
omar 96b13760d4 Added GetBackgroundDrawList() helper to quickly get access to a ImDrawList that will be rendered behind every other windows. (#2391) 6 years ago
omar 1d0b4df3d9 Misc: Asserting in NewFrame() if style.WindowMinSize is zero or smaller than (1.0f,1.0f). Internal: ImHash functions tweaks. Added InputText() to query status section. 6 years ago
omar 6de09a5e48 Renamed ColorEdit/ColorPicker's ImGuiColorEditFlags_RGB/_HSV/_HEX flags to respectively ImGuiColorEditFlags_DisplayRGB/_DisplayHSV/_DisplayHex. This is anticipation of adding new flags to ColorEdit/ColorPicker functions which would make those ambiguous. (#2384) [@haldean] 6 years ago
David Wingrove 5d7bd2309b Fixes warning caused by a missing switch/case. (#2382, #2381) 6 years ago
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. 6 years ago
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. 6 years ago
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. 6 years ago
omar 3eba840053 Nav: Fixed a tap on AltGR (e.g. German keyboard) from navigation to the menu layer. (follow and extend on e.g #369, #370) 6 years ago
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). 6 years ago
omar 257f5d204e Version 1.69 WIP 6 years ago
omar 93b06e6e7c Internal: Changed Scrollbar() signature. Using GetScrollbarID() in InputTextMultiline().
Removed multiple semi-colons (#2368)
6 years ago
omar 3c15dffc94 Version 1.68 6 years ago
omar 76dbff37cd Selectable: Tweaks for #2347 (demo, changelog, member position) 6 years ago
haldean b277cfffc8 Selectable: add support for specifying text alignment on selectables (#2347)
Adds a style variable to Selectable that allows clients to specify the
text alignment within Selectables, adds a section in the demo to
demonstrate selectable text alignment, and a pair of sliders in the
style editor to change selectable alignment on the fly.

In terms of implementation, this one is extremely simple: Selectable was
already calling an API that supports text alignment, but had hard-coded
it to top-left. This changes that to just pass the style variable
straight through to RenderTextClipped. Backwards-compatibility is
preserved by defaulting the text_align parameter to (0, 0), i.e.,
top-left.

This also fixes a bug with selectable text rendering that caused
right-aligned text in a selectable to be clipped incorrectly, because
the wrong clipping rectangle was being used.
6 years ago
omar 3c07ec6a61 Made it illegal/assert when io.DisplayTime == 0.0f (with an exception for the first frame).
Causing too many subtle side-effect, e.g. IsNavInputPressed() would return true multiple times in a row.
6 years ago
omar 2206df9e7a Demo: Added Auto-Scroll option in Log/Console. Comments. Removed some ImColor() uses. 6 years ago
omar 57a586b4f1 Font: Moved functions to internal block (not enforced). Made ConfigData pointer const. Added link to stb's notes. 6 years ago
omar 417cf2237f Font: Fixed high-level ImGui::CalcTextSize() used by most widgets from erroneously subtracting 1.0f*scale to calculated text width. Among noticeable side-effects, it would make sequences of repeated Text/SameLine calls not align the same as a single call, and create mismatch between high-level size calculation and those performed with the lower-level ImDrawList api. (#792) 6 years ago
omar a79785c0b9 ImDrawData: Added FramebufferScale field (currently a copy of the value from io.DisplayFramebufferScale).
This is to allow render functions being written without pulling any data from ImGuiIO, allowing incoming multi-viewport feature to behave on Retina display and with multiple displays. If you are not using a custom binding, please update your render function code ahead of time, and use draw_data->FramebufferScale instead of io.DisplayFramebufferScale. (#2306, #1676)
Examples: Metal, OpenGL2, OpenGL3: Fixed offsetting of clipping rectangle with ImDrawData::DisplayPos != (0,0) when the display frame-buffer scale scale is not (1,1). While this doesn't make a difference when using master branch, this is effectively fixing support for multi-viewport with Mac Retina Displays on those examples. (#2306) Also using ImDrawData::FramebufferScale instead of io.DisplayFramebufferScale.
Examples: Clarified the use the ImDrawData::DisplayPos to offset clipping rectangles.
6 years ago
omar afc36cf802 Window: Fixed initial width of collapsed windows not taking account of contents width (broken in 1.67). (#2336, #176) 6 years ago
omar f366828dd2 Minor tweaks to reduce false positive of PVS Studio static analyzer. 6 years ago
omar 5bdc7d7a6f Menus: Tweaked horizontal overlap between parent and child menu (to help convey relative depth) from using style.ItemSpacing.x to style.ItemInnerSpacing.x, the later being expected to be smaller. (#1086) 6 years ago
omar e3dd95d335 Added IsItemActivated() as an extension to the IsItemDeactivated/IsItemDeactivatedAfterEdit functions which are useful to implement variety of undo patterns. (#820, #956, #1875) 6 years ago
omar b8c24aff4c Internals: EndGroup: Removed unnecesary parameter to ItemSize() 6 years ago
omar 521470b3cd Internals: Removed unnecessary code. 6 years ago
omar 8e44aacc8e Fonts: Fixed crash if FontGlobalScale is zero. Correctly debug naming default font if not 13 px. Demo: Moved PopupRounding along with other rounding values. Metrics: Displaying indexes with idx to be correct / less misleading. 6 years ago
omar c23a19c26f Internals: Exposed internal SetWindowPos to imgui_internal.h (for imgui-test) 6 years ago
omar ac6d474103 Removed io.DisplayVisibleMin/DisplayVisibleMax (which were marked obsolete and removed from viewport/docking branch already). 6 years ago
omar 5cb7040f66 Internals: Tracking dummy select scope id (currently always zero) to facilitate merging of the range_select branch. (#1861) 6 years ago
omar 0d4a2a2cd0 Internals: Track ActiveIdHasBeenPressed (similar to ActiveIdHasBeenEdited). This is currently mostly for the benefit of the range_select branch. (#1861) 6 years ago
omar 52a9f8bd3e Merged from Docking branch: Various small changes, comments, typos fixes, moved blocks. To reduce overall drift. Should be no-op. 6 years ago
omar fb4f1ff7f6 InputText: Fixed a bug where ESCAPE would be first captured by the Keyboard Navigation code. (#2321, #787) 6 years ago