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

@ -11,6 +11,7 @@
#include "common/config.h"
#include "common/elf_info.h"
#include "common/version.h"
#include "core/debug_state.h"
#include "core/libraries/kernel/time.h"
#include "core/libraries/pad/pad.h"
#include "imgui/renderer/imgui_core.h"
@ -396,6 +397,25 @@ void WindowSDL::WaitEvent() {
case SDL_EVENT_QUIT:
is_open = false;
break;
case SDL_EVENT_TOGGLE_FULLSCREEN: {
if (SDL_GetWindowFlags(window) & SDL_WINDOW_FULLSCREEN) {
SDL_SetWindowFullscreen(window, 0);
} else {
SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN);
}
break;
}
case SDL_EVENT_TOGGLE_PAUSE:
SDL_Log("Received SDL_EVENT_TOGGLE_PAUSE");
if (DebugState.IsGuestThreadsPaused()) {
SDL_Log("Game Resumed");
DebugState.ResumeGuestThreads();
} else {
SDL_Log("Game Paused");
DebugState.PauseGuestThreads();
}
break;
default:
break;
}