Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/frontend
diff options
context:
space:
mode:
authoremmie <emmyposs@proton.me>2025-05-16 19:23:21 +0200
committeremmie <emmyposs@proton.me>2025-05-16 19:30:28 +0200
commitaf0a79d66ac4df015b4927b47176e7dc60e5089c (patch)
tree702885dfdde8aa1465e0f57637c70bc0a98f7ce6 /source/frontend
parentda281a0c5286014f952b5a8ce2f346f99c114089 (diff)
handle binds for action bar slots 7-10 if present
Diffstat (limited to 'source/frontend')
-rw-r--r--source/frontend/StarActionBar.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/frontend/StarActionBar.cpp b/source/frontend/StarActionBar.cpp
index 9f78626..7a850b7 100644
--- a/source/frontend/StarActionBar.cpp
+++ b/source/frontend/StarActionBar.cpp
@@ -172,7 +172,8 @@ bool ActionBar::sendEvent(InputEvent const& event) {
}
for (auto action : context()->actions(event)) {
- if (action >= InterfaceAction::InterfaceBar1 && action <= InterfaceAction::InterfaceBar6)
+ if (action >= InterfaceAction::InterfaceBar1 && action <= InterfaceAction::InterfaceBar10
+ && ((int)action - (int)InterfaceAction::InterfaceBar1) < inventory->customBarIndexes())
inventory->selectActionBarLocation((CustomBarIndex)((int)action - (int)InterfaceAction::InterfaceBar1));
if (action >= InterfaceAction::EssentialBar1 && action <= InterfaceAction::EssentialBar4)