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

Add menu item for online docs #525

Merged
merged 1 commit into from
Sep 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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