mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[build] Update imgui to 1.88 docking branch
This commit is contained in:
@@ -149,7 +149,6 @@ class Plot {
|
||||
bool& m_legendHorizontal;
|
||||
int& m_legendLocation;
|
||||
bool& m_crosshairs;
|
||||
bool& m_antialiased;
|
||||
bool& m_mousePosition;
|
||||
bool& m_yAxis2;
|
||||
bool& m_yAxis3;
|
||||
@@ -327,7 +326,7 @@ PlotSeries::Action PlotSeries::EmitPlot(PlotView& view, double now, size_t i,
|
||||
int offset;
|
||||
};
|
||||
GetterData getterData = {now, GetZeroTime() * 1.0e-6, m_data, size, offset};
|
||||
auto getter = [](void* data, int idx) {
|
||||
auto getter = [](int idx, void* data) {
|
||||
auto d = static_cast<GetterData*>(data);
|
||||
if (idx == d->size) {
|
||||
return ImPlotPoint{
|
||||
@@ -487,7 +486,6 @@ Plot::Plot(Storage& storage)
|
||||
m_legendLocation{
|
||||
storage.GetInt("legendLocation", ImPlotLocation_NorthWest)},
|
||||
m_crosshairs{storage.GetBool("crosshairs", false)},
|
||||
m_antialiased{storage.GetBool("antialiased", false)},
|
||||
m_mousePosition{storage.GetBool("mousePosition", true)},
|
||||
m_yAxis2{storage.GetBool("yaxis2", false)},
|
||||
m_yAxis3{storage.GetBool("yaxis3", false)},
|
||||
@@ -573,7 +571,6 @@ void Plot::EmitPlot(PlotView& view, double now, bool paused, size_t i) {
|
||||
static_cast<int>(i));
|
||||
ImPlotFlags plotFlags = (m_legend ? 0 : ImPlotFlags_NoLegend) |
|
||||
(m_crosshairs ? ImPlotFlags_Crosshairs : 0) |
|
||||
(m_antialiased ? ImPlotFlags_AntiAliased : 0) |
|
||||
(m_mousePosition ? 0 : ImPlotFlags_NoMouseText);
|
||||
|
||||
if (ImPlot::BeginPlot(label, ImVec2(-1, m_height), plotFlags)) {
|
||||
@@ -608,7 +605,6 @@ void Plot::EmitPlot(PlotView& view, double now, bool paused, size_t i) {
|
||||
(m_axis[i].lockMin ? ImPlotAxisFlags_LockMin : 0) |
|
||||
(m_axis[i].lockMax ? ImPlotAxisFlags_LockMax : 0) |
|
||||
(m_axis[i].autoFit ? ImPlotAxisFlags_AutoFit : 0) |
|
||||
(m_axis[i].logScale ? ImPlotAxisFlags_AutoFit : 0) |
|
||||
(m_axis[i].invert ? ImPlotAxisFlags_Invert : 0) |
|
||||
(m_axis[i].opposite ? ImPlotAxisFlags_Opposite : 0) |
|
||||
(m_axis[i].gridLines ? 0 : ImPlotAxisFlags_NoGridLines) |
|
||||
@@ -620,6 +616,9 @@ void Plot::EmitPlot(PlotView& view, double now, bool paused, size_t i) {
|
||||
ImPlot::SetupAxisLimits(
|
||||
ImAxis_Y1 + i, m_axis[i].min, m_axis[i].max,
|
||||
m_axis[i].apply ? ImGuiCond_Always : ImGuiCond_Once);
|
||||
ImPlot::SetupAxisScale(ImAxis_Y1 + i, m_axis[i].logScale
|
||||
? ImPlotScale_Log10
|
||||
: ImPlotScale_Linear);
|
||||
m_axis[i].apply = false;
|
||||
}
|
||||
|
||||
@@ -656,7 +655,6 @@ void Plot::EmitPlot(PlotView& view, double now, bool paused, size_t i) {
|
||||
// copy plot settings back to storage
|
||||
m_legend = (plot->Flags & ImPlotFlags_NoLegend) == 0;
|
||||
m_crosshairs = (plot->Flags & ImPlotFlags_Crosshairs) != 0;
|
||||
m_antialiased = (plot->Flags & ImPlotFlags_AntiAliased) != 0;
|
||||
m_legendOutside =
|
||||
(plot->Items.Legend.Flags & ImPlotLegendFlags_Outside) != 0;
|
||||
m_legendHorizontal =
|
||||
@@ -671,12 +669,12 @@ void Plot::EmitPlot(PlotView& view, double now, bool paused, size_t i) {
|
||||
m_axis[i].lockMin = (flags & ImPlotAxisFlags_LockMin) != 0;
|
||||
m_axis[i].lockMax = (flags & ImPlotAxisFlags_LockMax) != 0;
|
||||
m_axis[i].autoFit = (flags & ImPlotAxisFlags_AutoFit) != 0;
|
||||
m_axis[i].logScale = (flags & ImPlotAxisFlags_LogScale) != 0;
|
||||
m_axis[i].invert = (flags & ImPlotAxisFlags_Invert) != 0;
|
||||
m_axis[i].opposite = (flags & ImPlotAxisFlags_Opposite) != 0;
|
||||
m_axis[i].gridLines = (flags & ImPlotAxisFlags_NoGridLines) == 0;
|
||||
m_axis[i].tickMarks = (flags & ImPlotAxisFlags_NoTickMarks) == 0;
|
||||
m_axis[i].tickLabels = (flags & ImPlotAxisFlags_NoTickLabels) == 0;
|
||||
m_axis[i].logScale = plot->Axes[ImAxis_Y1 + i].Scale == ImPlotScale_Log10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ project(imgui-download NONE)
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(glfw3
|
||||
GIT_REPOSITORY https://github.com/glfw/glfw.git
|
||||
GIT_TAG 3.3.6
|
||||
GIT_TAG 6b57e08bb0078c9834889eab871bac2368198c15
|
||||
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/glfw-src"
|
||||
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/glfw-build"
|
||||
CONFIGURE_COMMAND ""
|
||||
@@ -23,7 +23,7 @@ ExternalProject_Add(gl3w
|
||||
)
|
||||
ExternalProject_Add(imgui
|
||||
GIT_REPOSITORY https://github.com/ocornut/imgui.git
|
||||
GIT_TAG v1.86
|
||||
GIT_TAG aceab9a877de0258d19d29a5d87a51b63a8999bf
|
||||
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/imgui-src"
|
||||
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/imgui-build"
|
||||
CONFIGURE_COMMAND ""
|
||||
@@ -33,7 +33,7 @@ ExternalProject_Add(imgui
|
||||
)
|
||||
ExternalProject_Add(implot
|
||||
GIT_REPOSITORY https://github.com/epezent/implot.git
|
||||
GIT_TAG 4fcc6e01aca406ef17d5a2dabdcbc9e1bd962c0d
|
||||
GIT_TAG e80e42e8b4136ddb84ccfe04fa28d0c745828952
|
||||
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/implot-src"
|
||||
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/implot-build"
|
||||
CONFIGURE_COMMAND ""
|
||||
|
||||
@@ -17,7 +17,7 @@ nativeUtils {
|
||||
niLibVersion = "2022.4.0"
|
||||
opencvVersion = "4.5.5-3"
|
||||
googleTestVersion = "1.11.0-2"
|
||||
imguiVersion = "1.87-2"
|
||||
imguiVersion = "1.88-4"
|
||||
wpimathVersion = "-1"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user