Skip to content

Commit

Permalink
quality: dashboard information
Browse files Browse the repository at this point in the history
  • Loading branch information
stowmyy committed Oct 25, 2023
1 parent 79fb365 commit c6d8f6c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dropship/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ OPTIONS options
#endif
};

const AppStore __default__appStore
AppStore __default__appStore
{
//._window_overlaying = "";
.dashboard =
{
.title = "Servers",
.heading = "Changes will be applied after closing the game"
.heading = "Changes will be applied immediately."
},
.application_open = false
};
Expand Down
30 changes: 30 additions & 0 deletions dropship/src/DashboardManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ extern ImFont* font_text;

extern OPTIONS options;
extern AppStore appStore;
extern AppStore __default__appStore;

extern FirewallManager firewallManager;

Expand Down Expand Up @@ -318,6 +319,12 @@ DashboardManager::DashboardManager() :
if (__previous__application_open && !appStore.application_open)
{
firewallManager.sync(&(this->endpoints));
appStore.dashboard.heading = __default__appStore.dashboard.heading;
}

if (!__previous__application_open && appStore.application_open)
{
appStore.dashboard.heading = "Changes will be applied after closing the game";
}

if (this->processes[process_name].icon.texture == nullptr)
Expand Down Expand Up @@ -550,6 +557,29 @@ void DashboardManager::RenderInline()
}
ImGui::EndGroup();

/*{
static const auto width = 140;
bool selected;
ImGui::SameLine(NULL, 0);
ImGui::Dummy({ ImGui::GetContentRegionAvail().x - width , 20 });
ImGui::SameLine(NULL, 0);
ImGui::Selectable("disable", &selected, 0, { width, 40 });
static const auto color_2 = ImGui::ColorConvertFloat4ToU32({ .4, .4, .4, 1.0f });
list->AddRectFilled(ImGui::GetItemRectMin(), ImGui::GetItemRectMax(), color_2, 9);
auto const pos = ImGui::GetItemRectMin() + style.FramePadding;
list->AddImage(_get_texture("icon_skull"), pos, pos + ImVec2(24, 24), ImVec2(0, 0), ImVec2(1, 1), white);
list->AddText(pos + style.FramePadding + ImVec2(24, -8), white, "KILLSWITCH");
}*/



if (ImGui::IsItemClicked() && process.window)
{
// focus window
Expand Down

0 comments on commit c6d8f6c

Please sign in to comment.