From 2a643778bd67be1e7432201c0b4c8759f18ab0a7 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Thu, 28 Sep 2023 12:17:56 -0700 Subject: [PATCH] Add menu item for online docs (#525) --- sysid-application/src/main/native/cpp/App.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sysid-application/src/main/native/cpp/App.cpp b/sysid-application/src/main/native/cpp/App.cpp index 28f1814d..ea7c9dcf 100644 --- a/sysid-application/src/main/native/cpp/App.cpp +++ b/sysid-application/src/main/native/cpp/App.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include "sysid/view/Analyzer.h" #include "sysid/view/JSONConverter.h" @@ -165,6 +166,15 @@ void Application(std::string_view saveDir) { ImGui::EndMenu(); } + bool docs = false; + if (ImGui::BeginMenu("Docs")) { + if (ImGui::MenuItem("Online documentation")) { + docs = true; + } + + ImGui::EndMenu(); + } + ImGui::EndMainMenuBar(); if (toCSV) { @@ -172,6 +182,13 @@ void Application(std::string_view saveDir) { toCSV = false; } + if (docs) { + wpi::gui::OpenURL( + "https://docs.wpilib.org/en/stable/docs/software/pathplanning/" + "system-identification/"); + docs = false; + } + if (ImGui::BeginPopupModal("SysId JSON to CSV Converter")) { gJSONConverter->DisplayCSVConvert(); if (ImGui::Button("Close")) {