include the hotbar index in the label displayed for a hotbar (#2770)

* include the hotbar index in the label displayed for a hotbar

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>

* address review comments for hotbarDisplayLabel()

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>

* tweaks to hotbarDisplayLabel()

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
Jim Ehrismann authored and GitHub committed 2021-05-17 07:40:32 +03:00
1 parent 623973add0
commit c594844b9b
5 files changed
+47 -5

No files matched your search

+5 -1
View File
@@ -81,8 +81,12 @@ export class HotbarStore extends BaseStore<HotbarStoreModel> {
}
}
hotbarIndex(id: string) {
return this.hotbars.findIndex((hotbar) => hotbar.id === id);
}
get activeHotbarIndex() {
return this.hotbars.findIndex((hotbar) => hotbar.id === this.activeHotbarId);
return this.hotbarIndex(this.activeHotbarId);
}
get initialItems() {