Skip to content
This repository has been archived by the owner on Oct 1, 2023. It is now read-only.

Commit

Permalink
Add menu item for online docs (#525)
Browse files Browse the repository at this point in the history
  • Loading branch information
calcmogul authored Sep 28, 2023
1 parent 2e46859 commit 2a64377
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions sysid-application/src/main/native/cpp/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <uv.h>
#include <wpi/Logger.h>
#include <wpigui.h>
#include <wpigui_openurl.h>

#include "sysid/view/Analyzer.h"
#include "sysid/view/JSONConverter.h"
Expand Down Expand Up @@ -165,13 +166,29 @@ 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) {
ImGui::OpenPopup("SysId JSON to CSV Converter");
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")) {
Expand Down

0 comments on commit 2a64377

Please sign in to comment.