fix retour / quitter button
All checks were successful
Linux arm64 / Build (push) Successful in 4m35s
All checks were successful
Linux arm64 / Build (push) Successful in 4m35s
This commit is contained in:
@@ -160,33 +160,6 @@ void OptionsMenu::Render() {
|
||||
|
||||
ImGui::NewLine();
|
||||
|
||||
if (ImGui::Button("Retour") || (ImGui::IsKeyPressed(ImGuiKey_Escape, false) && !m_IsKeyPopupOpen)) {
|
||||
Disable();
|
||||
if (m_Client->IsConnected()) {
|
||||
ImGui::SetCursorPosX(displaySize.x - buttonSize.x - paddingHeight);
|
||||
ImGui::SetCursorPosY(displaySize.y - 2 * buttonSize.y - paddingHeight);
|
||||
} else {
|
||||
ImGui::SetCursorPosX(displaySize.x - buttonSize.x - paddingHeight);
|
||||
ImGui::SetCursorPosY(displaySize.y - buttonSize.y - paddingHeight);
|
||||
}
|
||||
ImGui::BeginGroup();
|
||||
if (ImGui::Button("Retour", buttonSize) || ImGui::IsKeyPressed(ImGuiKey_Escape)) {
|
||||
Disable();
|
||||
if (m_Client->IsConnected()) {
|
||||
InputManager::GrabMouse(true);
|
||||
} else {
|
||||
m_Parent->Enable();
|
||||
}
|
||||
}
|
||||
if (m_Client->IsConnected()) {
|
||||
if (ImGui::Button("Quitter la partie", buttonSize)) {
|
||||
m_Client->Disconnect();
|
||||
Disable();
|
||||
m_Parent->Enable();
|
||||
}
|
||||
}
|
||||
ImGui::EndGroup();
|
||||
}
|
||||
ImGuiTabBarFlags tab_bar_flags = ImGuiTabBarFlags_None;
|
||||
if (ImGui::BeginTabBar("OPTIONS", tab_bar_flags)) {
|
||||
if (ImGui::BeginTabItem("CONTROLES")) {
|
||||
@@ -214,6 +187,33 @@ void OptionsMenu::Render() {
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
ImGui::EndTabBar();
|
||||
|
||||
if (m_Client->IsConnected()) {
|
||||
ImGui::SetCursorPosX(displaySize.x - buttonSize.x - paddingHeight);
|
||||
ImGui::SetCursorPosY(displaySize.y - 2 * buttonSize.y - paddingHeight);
|
||||
} else {
|
||||
ImGui::SetCursorPosX(displaySize.x - buttonSize.x - paddingHeight);
|
||||
ImGui::SetCursorPosY(displaySize.y - buttonSize.y - paddingHeight);
|
||||
}
|
||||
ImGui::BeginGroup();
|
||||
{
|
||||
if (ImGui::Button("Retour", buttonSize) || ImGui::IsKeyPressed(ImGuiKey_Escape)) {
|
||||
Disable();
|
||||
if (m_Client->IsConnected()) {
|
||||
InputManager::GrabMouse(true);
|
||||
} else {
|
||||
m_Parent->Enable();
|
||||
}
|
||||
}
|
||||
if (m_Client->IsConnected()) {
|
||||
if (ImGui::Button("Quitter la partie", buttonSize)) {
|
||||
m_Client->Disconnect();
|
||||
Disable();
|
||||
m_Parent->Enable();
|
||||
}
|
||||
}
|
||||
}
|
||||
ImGui::EndGroup();
|
||||
}
|
||||
}
|
||||
ImGui::End();
|
||||
|
||||
Reference in New Issue
Block a user