Commit Graph

325 Commits

Author SHA1 Message Date
Evan Pezent 93ce4160a4 refactor a few time utils; add Now/Today (#605) 2024-12-21 11:32:57 -06:00
ocornut 419a8a0f5f Added support for IMGUI_DISABLE. (#563) 2024-10-29 17:36:47 +01:00
Michael Böhme 9be791503c Added header guard for IMGUI_DEFINE_MATH_OPERATORS (#546, #449) 2024-10-29 17:29:17 +01:00
helmutbuhler 33811aae48 Fix typo in user guide 2024-10-29 17:26:20 +01:00
ocornut f156599fae Remove trailing blanks. 2024-01-22 11:32:06 +01:00
ocornut 1f7a8c0314 Using offsetof() instead of obsoleted IM_OFFSETOF()
Said macro has been using offsetof() for a long time now.
2023-11-09 16:45:57 +01:00
elvissteinjr 065acc3319 Fix EndPlot() not deducing auto color for ImPlotCol_PlotBorder (#517) 2023-09-26 10:16:40 -05:00
ocornut 5e5e884a7d Fix using ImFloor() instead of IM_FLOOR().
Macro got renamed in IMGUI_VERSION_NUM 18993. Technically old ImFloor()/IM_FLOOR() was a trunc(). New ImFloor() is an actual floor(), works with signed value, so good for position.
2023-09-26 11:15:30 +02:00
Mikhail 7b9171569b Ability to query point, line and rect drags for their click, hovered and held states (#507)
* Added optional parameters to Drag.. functions to query state of items: clicked, hovered, held

See also #506

* Updated click/hover/held code

* Added demo
* DragRect is now report state of the entire rect

* Fix DragRect interaction; improve demo; some preferential changes

* Added held state handling for the DragRect rectangle

---------

Co-authored-by: epezent <epezent16@gmail.com>
2023-08-23 11:55:25 -05:00
Evan Pezent a2632b9d0b Implement legend scrolling and update scroll capture behavior when zooming (#504)
* Fully functional legend scrolling

* refactor legend scroll capture

* remove ImPlotFlags_NoChild scroll capturing in favor of ImGui::SetKeyOwner

* change scroll capture behavior to only capture if scroll can be consumed

* rev version, add note about removal of ImPlotFlags_NoChild
2023-08-20 17:17:34 -05:00
epezent 18c72431f8 Update version and copyright year 2023-08-19 21:43:34 -05:00
epezent b5b796a1d4 Skip tick Locators if plot height/width is 0 or negative 2023-08-19 20:59:30 -05:00
epezent 1ff4b45819 Fix IsSubplotsHovered with ImGuiHoveredFlags_AllowWhenBlockedByActiveItem 2023-08-19 20:29:20 -05:00
Marcus Eriksson 59a97acc66 Use %g for the min/max sliders in the plot axis context menu (#474)
Co-authored-by: sthenic <sthenic@users.noreply.github.com>
2023-08-18 19:35:20 -05:00
Giuseppe Barbieri cf9834b633 Update implot_internal.h (#487)
* Update implot_internal.h

Removed duplicated code

* Update implot.cpp

Fixed bug in ShowPlotContextMenu
2023-08-18 19:31:49 -05:00
ocornut 85573fe04a Version 0.15
Add missing changelog.
v0.15 tag/release was previously set on cc5e1da about 3 weeks ago, will attempt to change tag into this commit.
2023-08-06 19:22:08 +02:00
ocornut cc5e1daa5c Fixes for 1.89.7 + new ImGuiButtonFlags_AllowOverlap behavior handled by ButtonBehavior() fixes other items from hovering while dragging plot. 2023-06-28 15:04:11 +02:00
ocornut 6dd8007e8e Removed misleading/unnecessary use of ImGuiButtonFlags_AllowItemOverlap in BeginSubplots(). (#203)
Likely this was pulled from SplitterBehavior(), where it made senses but only given the possibility user would call SetItemAllowOverlap() after.
AFAIK after debugging the code I _think_ this has no meaningful side-effect. Also removed same thing in Tables code in core lib.
Flag added in https://github.com/epezent/implot/pull/203/commits/4a1ee88c13d4718d6a5099a372dc7ca8568b6a7f.
2023-06-28 15:04:11 +02:00
omar 18758e237e Avoid fetching GImPlot multiple times when possible. (#468)
In the case this is a thread_local variable it is best to avoid fetching too many times.
Either way local caching tends to be beneficial as a non-local variable would often be fetched multiple times.
2023-04-19 18:35:30 +02:00
Minty-Meeo fb084f3719 Use 'nullptr' instead of 'NULL' (#465) 2023-04-17 15:21:32 +02:00
omar 33c5a965f5 Fixes for requirement to define IMGUI_DEFINE_MATH_OPERATORS before imgui.h (or at least at imconfig) (#449) 2023-02-15 19:53:25 -06:00
omar 626e391670 Fixes for ImGuiModFlags_XXX -> ImGuiMod_XXX (v1.89) (#347) (#407)
Sorry!
2022-09-29 13:00:23 -05:00
omar 8879c99aef Fix for allowing core imgui to use typed ImGuiCol / ImGuiStyleVar enums. (#405) 2022-09-23 19:30:19 -05:00
Evan Pezent 3e13c95986 Add ImPlotLegendFlags_Sort (#404)
* add ImPlotLegendFlags_Sort

* replace qsort_s with qsort
2022-09-17 14:23:26 -05:00
Evan Pezent 4ba42f200a address a few static analysis warnings 2022-09-17 13:17:07 -05:00