Skip to content

Commit

Permalink
Library: Improved rename/remove category handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Aemony committed Feb 18, 2024
1 parent dd21c78 commit 79dbc6a
Show file tree
Hide file tree
Showing 4 changed files with 309 additions and 102 deletions.
27 changes: 14 additions & 13 deletions include/SKIF.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,19 +122,20 @@ struct SKIF_Signals { // Used for command line arguments

// External declarations

extern PopupState GameMenu; // Library: used to show context menu for games
extern PopupState ServiceMenu; // Library / Service Mode: used to show an options menu for the service when right clicking
extern PopupState EmptySpaceMenu; // Library: used to show an options menu for the library when right clicking around the play/service buttons
extern PopupState AddGamePopup; // Library: show an add custom game prompt
extern PopupState RemoveGamePopup; // Library: show a remove custom game prompt
extern PopupState ModifyGamePopup; // Library: show a modify custom game prompt
extern PopupState UpdatePromptPopup; // App Mode: show an update prompt
extern PopupState HistoryPopup; // Monitor / About: show a changelog popup
extern PopupState AutoUpdatePopup; // Show changelog from the latest auto-installed update

extern HMODULE hModSpecialK; // Monitor: Used to dynamically load and unload the Special K DLL file when switching back and forth to the tab
extern HWND SKIF_ImGui_hWnd; // Main ImGui platform window (aka the main window of SKIF)
extern HWND SKIF_Notify_hWnd; // Notification area icon "window" that also doubles as a handler for the stuff previously tied to the now removed SKIF_hWnd 0x0 hidden window
extern PopupState GameMenu; // Library: used to show context menu for games
extern PopupState ServiceMenu; // Library / Service Mode: used to show an options menu for the service when right clicking
extern PopupState EmptySpaceMenu; // Library: used to show an options menu for the library when right clicking around the play/service buttons
extern PopupState AddGamePopup; // Library: show an add custom game prompt
extern PopupState RemoveGamePopup; // Library: show a remove custom game prompt
extern PopupState ModifyGamePopup; // Library: show a modify custom game prompt
extern PopupState PopupCategoryModify; // Library: show a modify category prompt
extern PopupState UpdatePromptPopup; // App Mode: show an update prompt
extern PopupState HistoryPopup; // Monitor / About: show a changelog popup
extern PopupState AutoUpdatePopup; // Show changelog from the latest auto-installed update

extern HMODULE hModSpecialK; // Monitor: Used to dynamically load and unload the Special K DLL file when switching back and forth to the tab
extern HWND SKIF_ImGui_hWnd; // Main ImGui platform window (aka the main window of SKIF)
extern HWND SKIF_Notify_hWnd; // Notification area icon "window" that also doubles as a handler for the stuff previously tied to the now removed SKIF_hWnd 0x0 hidden window

extern float SKIF_ImGui_GlobalDPIScale;
extern float SKIF_ImGui_GlobalDPIScale_Last;
Expand Down
14 changes: 9 additions & 5 deletions src/SKIF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2369,14 +2369,16 @@ wWinMain ( _In_ HINSTANCE hInstance,

if (ImGui::IsKeyPressedMap (ImGuiKey_Escape))
{
if (AddGamePopup != PopupState_Closed ||
ModifyGamePopup != PopupState_Closed ||
RemoveGamePopup != PopupState_Closed ||
UpdatePromptPopup != PopupState_Closed ||
HistoryPopup != PopupState_Closed )
if (AddGamePopup != PopupState_Closed ||
ModifyGamePopup != PopupState_Closed ||
PopupCategoryModify != PopupState_Closed ||
RemoveGamePopup != PopupState_Closed ||
UpdatePromptPopup != PopupState_Closed ||
HistoryPopup != PopupState_Closed )
{
AddGamePopup = PopupState_Closed;
ModifyGamePopup = PopupState_Closed;
PopupCategoryModify = PopupState_Closed;
RemoveGamePopup = PopupState_Closed;
UpdatePromptPopup = PopupState_Closed;
HistoryPopup = PopupState_Closed;
Expand Down Expand Up @@ -3320,6 +3322,8 @@ wWinMain ( _In_ HINSTANCE hInstance,
PopupMessageInfo != PopupState_Opened &&
ModifyGamePopup != PopupState_Open &&
ModifyGamePopup != PopupState_Opened &&
PopupCategoryModify != PopupState_Open &&
PopupCategoryModify != PopupState_Opened &&
UpdatePromptPopup != PopupState_Open &&
UpdatePromptPopup != PopupState_Opened &&
HistoryPopup != PopupState_Open &&
Expand Down
Loading

0 comments on commit 79dbc6a

Please sign in to comment.