mirror of
https://github.com/gwm17/implot.git
synced 2025-04-22 00:18:49 -04:00
add IsSubplotsHovered
This commit is contained in:
parent
507459fd5f
commit
4be83def59
|
@ -3180,6 +3180,12 @@ void PopPlotClipRect() {
|
||||||
ImGui::PopClipRect();
|
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() {
|
bool IsPlotHovered() {
|
||||||
ImPlotContext& gp = *GImPlot;
|
ImPlotContext& gp = *GImPlot;
|
||||||
IM_ASSERT_USER_ERROR(gp.CurrentPlot != NULL, "IsPlotHovered() needs to be called between BeginPlot() and EndPlot()!");
|
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();
|
// EndSubplots();
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// Procudes:
|
// Produces:
|
||||||
//
|
//
|
||||||
// [0][1][2]
|
// [0][1][2]
|
||||||
// [3][4][5]
|
// [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.
|
// 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);
|
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
|
// Consider using Begin/EndSubplots first. They are more feature rich and
|
||||||
|
|
Loading…
Reference in New Issue
Block a user