mirror of
https://github.com/gwm17/implot.git
synced 2024-11-22 18:28:53 -05:00
add IsSubplotsHovered
This commit is contained in:
parent
507459fd5f
commit
4be83def59
|
@ -3180,6 +3180,12 @@ void PopPlotClipRect() {
|
|||
ImGui::PopClipRect();
|
||||
}
|
||||
|
||||
bool IsSubplotsHovered() {
|
||||
ImPlotContext& gp = *GImPlot;
|
||||
IM_ASSERT_USER_ERROR(gp.CurrentSubplot != NULL, "IsSubplotsHovered() needs to be called between BeginSubplots() and EndSubplots()!");
|
||||
return gp.CurrentSubplot->FrameHovered;
|
||||
}
|
||||
|
||||
bool IsPlotHovered() {
|
||||
ImPlotContext& gp = *GImPlot;
|
||||
IM_ASSERT_USER_ERROR(gp.CurrentPlot != NULL, "IsPlotHovered() needs to be called between BeginPlot() and EndPlot()!");
|
||||
|
|
7
implot.h
7
implot.h
|
@ -419,7 +419,7 @@ IMPLOT_API void EndPlot();
|
|||
// EndSubplots();
|
||||
// }
|
||||
//
|
||||
// Procudes:
|
||||
// Produces:
|
||||
//
|
||||
// [0][1][2]
|
||||
// [3][4][5]
|
||||
|
@ -651,8 +651,11 @@ IMPLOT_API ImPlotLimits GetPlotQuery(ImPlotYAxis y_axis = IMPLOT_AUTO);
|
|||
// Set the current plot query bounds. Query must be enabled with ImPlotFlags_Query.
|
||||
IMPLOT_API void SetPlotQuery(const ImPlotLimits& query, ImPlotYAxis y_axis = IMPLOT_AUTO);
|
||||
|
||||
// Returns true if the bounding frame of a subplot is hovered/
|
||||
IMPLOT_API bool IsSubplotsHovered();
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Algined Plots
|
||||
// Aligned Plots
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Consider using Begin/EndSubplots first. They are more feature rich and
|
||||
|
|
Loading…
Reference in New Issue
Block a user