2021-03-16 22:05:41 -07:00
|
|
|
// Copyright (c) FIRST and other WPILib contributors.
|
|
|
|
|
// Open Source Software; you can modify and/or share it under the terms of
|
|
|
|
|
// the WPILib BSD license file in the root directory of this project.
|
|
|
|
|
|
|
|
|
|
#include <memory>
|
2024-09-20 17:43:39 -07:00
|
|
|
#include <string>
|
2021-03-16 22:05:41 -07:00
|
|
|
|
|
|
|
|
#include <GLFW/glfw3.h>
|
2021-06-06 16:13:58 -07:00
|
|
|
#include <fmt/format.h>
|
2023-09-27 21:45:46 -07:00
|
|
|
#include <glass/Context.h>
|
|
|
|
|
#include <glass/MainMenuBar.h>
|
|
|
|
|
#include <glass/Model.h>
|
|
|
|
|
#include <glass/Storage.h>
|
|
|
|
|
#include <glass/networktables/NetworkTables.h>
|
|
|
|
|
#include <glass/networktables/NetworkTablesSettings.h>
|
|
|
|
|
#include <glass/other/Log.h>
|
2021-03-16 22:05:41 -07:00
|
|
|
#include <imgui.h>
|
|
|
|
|
#include <ntcore_cpp.h>
|
|
|
|
|
#include <wpigui.h>
|
2023-09-29 17:25:28 -07:00
|
|
|
#include <wpigui_openurl.h>
|
2021-03-16 22:05:41 -07:00
|
|
|
|
|
|
|
|
namespace gui = wpi::gui;
|
|
|
|
|
|
|
|
|
|
const char* GetWPILibVersion();
|
|
|
|
|
|
|
|
|
|
namespace ov {
|
2021-06-06 16:13:58 -07:00
|
|
|
std::string_view GetResource_ov_16_png();
|
|
|
|
|
std::string_view GetResource_ov_32_png();
|
|
|
|
|
std::string_view GetResource_ov_48_png();
|
|
|
|
|
std::string_view GetResource_ov_64_png();
|
|
|
|
|
std::string_view GetResource_ov_128_png();
|
|
|
|
|
std::string_view GetResource_ov_256_png();
|
|
|
|
|
std::string_view GetResource_ov_512_png();
|
2021-03-16 22:05:41 -07:00
|
|
|
} // namespace ov
|
|
|
|
|
|
|
|
|
|
static std::unique_ptr<glass::NetworkTablesModel> gModel;
|
|
|
|
|
static std::unique_ptr<glass::NetworkTablesSettings> gSettings;
|
|
|
|
|
static glass::LogData gLog;
|
|
|
|
|
static glass::NetworkTablesFlagsSettings gFlagsSettings;
|
[glass] Use JSON files for storage instead of imgui ini
Storage is now nested.
Separate "roots" can be configured which save to separate files.
In particular, this is used to save wpigui and ImGui window position
to a -window.json file.
ImGui's ini (for window position) is mapped to JSON.
You can optionally specify a directory to load from on the command line.
If one isn't provided, it uses the global system directory.
Any changes made are automatically saved here.
Workspace | Open: select directory, the current layout is replaced with that
workspace, and future auto-saves also switch to that location. The main
window size/location is not changed, only the contents.
Workspace | Save As: select directory, the current layout is saved there,
and future auto-saves also switch to that location.
Workspace | Reset: window locations are preserved, but all other settings
are reset to default (including e.g. removing plot windows). This will also
end up clearing the current save file. as with load, the main window
size/location is not changed.
Workspace | Save As Global: "save as" to the global system location
Notably, the main window size/location is only loaded at startup, but is
auto-saved as part of the current workspace.
2021-11-25 00:51:00 -08:00
|
|
|
static glass::MainMenuBar gMainMenu;
|
2023-08-04 02:43:03 -04:00
|
|
|
static unsigned int gPrevMode = NT_NET_MODE_NONE;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Generates the proper title bar title based on current instance state and
|
|
|
|
|
* event.
|
|
|
|
|
*/
|
|
|
|
|
static std::string MakeTitle(NT_Inst inst, nt::Event event) {
|
|
|
|
|
auto mode = nt::GetNetworkMode(inst);
|
|
|
|
|
if (mode & NT_NET_MODE_SERVER) {
|
|
|
|
|
auto numClients = nt::GetConnections(inst).size();
|
|
|
|
|
return fmt::format("OutlineViewer - {} Client{} Connected", numClients,
|
|
|
|
|
(numClients == 1 ? "" : "s"));
|
|
|
|
|
} else if (mode & NT_NET_MODE_CLIENT3 || mode & NT_NET_MODE_CLIENT4) {
|
|
|
|
|
if (event.Is(NT_EVENT_CONNECTED)) {
|
|
|
|
|
return fmt::format("OutlineViewer - Connected ({})",
|
|
|
|
|
event.GetConnectionInfo()->remote_ip);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return "OutlineViewer - DISCONNECTED";
|
|
|
|
|
}
|
2021-03-16 22:05:41 -07:00
|
|
|
|
|
|
|
|
static void NtInitialize() {
|
|
|
|
|
auto inst = nt::GetDefaultInstance();
|
2022-10-31 21:52:14 -07:00
|
|
|
auto poller = nt::CreateListenerPoller(inst);
|
2023-08-04 02:43:03 -04:00
|
|
|
nt::AddPolledListener(poller, inst, NT_EVENT_CONNECTION | NT_EVENT_IMMEDIATE);
|
2024-01-17 19:55:24 -08:00
|
|
|
nt::AddPolledLogger(poller, NT_LOG_INFO, 100);
|
2021-03-16 22:05:41 -07:00
|
|
|
gui::AddEarlyExecute([inst, poller] {
|
|
|
|
|
auto win = gui::GetSystemWindow();
|
|
|
|
|
if (!win) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
2023-08-04 02:43:03 -04:00
|
|
|
bool updateTitle = false;
|
|
|
|
|
nt::Event connectionEvent;
|
|
|
|
|
if (nt::GetNetworkMode(inst) != gPrevMode) {
|
|
|
|
|
gPrevMode = nt::GetNetworkMode(inst);
|
|
|
|
|
updateTitle = true;
|
|
|
|
|
}
|
2022-10-31 21:52:14 -07:00
|
|
|
for (auto&& event : nt::ReadListenerQueue(poller)) {
|
2023-08-04 02:43:03 -04:00
|
|
|
if (event.Is(NT_EVENT_CONNECTION)) {
|
|
|
|
|
updateTitle = true;
|
|
|
|
|
connectionEvent = event;
|
2022-10-31 21:52:14 -07:00
|
|
|
} else if (auto msg = event.GetLogMessage()) {
|
|
|
|
|
// handle NetworkTables log messages
|
|
|
|
|
const char* level = "";
|
|
|
|
|
if (msg->level >= NT_LOG_CRITICAL) {
|
|
|
|
|
level = "CRITICAL: ";
|
|
|
|
|
} else if (msg->level >= NT_LOG_ERROR) {
|
|
|
|
|
level = "ERROR: ";
|
|
|
|
|
} else if (msg->level >= NT_LOG_WARNING) {
|
|
|
|
|
level = "WARNING: ";
|
|
|
|
|
}
|
|
|
|
|
gLog.Append(fmt::format("{}{} ({}:{})\n", level, msg->message,
|
|
|
|
|
msg->filename, msg->line));
|
2021-03-16 22:05:41 -07:00
|
|
|
}
|
|
|
|
|
}
|
2023-08-04 02:43:03 -04:00
|
|
|
|
|
|
|
|
if (updateTitle) {
|
|
|
|
|
glfwSetWindowTitle(win, MakeTitle(inst, connectionEvent).c_str());
|
|
|
|
|
}
|
2021-03-16 22:05:41 -07:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// NetworkTables table window
|
|
|
|
|
gModel = std::make_unique<glass::NetworkTablesModel>();
|
|
|
|
|
gui::AddEarlyExecute([] { gModel->Update(); });
|
|
|
|
|
|
|
|
|
|
// NetworkTables settings window
|
[glass] Use JSON files for storage instead of imgui ini
Storage is now nested.
Separate "roots" can be configured which save to separate files.
In particular, this is used to save wpigui and ImGui window position
to a -window.json file.
ImGui's ini (for window position) is mapped to JSON.
You can optionally specify a directory to load from on the command line.
If one isn't provided, it uses the global system directory.
Any changes made are automatically saved here.
Workspace | Open: select directory, the current layout is replaced with that
workspace, and future auto-saves also switch to that location. The main
window size/location is not changed, only the contents.
Workspace | Save As: select directory, the current layout is saved there,
and future auto-saves also switch to that location.
Workspace | Reset: window locations are preserved, but all other settings
are reset to default (including e.g. removing plot windows). This will also
end up clearing the current save file. as with load, the main window
size/location is not changed.
Workspace | Save As Global: "save as" to the global system location
Notably, the main window size/location is only loaded at startup, but is
auto-saved as part of the current workspace.
2021-11-25 00:51:00 -08:00
|
|
|
gSettings = std::make_unique<glass::NetworkTablesSettings>(
|
2022-10-08 10:01:31 -07:00
|
|
|
"outlineviewer",
|
[glass] Use JSON files for storage instead of imgui ini
Storage is now nested.
Separate "roots" can be configured which save to separate files.
In particular, this is used to save wpigui and ImGui window position
to a -window.json file.
ImGui's ini (for window position) is mapped to JSON.
You can optionally specify a directory to load from on the command line.
If one isn't provided, it uses the global system directory.
Any changes made are automatically saved here.
Workspace | Open: select directory, the current layout is replaced with that
workspace, and future auto-saves also switch to that location. The main
window size/location is not changed, only the contents.
Workspace | Save As: select directory, the current layout is saved there,
and future auto-saves also switch to that location.
Workspace | Reset: window locations are preserved, but all other settings
are reset to default (including e.g. removing plot windows). This will also
end up clearing the current save file. as with load, the main window
size/location is not changed.
Workspace | Save As Global: "save as" to the global system location
Notably, the main window size/location is only loaded at startup, but is
auto-saved as part of the current workspace.
2021-11-25 00:51:00 -08:00
|
|
|
glass::GetStorageRoot().GetChild("NetworkTables Settings"));
|
2021-03-16 22:05:41 -07:00
|
|
|
gui::AddEarlyExecute([] { gSettings->Update(); });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void DisplayGui() {
|
|
|
|
|
ImGui::GetStyle().WindowRounding = 0;
|
|
|
|
|
|
|
|
|
|
// fill entire OS window with this window
|
|
|
|
|
ImGui::SetNextWindowPos(ImVec2(0, 0));
|
|
|
|
|
int width, height;
|
|
|
|
|
glfwGetWindowSize(gui::GetSystemWindow(), &width, &height);
|
2023-09-23 19:57:18 -07:00
|
|
|
ImGui::SetNextWindowSize(
|
|
|
|
|
ImVec2(static_cast<float>(width), static_cast<float>(height)));
|
2021-03-16 22:05:41 -07:00
|
|
|
|
|
|
|
|
ImGui::Begin("Entries", nullptr,
|
|
|
|
|
ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_MenuBar |
|
|
|
|
|
ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove |
|
|
|
|
|
ImGuiWindowFlags_NoCollapse);
|
|
|
|
|
|
|
|
|
|
gFlagsSettings.Update();
|
|
|
|
|
|
|
|
|
|
// can't create popups from within menu, so use flags
|
|
|
|
|
bool settings = false;
|
|
|
|
|
bool log = false;
|
|
|
|
|
bool about = false;
|
|
|
|
|
|
|
|
|
|
// main menu
|
|
|
|
|
ImGui::BeginMenuBar();
|
[glass] Use JSON files for storage instead of imgui ini
Storage is now nested.
Separate "roots" can be configured which save to separate files.
In particular, this is used to save wpigui and ImGui window position
to a -window.json file.
ImGui's ini (for window position) is mapped to JSON.
You can optionally specify a directory to load from on the command line.
If one isn't provided, it uses the global system directory.
Any changes made are automatically saved here.
Workspace | Open: select directory, the current layout is replaced with that
workspace, and future auto-saves also switch to that location. The main
window size/location is not changed, only the contents.
Workspace | Save As: select directory, the current layout is saved there,
and future auto-saves also switch to that location.
Workspace | Reset: window locations are preserved, but all other settings
are reset to default (including e.g. removing plot windows). This will also
end up clearing the current save file. as with load, the main window
size/location is not changed.
Workspace | Save As Global: "save as" to the global system location
Notably, the main window size/location is only loaded at startup, but is
auto-saved as part of the current workspace.
2021-11-25 00:51:00 -08:00
|
|
|
gMainMenu.WorkspaceMenu();
|
2021-03-16 22:05:41 -07:00
|
|
|
gui::EmitViewMenu();
|
|
|
|
|
if (ImGui::BeginMenu("View")) {
|
|
|
|
|
gFlagsSettings.DisplayMenu();
|
2023-02-17 16:46:02 -08:00
|
|
|
glass::DisplayNetworkTablesAddMenu(gModel.get());
|
2021-03-16 22:05:41 -07:00
|
|
|
ImGui::EndMenu();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (ImGui::BeginMenu("Options")) {
|
|
|
|
|
if (ImGui::MenuItem("Settings")) {
|
|
|
|
|
settings = true;
|
|
|
|
|
}
|
|
|
|
|
ImGui::EndMenu();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (ImGui::BeginMenu("Info")) {
|
|
|
|
|
if (ImGui::MenuItem("Log")) {
|
|
|
|
|
log = true;
|
|
|
|
|
}
|
|
|
|
|
ImGui::Separator();
|
|
|
|
|
if (ImGui::MenuItem("About")) {
|
|
|
|
|
about = true;
|
|
|
|
|
}
|
|
|
|
|
ImGui::EndMenu();
|
|
|
|
|
}
|
2023-09-29 17:25:28 -07:00
|
|
|
|
|
|
|
|
if (ImGui::BeginMenu("Docs")) {
|
|
|
|
|
if (ImGui::MenuItem("Online documentation")) {
|
|
|
|
|
wpi::gui::OpenURL(
|
|
|
|
|
"https://docs.wpilib.org/en/stable/docs/software/wpilib-tools/"
|
|
|
|
|
"outlineviewer/");
|
|
|
|
|
}
|
|
|
|
|
ImGui::EndMenu();
|
|
|
|
|
}
|
2021-03-16 22:05:41 -07:00
|
|
|
ImGui::EndMenuBar();
|
|
|
|
|
|
|
|
|
|
// settings popup
|
|
|
|
|
if (settings) {
|
|
|
|
|
ImGui::OpenPopup("Settings");
|
|
|
|
|
}
|
|
|
|
|
if (ImGui::BeginPopupModal("Settings", nullptr,
|
|
|
|
|
ImGuiWindowFlags_AlwaysAutoResize)) {
|
|
|
|
|
if (gSettings->Display()) {
|
|
|
|
|
ImGui::CloseCurrentPopup();
|
|
|
|
|
}
|
|
|
|
|
ImGui::SameLine();
|
|
|
|
|
if (ImGui::Button("Cancel")) {
|
|
|
|
|
ImGui::CloseCurrentPopup();
|
|
|
|
|
}
|
|
|
|
|
ImGui::EndPopup();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// log popup
|
|
|
|
|
if (log) {
|
|
|
|
|
ImGui::OpenPopup("Log");
|
|
|
|
|
}
|
|
|
|
|
if (ImGui::BeginPopupModal("Log", nullptr,
|
|
|
|
|
ImGuiWindowFlags_AlwaysAutoResize)) {
|
|
|
|
|
if (ImGui::Button("Close")) {
|
|
|
|
|
ImGui::CloseCurrentPopup();
|
|
|
|
|
}
|
|
|
|
|
ImGui::BeginChild("Lines", ImVec2(width * 0.75f, height * 0.75f));
|
|
|
|
|
glass::DisplayLog(&gLog, true);
|
|
|
|
|
ImGui::EndChild();
|
|
|
|
|
ImGui::EndPopup();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// about popup
|
|
|
|
|
if (about) {
|
|
|
|
|
ImGui::OpenPopup("About");
|
|
|
|
|
}
|
|
|
|
|
if (ImGui::BeginPopupModal("About", nullptr,
|
|
|
|
|
ImGuiWindowFlags_AlwaysAutoResize)) {
|
|
|
|
|
ImGui::Text("OutlineViewer");
|
|
|
|
|
ImGui::Separator();
|
|
|
|
|
ImGui::Text("v%s", GetWPILibVersion());
|
[glass] Use JSON files for storage instead of imgui ini
Storage is now nested.
Separate "roots" can be configured which save to separate files.
In particular, this is used to save wpigui and ImGui window position
to a -window.json file.
ImGui's ini (for window position) is mapped to JSON.
You can optionally specify a directory to load from on the command line.
If one isn't provided, it uses the global system directory.
Any changes made are automatically saved here.
Workspace | Open: select directory, the current layout is replaced with that
workspace, and future auto-saves also switch to that location. The main
window size/location is not changed, only the contents.
Workspace | Save As: select directory, the current layout is saved there,
and future auto-saves also switch to that location.
Workspace | Reset: window locations are preserved, but all other settings
are reset to default (including e.g. removing plot windows). This will also
end up clearing the current save file. as with load, the main window
size/location is not changed.
Workspace | Save As Global: "save as" to the global system location
Notably, the main window size/location is only loaded at startup, but is
auto-saved as part of the current workspace.
2021-11-25 00:51:00 -08:00
|
|
|
ImGui::Separator();
|
|
|
|
|
ImGui::Text("Save location: %s", glass::GetStorageDir().c_str());
|
2023-02-03 15:21:52 -08:00
|
|
|
ImGui::Text("%.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate,
|
|
|
|
|
ImGui::GetIO().Framerate);
|
2021-03-16 22:05:41 -07:00
|
|
|
if (ImGui::Button("Close")) {
|
|
|
|
|
ImGui::CloseCurrentPopup();
|
|
|
|
|
}
|
|
|
|
|
ImGui::EndPopup();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// display table view
|
2022-10-08 10:01:31 -07:00
|
|
|
glass::DisplayNetworkTablesInfo(gModel.get());
|
|
|
|
|
ImGui::Separator();
|
2021-03-16 22:05:41 -07:00
|
|
|
glass::DisplayNetworkTables(gModel.get(), gFlagsSettings.GetFlags());
|
|
|
|
|
|
|
|
|
|
ImGui::End();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
|
int __stdcall WinMain(void* hInstance, void* hPrevInstance, char* pCmdLine,
|
|
|
|
|
int nCmdShow) {
|
[glass] Use JSON files for storage instead of imgui ini
Storage is now nested.
Separate "roots" can be configured which save to separate files.
In particular, this is used to save wpigui and ImGui window position
to a -window.json file.
ImGui's ini (for window position) is mapped to JSON.
You can optionally specify a directory to load from on the command line.
If one isn't provided, it uses the global system directory.
Any changes made are automatically saved here.
Workspace | Open: select directory, the current layout is replaced with that
workspace, and future auto-saves also switch to that location. The main
window size/location is not changed, only the contents.
Workspace | Save As: select directory, the current layout is saved there,
and future auto-saves also switch to that location.
Workspace | Reset: window locations are preserved, but all other settings
are reset to default (including e.g. removing plot windows). This will also
end up clearing the current save file. as with load, the main window
size/location is not changed.
Workspace | Save As Global: "save as" to the global system location
Notably, the main window size/location is only loaded at startup, but is
auto-saved as part of the current workspace.
2021-11-25 00:51:00 -08:00
|
|
|
int argc = __argc;
|
|
|
|
|
char** argv = __argv;
|
2021-03-16 22:05:41 -07:00
|
|
|
#else
|
[glass] Use JSON files for storage instead of imgui ini
Storage is now nested.
Separate "roots" can be configured which save to separate files.
In particular, this is used to save wpigui and ImGui window position
to a -window.json file.
ImGui's ini (for window position) is mapped to JSON.
You can optionally specify a directory to load from on the command line.
If one isn't provided, it uses the global system directory.
Any changes made are automatically saved here.
Workspace | Open: select directory, the current layout is replaced with that
workspace, and future auto-saves also switch to that location. The main
window size/location is not changed, only the contents.
Workspace | Save As: select directory, the current layout is saved there,
and future auto-saves also switch to that location.
Workspace | Reset: window locations are preserved, but all other settings
are reset to default (including e.g. removing plot windows). This will also
end up clearing the current save file. as with load, the main window
size/location is not changed.
Workspace | Save As Global: "save as" to the global system location
Notably, the main window size/location is only loaded at startup, but is
auto-saved as part of the current workspace.
2021-11-25 00:51:00 -08:00
|
|
|
int main(int argc, char** argv) {
|
2021-03-16 22:05:41 -07:00
|
|
|
#endif
|
[glass] Use JSON files for storage instead of imgui ini
Storage is now nested.
Separate "roots" can be configured which save to separate files.
In particular, this is used to save wpigui and ImGui window position
to a -window.json file.
ImGui's ini (for window position) is mapped to JSON.
You can optionally specify a directory to load from on the command line.
If one isn't provided, it uses the global system directory.
Any changes made are automatically saved here.
Workspace | Open: select directory, the current layout is replaced with that
workspace, and future auto-saves also switch to that location. The main
window size/location is not changed, only the contents.
Workspace | Save As: select directory, the current layout is saved there,
and future auto-saves also switch to that location.
Workspace | Reset: window locations are preserved, but all other settings
are reset to default (including e.g. removing plot windows). This will also
end up clearing the current save file. as with load, the main window
size/location is not changed.
Workspace | Save As Global: "save as" to the global system location
Notably, the main window size/location is only loaded at startup, but is
auto-saved as part of the current workspace.
2021-11-25 00:51:00 -08:00
|
|
|
std::string_view saveDir;
|
|
|
|
|
if (argc == 2) {
|
|
|
|
|
saveDir = argv[1];
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-16 22:05:41 -07:00
|
|
|
gui::CreateContext();
|
|
|
|
|
glass::CreateContext();
|
|
|
|
|
|
|
|
|
|
gui::AddIcon(ov::GetResource_ov_16_png());
|
|
|
|
|
gui::AddIcon(ov::GetResource_ov_32_png());
|
|
|
|
|
gui::AddIcon(ov::GetResource_ov_48_png());
|
|
|
|
|
gui::AddIcon(ov::GetResource_ov_64_png());
|
|
|
|
|
gui::AddIcon(ov::GetResource_ov_128_png());
|
|
|
|
|
gui::AddIcon(ov::GetResource_ov_256_png());
|
|
|
|
|
gui::AddIcon(ov::GetResource_ov_512_png());
|
|
|
|
|
|
[glass] Use JSON files for storage instead of imgui ini
Storage is now nested.
Separate "roots" can be configured which save to separate files.
In particular, this is used to save wpigui and ImGui window position
to a -window.json file.
ImGui's ini (for window position) is mapped to JSON.
You can optionally specify a directory to load from on the command line.
If one isn't provided, it uses the global system directory.
Any changes made are automatically saved here.
Workspace | Open: select directory, the current layout is replaced with that
workspace, and future auto-saves also switch to that location. The main
window size/location is not changed, only the contents.
Workspace | Save As: select directory, the current layout is saved there,
and future auto-saves also switch to that location.
Workspace | Reset: window locations are preserved, but all other settings
are reset to default (including e.g. removing plot windows). This will also
end up clearing the current save file. as with load, the main window
size/location is not changed.
Workspace | Save As Global: "save as" to the global system location
Notably, the main window size/location is only loaded at startup, but is
auto-saved as part of the current workspace.
2021-11-25 00:51:00 -08:00
|
|
|
glass::SetStorageName("outlineviewer");
|
|
|
|
|
glass::SetStorageDir(saveDir.empty() ? gui::GetPlatformSaveFileDir()
|
|
|
|
|
: saveDir);
|
|
|
|
|
|
2021-03-16 22:05:41 -07:00
|
|
|
gui::AddInit(NtInitialize);
|
|
|
|
|
|
|
|
|
|
gui::AddLateExecute(DisplayGui);
|
|
|
|
|
|
2021-05-11 23:34:16 -07:00
|
|
|
gui::Initialize("OutlineViewer - DISCONNECTED", 600, 400);
|
2021-03-16 22:05:41 -07:00
|
|
|
gui::Main();
|
|
|
|
|
|
|
|
|
|
gModel.reset();
|
|
|
|
|
gSettings.reset();
|
|
|
|
|
|
|
|
|
|
glass::DestroyContext();
|
|
|
|
|
gui::DestroyContext();
|
2021-11-26 23:19:45 -08:00
|
|
|
|
|
|
|
|
return 0;
|
2021-03-16 22:05:41 -07:00
|
|
|
}
|