Added 'thumbstickclick' as a supported 'entries' property value for the helpsystem element

This commit is contained in:
Leon Styhre 2025-02-03 19:48:20 +01:00
parent f13c12464e
commit 82fdfe7706
2 changed files with 5 additions and 3 deletions

View file

@ -818,10 +818,11 @@ void Window::setHelpPrompts(const std::vector<HelpPrompt>& prompts)
}
}
// Sort prompts so it goes [dpad_all] [dpad_u/d] [dpad_l/r] [a/b/x/y/l/r] [start/back].
// Sort the prompts so that they are always displayed in the same order on screen.
std::sort(addPrompts.begin(), addPrompts.end(),
[](const HelpPrompt& a, const HelpPrompt& b) -> bool {
static const std::vector<std::string> map {"up/down/left/right",
static const std::vector<std::string> map {"thumbstickclick",
"up/down/left/right",
"up/down",
"up",
"down",

View file

@ -54,7 +54,8 @@ private:
std::shared_ptr<Font> mStyleFontDimmed;
std::vector<std::string> mEntries;
static inline std::vector<std::string> sAllowedEntries {"up/down/left/right",
static inline std::vector<std::string> sAllowedEntries {"thumbstickclick",
"up/down/left/right",
"up/down",
"up",
"down",