Skip to content

Commit

Permalink
display: add title bar, exit button
Browse files Browse the repository at this point in the history
  • Loading branch information
stowmyy committed Oct 9, 2024
1 parent ea740a0 commit 5c3566f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
5 changes: 3 additions & 2 deletions dropship/dropship/src/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ void App::render(bool* p_open) {
}
#endif

static const ImGuiWindowFlags window_flags = ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_AlwaysAutoResize;
//static const ImGuiWindowFlags window_flags = ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_AlwaysAutoResize;
static const ImGuiWindowFlags window_flags = ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_AlwaysAutoResize;
ImGui::SetNextWindowSize(ImVec2(418, 0), ImGuiCond_Once);
ImGui::SetNextWindowPos(ImVec2(99, 99), ImGuiCond_Once);
ImGui::Begin("dashboard", p_open, window_flags);
ImGui::Begin("dropship", p_open, window_flags);

{
/* draw */
Expand Down
21 changes: 13 additions & 8 deletions dropship/dropship/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,20 +444,25 @@ int main(int, char**)
{
App::render(&dashboard_open);
}

else
{
done = true;
}
}
catch (const json::exception& e)
{
//error = std::make_optional<json::exception>(e);
error = std::make_optional<std::runtime_error>(e.what());
}
//catch (const std::exception& e)
//{
// error = e;
//}
//catch (...)
//{
// error = std::make_optional<unknown_exception>();
//}
catch (const std::exception& e)
{
error = e;
}
catch (...)
{
error = std::make_optional<unknown_exception>();
}
}

/* testing */
Expand Down

0 comments on commit 5c3566f

Please sign in to comment.