Gui: Adding Pause button working, full screen button and labels to buttons on main window gui (#2634)

* Adding names to gui buttoms and adjusting spacing.

* moving refresh button to last slot.

* Changing the implementation to tooltips for hover over them - qstring to detect background color.

* Fixing some themes with inverted tooltip base

* Suggestions / Fixes - Pause and FullScreen Buttons

* Update REUSE.toml

* cleaning up

* Icons stuff

* clang

* Buttons toggle - Cleaning code - Fixing Icons

* cleaning boolean

* Toggle pause and play icons and label to "Resume" when paused.

* Simplifying the toggles.

* New icons and final Push to review

* Reuse

* Icon rename, adding f9 press for pause game when no gui is on without needed of debug menu

* clang + reuse

* clang dosent work on this part

* again Clang

* Last fix for review. Light theme white resume icon fix.

* Proper fix for Resume icon

* New Rebase

* Fixed Orientation with docking issues and cleaning boxlayout code

* Adding spacer to separate actions, sizeslider on top of search bar. And adding margins

* Fixed Background not showing on OLED Theme

* Fixing check marks

* Adding all Daniel Suggestions and fixed F9 not working with debug menu open.

* Clang

* reverting all OLED theme changes

* Final suggestions
This commit is contained in:
Dmugetsu 2025-03-26 15:50:52 -06:00 committed by GitHub
parent 5caab76a45
commit ae2c9a745e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 324 additions and 91 deletions

View file

@ -1,6 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "SDL3/SDL_log.h"
#include "layer.h"
#include <imgui.h>
@ -117,22 +118,6 @@ void L::DrawMenuBar() {
EndMainMenuBar();
}
if (IsKeyPressed(ImGuiKey_F9, false)) {
if (io.KeyCtrl && io.KeyAlt) {
if (!DebugState.ShouldPauseInSubmit()) {
DebugState.RequestFrameDump(dump_frame_count);
}
}
if (!io.KeyCtrl && !io.KeyAlt) {
if (isSystemPaused) {
DebugState.ResumeGuestThreads();
} else {
DebugState.PauseGuestThreads();
}
}
}
if (open_popup_options) {
OpenPopup("GPU Tools Options");
just_opened_options = true;
@ -381,6 +366,32 @@ void L::Draw() {
visibility_toggled = true;
}
if (IsKeyPressed(ImGuiKey_F9, false)) {
if (io.KeyCtrl && io.KeyAlt) {
if (!DebugState.ShouldPauseInSubmit()) {
DebugState.RequestFrameDump(dump_frame_count);
}
} else {
if (DebugState.IsGuestThreadsPaused()) {
DebugState.ResumeGuestThreads();
SDL_Log("Game resumed from Keyboard");
show_pause_status = false;
} else {
DebugState.PauseGuestThreads();
SDL_Log("Game paused from Keyboard");
show_pause_status = true;
}
visibility_toggled = true;
}
}
if (show_pause_status) {
ImVec2 pos = ImVec2(10, 10);
ImU32 color = IM_COL32(255, 255, 255, 255);
ImGui::GetForegroundDrawList()->AddText(pos, color, "Game Paused Press F9 to Resume");
}
if (show_simple_fps) {
if (Begin("Video Info", nullptr,
ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoDecoration |