mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
[upstream_utils] Update imgui and implot (#8762)
Not updating GLFW yet due to a likely future move to SDL.
This commit is contained in:
@@ -543,8 +543,8 @@ bool wpi::glass::ItemEditName(std::string* name) {
|
||||
if (ImGui::InputText("##editname", name)) {
|
||||
rv = true;
|
||||
}
|
||||
if (ImGui::Button("Close") || ImGui::IsKeyPressedMap(ImGuiKey_Enter) ||
|
||||
ImGui::IsKeyPressedMap(ImGuiKey_KeyPadEnter)) {
|
||||
if (ImGui::Button("Close") || ImGui::IsKeyPressed(ImGuiKey_Enter) ||
|
||||
ImGui::IsKeyPressed(ImGuiKey_KeypadEnter)) {
|
||||
ImGui::CloseCurrentPopup();
|
||||
}
|
||||
|
||||
|
||||
@@ -59,9 +59,9 @@ bool wpi::glass::DisplayPneumaticControlSolenoids(PneumaticControlModel* model,
|
||||
// header
|
||||
bool open = CollapsingHeader(label);
|
||||
|
||||
ImGui::SetNextItemAllowOverlap();
|
||||
PopupEditName("header", &name);
|
||||
|
||||
ImGui::SetItemAllowOverlap();
|
||||
ImGui::SameLine();
|
||||
|
||||
// show channels as LED indicators
|
||||
|
||||
@@ -384,12 +384,12 @@ PlotSeries::Action PlotSeries::EmitPlot(PlotView& view, double now, size_t i,
|
||||
if (m_color.GetColorFloat()[3] == IMPLOT_AUTO) {
|
||||
SetColor(ImPlot::GetColormapColor(i));
|
||||
}
|
||||
ImPlot::SetNextLineStyle(m_color.GetColor(), m_weight);
|
||||
ImPlotSpec spec{ImPlotProp_LineColor, m_color.GetColor(),
|
||||
ImPlotProp_LineWeight, m_weight};
|
||||
if (IsDigital()) {
|
||||
ImPlot::PushStyleVar(ImPlotStyleVar_DigitalBitHeight, m_digitalBitHeight);
|
||||
ImPlot::PushStyleVar(ImPlotStyleVar_DigitalBitGap, m_digitalBitGap);
|
||||
ImPlot::PlotDigitalG(label, getter, &getterData, size + 1);
|
||||
ImPlot::PopStyleVar();
|
||||
spec.SetProp(ImPlotProp_Size, m_digitalBitHeight);
|
||||
ImPlot::PushStyleVar(ImPlotStyleVar_DigitalSpacing, m_digitalBitGap);
|
||||
ImPlot::PlotDigitalG(label, getter, &getterData, size + 1, spec);
|
||||
ImPlot::PopStyleVar();
|
||||
} else {
|
||||
if (ImPlot::GetCurrentPlot()->YAxis(m_yAxis).Enabled) {
|
||||
@@ -397,8 +397,8 @@ PlotSeries::Action PlotSeries::EmitPlot(PlotView& view, double now, size_t i,
|
||||
} else {
|
||||
ImPlot::SetAxis(ImAxis_Y1);
|
||||
}
|
||||
ImPlot::SetNextMarkerStyle(m_marker.GetValue() - 1);
|
||||
ImPlot::PlotLineG(label, getter, &getterData, size + 1);
|
||||
spec.SetProp(ImPlotProp_Marker, m_marker.GetValue() - 1);
|
||||
ImPlot::PlotLineG(label, getter, &getterData, size + 1, spec);
|
||||
}
|
||||
|
||||
// DND source for PlotSeries
|
||||
|
||||
@@ -97,8 +97,8 @@ bool NameSetting::PopupEditName(int index) {
|
||||
if (InputTextName("##edit")) {
|
||||
rv = true;
|
||||
}
|
||||
if (ImGui::Button("Close") || ImGui::IsKeyPressedMap(ImGuiKey_Enter) ||
|
||||
ImGui::IsKeyPressedMap(ImGuiKey_KeyPadEnter)) {
|
||||
if (ImGui::Button("Close") || ImGui::IsKeyPressed(ImGuiKey_Enter) ||
|
||||
ImGui::IsKeyPressed(ImGuiKey_KeypadEnter)) {
|
||||
ImGui::CloseCurrentPopup();
|
||||
}
|
||||
ImGui::EndPopup();
|
||||
@@ -117,8 +117,8 @@ bool NameSetting::PopupEditName(const char* name) {
|
||||
if (InputTextName("##edit")) {
|
||||
rv = true;
|
||||
}
|
||||
if (ImGui::Button("Close") || ImGui::IsKeyPressedMap(ImGuiKey_Enter) ||
|
||||
ImGui::IsKeyPressedMap(ImGuiKey_KeyPadEnter)) {
|
||||
if (ImGui::Button("Close") || ImGui::IsKeyPressed(ImGuiKey_Enter) ||
|
||||
ImGui::IsKeyPressed(ImGuiKey_KeypadEnter)) {
|
||||
ImGui::CloseCurrentPopup();
|
||||
}
|
||||
ImGui::EndPopup();
|
||||
|
||||
Reference in New Issue
Block a user