Skip to content
Merged
Show file tree
Hide file tree
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
32 changes: 12 additions & 20 deletions apps/lidar_odometry_step_1/lidar_odometry_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ static const std::vector<ShortcutEntry> appShortcuts = {

namespace fs = std::filesystem;

bool full_lidar_odometry_gui = false;
bool is_settings_gui = false;
bool full_debug_messages = false;
NDT ndt;
bool show_reference_buckets = true;
Expand Down Expand Up @@ -679,9 +679,9 @@ void save_results(bool info, double elapsed_seconds)
}
}

void project_gui()
void settings_gui()
{
if (ImGui::Begin("Settings", &full_lidar_odometry_gui))
if (ImGui::Begin("Settings", &is_settings_gui))
{
ImGui::Checkbox("simple_gui", &simple_gui);
if (ImGui::IsItemHovered())
Expand Down Expand Up @@ -1526,7 +1526,7 @@ void progress_window()

void openData()
{
full_lidar_odometry_gui = false;
is_settings_gui = false;
info_gui = false;

loRunning.store(true);
Expand Down Expand Up @@ -2048,20 +2048,6 @@ void display()
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Processing parameter list");

ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0f);
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(4, 2));
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0));
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImGui::GetStyleColorVec4(ImGuiCol_HeaderHovered));
ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImGui::GetStyleColorVec4(ImGuiCol_Header));
if (ImGui::SmallButton(full_lidar_odometry_gui ? "[X] Full GUI" : "[ ] Full GUI"))
full_lidar_odometry_gui = !full_lidar_odometry_gui;
ImGui::PopStyleVar(2);
ImGui::PopStyleColor(3);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Show power user settings window with more parameters");

ImGui::SameLine();

ImGui::SameLine();
ImGui::Dummy(ImVec2(20, 0));
ImGui::SameLine();
Expand Down Expand Up @@ -2114,6 +2100,12 @@ void display()

bg_color = params.clear_color;

ImGui::Separator();

ImGui::MenuItem("Settings", nullptr, &is_settings_gui);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Show power user settings window with more parameters");

ImGui::EndMenu();
}
if (ImGui::IsItemHovered())
Expand Down Expand Up @@ -2206,11 +2198,11 @@ void display()
stretch_gizmo_m(3, 3) = m_gizmo[15];
}

if (full_lidar_odometry_gui)
if (is_settings_gui)
{
lastPar = 0;

project_gui();
settings_gui();
}

if (loRunning)
Expand Down
Loading
Loading