Added support for a left/right trigger help system button.

This commit is contained in:
Leon Styhre 2022-12-07 17:34:07 +01:00
parent f6c8921132
commit 9e0a6df760
3 changed files with 6 additions and 0 deletions

View file

@ -100,6 +100,8 @@ void HelpStyle::applyTheme(const std::shared_ptr<ThemeData>& theme, const std::s
mCustomButtons.button_lt = elem->get<std::string>(PREFIX "button_lt");
if (elem->has(PREFIX "button_rt"))
mCustomButtons.button_rt = elem->get<std::string>(PREFIX "button_rt");
if (elem->has(PREFIX "button_ltrt"))
mCustomButtons.button_ltrt = elem->get<std::string>(PREFIX "button_ltrt");
// SNES.
if (elem->has(PREFIX "button_a_SNES"))

View file

@ -42,6 +42,7 @@ struct HelpStyle {
std::string button_lr;
std::string button_lt;
std::string button_rt;
std::string button_ltrt;
// SNES
std::string button_a_SNES;

View file

@ -56,6 +56,9 @@ void HelpComponent::assignIcons()
mStyle.mCustomButtons.button_lt;
sIconPathMap["rt"] = mStyle.mCustomButtons.button_rt.empty() ? ":/graphics/help/button_rt.svg" :
mStyle.mCustomButtons.button_rt;
sIconPathMap["ltrt"] = mStyle.mCustomButtons.button_ltrt.empty() ?
":/graphics/help/button_ltrt.svg" :
mStyle.mCustomButtons.button_ltrt;
// These graphics files are custom per controller type.
if (controllerType == "snes") {