Skip to content

Commit

Permalink
fix arrow key binding breaking up-down combo to close folder
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Jun 26, 2021
1 parent 2d9f5ff commit 0537ace
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Themes/Til Death/metrics.ini
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ Mines=GetCodeForGame("Mines")
CancelAll=GetCodeForGame("CancelAll")
NextGroup=GetCodeForGame("NextGroup")
PrevGroup=GetCodeForGame("PrevGroup")
CloseCurrentFolder=GetCodeForGame("CloseCurrentFolder")
CloseCurrentFolder1=GetCodeForGame("CloseCurrentFolder1")
CloseCurrentFolder2=GetCodeForGame("CloseCurrentFolder2")
Hidden=GetCodeForGame("Hidden")
SaveScreenshot1=GetCodeForGame("SaveScreenshot1")
SaveScreenshot2=GetCodeForGame("SaveScreenshot2")
Expand Down
5 changes: 4 additions & 1 deletion Themes/_fallback/Scripts/03 Gameplay.lua
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,12 @@ local CodeDetectorCodes = {
solo = "",
pump = ""
},
CloseCurrentFolder = {
CloseCurrentFolder1 = {
default = "MenuUp-MenuDown"
},
CloseCurrentFolder2 = {
default = "Up-Down"
},
-- sorts
NextSort1 = {
default = "@MenuLeft-@MenuRight-Start",
Expand Down
3 changes: 2 additions & 1 deletion Themes/_fallback/metrics.ini
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ Dark=GetCodeForGame("Dark")
CancelAll=GetCodeForGame("CancelAll")
NextGroup=GetCodeForGame("NextGroup")
PrevGroup=GetCodeForGame("PrevGroup")
CloseCurrentFolder=GetCodeForGame("CloseCurrentFolder")
CloseCurrentFolder1=GetCodeForGame("CloseCurrentFolder1")
CloseCurrentFolder2=GetCodeForGame("CloseCurrentFolder2")
Hidden=GetCodeForGame("Hidden")
SaveScreenshot1=GetCodeForGame("SaveScreenshot1")
SaveScreenshot2=GetCodeForGame("SaveScreenshot2")
Expand Down
6 changes: 4 additions & 2 deletions src/Etterna/Models/Misc/CodeDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ const char* CodeNames[] = {
"SaveScreenshot1",
"SaveScreenshot2",
"CancelAllPlayerOptions",
"CloseCurrentFolder",
"CloseCurrentFolder1",
"CloseCurrentFolder2",
};
XToString(Code);

Expand Down Expand Up @@ -68,7 +69,8 @@ CodeDetector::RefreshCacheItems(std::string sClass)
bool
CodeDetector::EnteredCloseFolder(GameController controller)
{
return EnteredCode(controller, CODE_CLOSE_CURRENT_FOLDER);
return EnteredCode(controller, CODE_CLOSE_CURRENT_FOLDER1) ||
EnteredCode(controller, CODE_CLOSE_CURRENT_FOLDER2);
}

bool
Expand Down
3 changes: 2 additions & 1 deletion src/Etterna/Models/Misc/CodeDetector.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ enum Code
CODE_SAVE_SCREENSHOT1,
CODE_SAVE_SCREENSHOT2,
CODE_CANCEL_ALL_PLAYER_OPTIONS,
CODE_CLOSE_CURRENT_FOLDER,
CODE_CLOSE_CURRENT_FOLDER1,
CODE_CLOSE_CURRENT_FOLDER2,
NUM_Code // leave this at the end
};

Expand Down

0 comments on commit 0537ace

Please sign in to comment.