add client disconnect button

This commit is contained in:
2023-08-14 13:46:10 +02:00
parent 7f650f282c
commit 0c0fd155ed
3 changed files with 15 additions and 0 deletions

View File

@@ -24,6 +24,8 @@ void GameMenu::Render() {
ShowPlayers();
ShowLobbyProgress();
ShowTeamSelection();
ImGui::Separator();
DisconnectButton();
ImGui::End();
}
@@ -33,6 +35,8 @@ void GameMenu::Render() {
ShowTPS();
ShowStats();
ShowPlayers();
ImGui::Separator();
DisconnectButton();
ImGui::End();
@@ -95,5 +99,11 @@ void GameMenu::ShowStats() {
ImGui::Text("EXP: %i", GetClient()->GetGame().GetPlayer()->GetExp());
}
void GameMenu::DisconnectButton() {
if (ImGui::Button("Disconnect")) {
m_Client->CloseConnection();
}
}
} // namespace gui
} // namespace td