diff --git a/core/src/main/assets/messages/windows/windows.properties b/core/src/main/assets/messages/windows/windows.properties index 732c9be80..d9f45b270 100644 --- a/core/src/main/assets/messages/windows/windows.properties +++ b/core/src/main/assets/messages/windows/windows.properties @@ -106,6 +106,8 @@ windows.wndkeybindings.quickslot_1=Quickslot 1 windows.wndkeybindings.quickslot_2=Quickslot 2 windows.wndkeybindings.quickslot_3=Quickslot 3 windows.wndkeybindings.quickslot_4=Quickslot 4 +windows.wndkeybindings.quickslot_5=Quickslot 5 +windows.wndkeybindings.quickslot_6=Quickslot 6 windows.wndkeybindings.tag_attack=Attack Enemy windows.wndkeybindings.tag_danger=Switch Enemy windows.wndkeybindings.tag_action=Special Action diff --git a/core/src/main/assets/messages/windows/windows_ca.properties b/core/src/main/assets/messages/windows/windows_ca.properties index 3da3ad954..fd5d86bc9 100644 --- a/core/src/main/assets/messages/windows/windows_ca.properties +++ b/core/src/main/assets/messages/windows/windows_ca.properties @@ -106,6 +106,8 @@ windows.wndkeybindings.quickslot_1=Accés directe 1 windows.wndkeybindings.quickslot_2=Accés directe 2 windows.wndkeybindings.quickslot_3=Accés directe 3 windows.wndkeybindings.quickslot_4=Accés directe 4 +windows.wndkeybindings.quickslot_5=Accés directe 5 +windows.wndkeybindings.quickslot_6=Accés directe 6 windows.wndkeybindings.tag_attack=Atacar Enemic windows.wndkeybindings.tag_danger=Canviar Enemic windows.wndkeybindings.tag_action=Acció Especial diff --git a/core/src/main/assets/messages/windows/windows_cs.properties b/core/src/main/assets/messages/windows/windows_cs.properties index dc8158026..f7162ce47 100644 --- a/core/src/main/assets/messages/windows/windows_cs.properties +++ b/core/src/main/assets/messages/windows/windows_cs.properties @@ -106,6 +106,8 @@ windows.wndkeybindings.quickslot_1=Rychlý slot 1 windows.wndkeybindings.quickslot_2=Rychlý slot 2 windows.wndkeybindings.quickslot_3=Rychlý slot 3 windows.wndkeybindings.quickslot_4=Rychlý slot 4 +windows.wndkeybindings.quickslot_5=Rychlý slot 5 +windows.wndkeybindings.quickslot_6=Rychlý slot 6 windows.wndkeybindings.tag_attack=Zaútočit windows.wndkeybindings.tag_danger=Prohodit nepřítele windows.wndkeybindings.tag_action=Speciální akce diff --git a/core/src/main/assets/messages/windows/windows_de.properties b/core/src/main/assets/messages/windows/windows_de.properties index f9d18ad21..118c450cd 100644 --- a/core/src/main/assets/messages/windows/windows_de.properties +++ b/core/src/main/assets/messages/windows/windows_de.properties @@ -106,6 +106,8 @@ windows.wndkeybindings.quickslot_1=Schnellzugriff 1 windows.wndkeybindings.quickslot_2=Schnellzugriff 2 windows.wndkeybindings.quickslot_3=Schnellzugriff 3 windows.wndkeybindings.quickslot_4=Schnellzugriff 4 +windows.wndkeybindings.quickslot_5=Schnellzugriff 5 +windows.wndkeybindings.quickslot_6=Schnellzugriff 6 windows.wndkeybindings.tag_attack=Feind angreifen windows.wndkeybindings.tag_danger=Ziel wechseln windows.wndkeybindings.tag_action=Spezialaktion diff --git a/core/src/main/assets/messages/windows/windows_el.properties b/core/src/main/assets/messages/windows/windows_el.properties index 2a64ef3a0..b864747a0 100644 --- a/core/src/main/assets/messages/windows/windows_el.properties +++ b/core/src/main/assets/messages/windows/windows_el.properties @@ -106,6 +106,8 @@ windows.wndkeybindings.quickslot_1=Ταχεία θέση 1 windows.wndkeybindings.quickslot_2=Ταχεία θέση 2 windows.wndkeybindings.quickslot_3=Ταχεία θέση 3 windows.wndkeybindings.quickslot_4=Ταχεία θέση 4 +windows.wndkeybindings.quickslot_5=Ταχεία θέση 5 +windows.wndkeybindings.quickslot_6=Ταχεία θέση 6 windows.wndkeybindings.tag_attack=Επίθεση σε εχθρό windows.wndkeybindings.tag_danger=Αλλαγή εχθρού windows.wndkeybindings.tag_action=Ειδική ενέργεια diff --git a/core/src/main/assets/messages/windows/windows_eo.properties b/core/src/main/assets/messages/windows/windows_eo.properties index 9344df24a..cfd88eee2 100644 --- a/core/src/main/assets/messages/windows/windows_eo.properties +++ b/core/src/main/assets/messages/windows/windows_eo.properties @@ -106,6 +106,8 @@ windows.wndkeybindings.quickslot_1=Rapidbutono 1 windows.wndkeybindings.quickslot_2=Rapidbutono 2 windows.wndkeybindings.quickslot_3=Rapidbutono 3 windows.wndkeybindings.quickslot_4=Rapidbutono 4 +windows.wndkeybindings.quickslot_5=Rapidbutono 5 +windows.wndkeybindings.quickslot_6=Rapidbutono 6 windows.wndkeybindings.tag_attack=Ataki kontraŭulon windows.wndkeybindings.tag_danger=Ŝanĝi kontraŭulon windows.wndkeybindings.tag_action=Speciala ago diff --git a/core/src/main/assets/messages/windows/windows_es.properties b/core/src/main/assets/messages/windows/windows_es.properties index 0c27b9620..0357491d3 100644 --- a/core/src/main/assets/messages/windows/windows_es.properties +++ b/core/src/main/assets/messages/windows/windows_es.properties @@ -106,6 +106,8 @@ windows.wndkeybindings.quickslot_1=Acceso Directo 1 windows.wndkeybindings.quickslot_2=Acceso Directo 2 windows.wndkeybindings.quickslot_3=Acceso Directo 3 windows.wndkeybindings.quickslot_4=Acceso Directo 4 +windows.wndkeybindings.quickslot_5=Acceso Directo 5 +windows.wndkeybindings.quickslot_6=Acceso Directo 6 windows.wndkeybindings.tag_attack=Atacar Enemigo windows.wndkeybindings.tag_danger=Cambiar Enemigo windows.wndkeybindings.tag_action=Acción Especial diff --git a/core/src/main/assets/messages/windows/windows_eu.properties b/core/src/main/assets/messages/windows/windows_eu.properties index 064eade00..25d26ddf3 100644 --- a/core/src/main/assets/messages/windows/windows_eu.properties +++ b/core/src/main/assets/messages/windows/windows_eu.properties @@ -106,6 +106,8 @@ windows.wndkeybindings.quickslot_1=1. laster-marka windows.wndkeybindings.quickslot_2=2. laster-marka windows.wndkeybindings.quickslot_3=3. laster-marka windows.wndkeybindings.quickslot_4=4. laster-marka +windows.wndkeybindings.quickslot_5=5. laster-marka +windows.wndkeybindings.quickslot_6=6. laster-marka windows.wndkeybindings.tag_attack=Eraso etsaia windows.wndkeybindings.tag_danger=Aldatu etsaia windows.wndkeybindings.tag_action=Ekintza berezia diff --git a/core/src/main/assets/messages/windows/windows_fi.properties b/core/src/main/assets/messages/windows/windows_fi.properties index 4c688fde4..5e50cd06f 100644 --- a/core/src/main/assets/messages/windows/windows_fi.properties +++ b/core/src/main/assets/messages/windows/windows_fi.properties @@ -106,6 +106,8 @@ windows.wndkeybindings.quickslot_1=Pikavalinta 1 windows.wndkeybindings.quickslot_2=Pikavalinta 2 windows.wndkeybindings.quickslot_3=Pikavalinta 3 windows.wndkeybindings.quickslot_4=Pikavalinta 4 +windows.wndkeybindings.quickslot_5=Pikavalinta 5 +windows.wndkeybindings.quickslot_6=Pikavalinta 6 windows.wndkeybindings.tag_attack=Hyökkää windows.wndkeybindings.tag_danger=Vaihda kohdetta windows.wndkeybindings.tag_action=Erikoisvalinta diff --git a/core/src/main/assets/messages/windows/windows_fr.properties b/core/src/main/assets/messages/windows/windows_fr.properties index 55a5507b9..1d67c279d 100644 --- a/core/src/main/assets/messages/windows/windows_fr.properties +++ b/core/src/main/assets/messages/windows/windows_fr.properties @@ -106,6 +106,8 @@ windows.wndkeybindings.quickslot_1=Accès rapide 1 windows.wndkeybindings.quickslot_2=Accès rapide 2 windows.wndkeybindings.quickslot_3=Accès rapide 3 windows.wndkeybindings.quickslot_4=Accès rapide 4 +windows.wndkeybindings.quickslot_5=Accès rapide 5 +windows.wndkeybindings.quickslot_6=Accès rapide 6 windows.wndkeybindings.tag_attack=Attaquer l’ennemi windows.wndkeybindings.tag_danger=Changer d'ennemi windows.wndkeybindings.tag_action=Action spéciale diff --git a/core/src/main/assets/messages/windows/windows_hu.properties b/core/src/main/assets/messages/windows/windows_hu.properties index a1897b8bf..2f1f37b35 100644 --- a/core/src/main/assets/messages/windows/windows_hu.properties +++ b/core/src/main/assets/messages/windows/windows_hu.properties @@ -106,6 +106,8 @@ windows.wndkeybindings.quickslot_1=Gyors mentés 1 windows.wndkeybindings.quickslot_2=Gyors mentés 2 windows.wndkeybindings.quickslot_3=Gyors mentés 3 windows.wndkeybindings.quickslot_4=Gyors mentés 4 +windows.wndkeybindings.quickslot_5=Gyors mentés 5 +windows.wndkeybindings.quickslot_6=Gyors mentés 6 windows.wndkeybindings.tag_attack=Támad windows.wndkeybindings.tag_danger=Ellenség váltás windows.wndkeybindings.tag_action=Különleges művelet diff --git a/core/src/main/assets/messages/windows/windows_in.properties b/core/src/main/assets/messages/windows/windows_in.properties index 931ecfd35..41b256cea 100644 --- a/core/src/main/assets/messages/windows/windows_in.properties +++ b/core/src/main/assets/messages/windows/windows_in.properties @@ -106,6 +106,8 @@ windows.wndkeybindings.quickslot_1=Slot Cepat 1 windows.wndkeybindings.quickslot_2=Slot Cepat 2 windows.wndkeybindings.quickslot_3=Slot Cepat 3 windows.wndkeybindings.quickslot_4=Slot Cepat 4 +windows.wndkeybindings.quickslot_5=Slot Cepat 5 +windows.wndkeybindings.quickslot_6=Slot Cepat 6 windows.wndkeybindings.tag_attack=Serang Musuh windows.wndkeybindings.tag_danger=Ganti Musuh windows.wndkeybindings.tag_action=Tindakan Khusus diff --git a/core/src/main/assets/messages/windows/windows_it.properties b/core/src/main/assets/messages/windows/windows_it.properties index f0768966c..c61698b48 100644 --- a/core/src/main/assets/messages/windows/windows_it.properties +++ b/core/src/main/assets/messages/windows/windows_it.properties @@ -106,6 +106,8 @@ windows.wndkeybindings.quickslot_1=Quickslot 1 windows.wndkeybindings.quickslot_2=Quickslot 2 windows.wndkeybindings.quickslot_3=Quickslot 3 windows.wndkeybindings.quickslot_4=Quickslot 4 +windows.wndkeybindings.quickslot_5=Quickslot 5 +windows.wndkeybindings.quickslot_6=Quickslot 6 windows.wndkeybindings.tag_attack=Attacca Nemico windows.wndkeybindings.tag_danger=Cambia Nemico windows.wndkeybindings.tag_action=Azione Speciale diff --git a/core/src/main/assets/messages/windows/windows_ja.properties b/core/src/main/assets/messages/windows/windows_ja.properties index 3af71e896..355746a04 100644 --- a/core/src/main/assets/messages/windows/windows_ja.properties +++ b/core/src/main/assets/messages/windows/windows_ja.properties @@ -106,6 +106,8 @@ windows.wndkeybindings.quickslot_1=ショートカット1 windows.wndkeybindings.quickslot_2=ショートカット2 windows.wndkeybindings.quickslot_3=ショートカット3 windows.wndkeybindings.quickslot_4=ショートカット4 +windows.wndkeybindings.quickslot_5=ショートカット5 +windows.wndkeybindings.quickslot_6=ショートカット6 windows.wndkeybindings.tag_attack=敵を攻撃 windows.wndkeybindings.tag_danger=敵を切り替え windows.wndkeybindings.tag_action=特別な行動 diff --git a/core/src/main/assets/messages/windows/windows_ko.properties b/core/src/main/assets/messages/windows/windows_ko.properties index f9a23c5ff..090f7c57e 100644 --- a/core/src/main/assets/messages/windows/windows_ko.properties +++ b/core/src/main/assets/messages/windows/windows_ko.properties @@ -106,6 +106,8 @@ windows.wndkeybindings.quickslot_1=1번째 퀵슬롯 windows.wndkeybindings.quickslot_2=2번째 퀵슬롯 windows.wndkeybindings.quickslot_3=3번째 퀵슬롯 windows.wndkeybindings.quickslot_4=4번째 퀵슬롯 +windows.wndkeybindings.quickslot_5=5번째 퀵슬롯 +windows.wndkeybindings.quickslot_6=6번째 퀵슬롯 windows.wndkeybindings.tag_attack=적 공격 windows.wndkeybindings.tag_danger=목표 전환 windows.wndkeybindings.tag_action=특수 행동 diff --git a/core/src/main/assets/messages/windows/windows_pl.properties b/core/src/main/assets/messages/windows/windows_pl.properties index d7ca4f2b6..7e88a90c5 100644 --- a/core/src/main/assets/messages/windows/windows_pl.properties +++ b/core/src/main/assets/messages/windows/windows_pl.properties @@ -106,6 +106,8 @@ windows.wndkeybindings.quickslot_1=Szybki dostęp 1 windows.wndkeybindings.quickslot_2=Szybki dostęp 2 windows.wndkeybindings.quickslot_3=Szybki dostęp 3 windows.wndkeybindings.quickslot_4=Szybki dostęp 4 +windows.wndkeybindings.quickslot_5=Szybki dostęp 5 +windows.wndkeybindings.quickslot_6=Szybki dostęp 6 windows.wndkeybindings.tag_attack=Atakuj przeciwnika windows.wndkeybindings.tag_danger=Zmień przeciwnika windows.wndkeybindings.tag_action=Specjalna akcja diff --git a/core/src/main/assets/messages/windows/windows_pt.properties b/core/src/main/assets/messages/windows/windows_pt.properties index 73e89d4c2..1d73331ed 100644 --- a/core/src/main/assets/messages/windows/windows_pt.properties +++ b/core/src/main/assets/messages/windows/windows_pt.properties @@ -106,6 +106,8 @@ windows.wndkeybindings.quickslot_1=Slot rápido 1 windows.wndkeybindings.quickslot_2=Slot rápido 2 windows.wndkeybindings.quickslot_3=Slot rápido 3 windows.wndkeybindings.quickslot_4=Slot rápido 4 +windows.wndkeybindings.quickslot_5=Slot rápido 5 +windows.wndkeybindings.quickslot_6=Slot rápido 6 windows.wndkeybindings.tag_attack=Ataque Inimigo windows.wndkeybindings.tag_danger=Trocar Inimigo windows.wndkeybindings.tag_action=Ação Especial diff --git a/core/src/main/assets/messages/windows/windows_ru.properties b/core/src/main/assets/messages/windows/windows_ru.properties index e90e7f1ce..5ad85fef2 100644 --- a/core/src/main/assets/messages/windows/windows_ru.properties +++ b/core/src/main/assets/messages/windows/windows_ru.properties @@ -106,6 +106,8 @@ windows.wndkeybindings.quickslot_1=Быстрый доступ 1 windows.wndkeybindings.quickslot_2=Быстрый доступ 2 windows.wndkeybindings.quickslot_3=Быстрый доступ 3 windows.wndkeybindings.quickslot_4=Быстрый доступ 4 +windows.wndkeybindings.quickslot_5=Быстрый доступ 5 +windows.wndkeybindings.quickslot_6=Быстрый доступ 6 windows.wndkeybindings.tag_attack=Атаковать противника windows.wndkeybindings.tag_danger=Переключить противника windows.wndkeybindings.tag_action=Специальное действие diff --git a/core/src/main/assets/messages/windows/windows_tr.properties b/core/src/main/assets/messages/windows/windows_tr.properties index d4264bf07..572792806 100644 --- a/core/src/main/assets/messages/windows/windows_tr.properties +++ b/core/src/main/assets/messages/windows/windows_tr.properties @@ -106,6 +106,8 @@ windows.wndkeybindings.quickslot_1=Hızlı Yer 1 windows.wndkeybindings.quickslot_2=Hızlı Yer 2 windows.wndkeybindings.quickslot_3=Hızlı Yer 3 windows.wndkeybindings.quickslot_4=Hızlı Yer 4 +windows.wndkeybindings.quickslot_5=Hızlı Yer 5 +windows.wndkeybindings.quickslot_6=Hızlı Yer 6 windows.wndkeybindings.tag_attack=Düşmana Saldır windows.wndkeybindings.tag_danger=Düşmanı Değiştir windows.wndkeybindings.tag_action=Özel Eylem diff --git a/core/src/main/assets/messages/windows/windows_uk.properties b/core/src/main/assets/messages/windows/windows_uk.properties index 03252df2a..24248b1ea 100644 --- a/core/src/main/assets/messages/windows/windows_uk.properties +++ b/core/src/main/assets/messages/windows/windows_uk.properties @@ -106,6 +106,8 @@ windows.wndkeybindings.quickslot_1=Швидкий слот 1 windows.wndkeybindings.quickslot_2=Швидкий слот 2 windows.wndkeybindings.quickslot_3=Швидкий слот 3 windows.wndkeybindings.quickslot_4=Швидкий слот 4 +windows.wndkeybindings.quickslot_5=Швидкий слот 5 +windows.wndkeybindings.quickslot_6=Швидкий слот 6 windows.wndkeybindings.tag_attack=Атакувати ворога windows.wndkeybindings.tag_danger=Змінити ціль windows.wndkeybindings.tag_action=Спеціальна дія diff --git a/core/src/main/assets/messages/windows/windows_zh.properties b/core/src/main/assets/messages/windows/windows_zh.properties index 8452b5309..319791e75 100644 --- a/core/src/main/assets/messages/windows/windows_zh.properties +++ b/core/src/main/assets/messages/windows/windows_zh.properties @@ -106,6 +106,8 @@ windows.wndkeybindings.quickslot_1=快捷栏1 windows.wndkeybindings.quickslot_2=快捷栏2 windows.wndkeybindings.quickslot_3=快捷栏3 windows.wndkeybindings.quickslot_4=快捷栏4 +windows.wndkeybindings.quickslot_5=快捷栏5 +windows.wndkeybindings.quickslot_6=快捷栏6 windows.wndkeybindings.tag_attack=攻击 windows.wndkeybindings.tag_danger=切换攻击目标 windows.wndkeybindings.tag_action=特殊行动 diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/QuickSlot.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/QuickSlot.java index 6b2039c08..2666bde38 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/QuickSlot.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/QuickSlot.java @@ -37,7 +37,7 @@ public class QuickSlot { */ //note that the current max size is coded at 4, due to UI constraints, but it could be much much bigger with no issue. - public static int SIZE = 4; + public static int SIZE = 6; private Item[] slots = new Item[SIZE]; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/SPDAction.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/SPDAction.java index e1b46a4a8..e21529e49 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/SPDAction.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/SPDAction.java @@ -53,6 +53,8 @@ public class SPDAction extends GameAction { public static final GameAction QUICKSLOT_2 = new SPDAction("quickslot_2"); public static final GameAction QUICKSLOT_3 = new SPDAction("quickslot_3"); public static final GameAction QUICKSLOT_4 = new SPDAction("quickslot_4"); + public static final GameAction QUICKSLOT_5 = new SPDAction("quickslot_5"); + public static final GameAction QUICKSLOT_6 = new SPDAction("quickslot_6"); public static final GameAction TAG_ATTACK = new SPDAction("tag_attack"); public static final GameAction TAG_DANGER = new SPDAction("tag_danger"); @@ -85,10 +87,12 @@ public class SPDAction extends GameAction { defaultBindings.put( Input.Keys.Z, SPDAction.REST ); defaultBindings.put( Input.Keys.I, SPDAction.INVENTORY ); - defaultBindings.put( Input.Keys.Q, SPDAction.QUICKSLOT_1 ); - defaultBindings.put( Input.Keys.W, SPDAction.QUICKSLOT_2 ); - defaultBindings.put( Input.Keys.E, SPDAction.QUICKSLOT_3 ); - defaultBindings.put( Input.Keys.R, SPDAction.QUICKSLOT_4 ); + defaultBindings.put( Input.Keys.NUM_1, SPDAction.QUICKSLOT_1 ); + defaultBindings.put( Input.Keys.NUM_2, SPDAction.QUICKSLOT_2 ); + defaultBindings.put( Input.Keys.NUM_3, SPDAction.QUICKSLOT_3 ); + defaultBindings.put( Input.Keys.NUM_4, SPDAction.QUICKSLOT_4 ); + defaultBindings.put( Input.Keys.NUM_5, SPDAction.QUICKSLOT_5 ); + defaultBindings.put( Input.Keys.NUM_6, SPDAction.QUICKSLOT_6 ); defaultBindings.put( Input.Keys.A, SPDAction.TAG_ATTACK ); defaultBindings.put( Input.Keys.TAB, SPDAction.TAG_DANGER ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java index b29700e5b..0824e7932 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java @@ -22,6 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.ui; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.QuickSlot; import com.shatteredpixel.shatteredpixeldungeon.SPDAction; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; @@ -40,7 +41,7 @@ import com.watabou.utils.PathFinder; public class QuickSlotButton extends Button { - private static QuickSlotButton[] instance = new QuickSlotButton[4]; + private static QuickSlotButton[] instance = new QuickSlotButton[QuickSlot.SIZE]; private int slotNum; private ItemSlot slot; @@ -67,7 +68,7 @@ public class QuickSlotButton extends Button { } public static void reset() { - instance = new QuickSlotButton[4]; + instance = new QuickSlotButton[QuickSlot.SIZE]; lastTarget = null; } @@ -169,6 +170,10 @@ public class QuickSlotButton extends Button { return SPDAction.QUICKSLOT_3; case 3: return SPDAction.QUICKSLOT_4; + case 4: + return SPDAction.QUICKSLOT_5; + case 5: + return SPDAction.QUICKSLOT_6; default: return super.keyAction(); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Toolbar.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Toolbar.java index d42412dfe..1f424e1b5 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Toolbar.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Toolbar.java @@ -74,9 +74,16 @@ public class Toolbar extends Component { @Override protected void createChildren() { - - btnQuick = new QuickslotTool[4]; - + + if (SPDSettings.interfaceSize() > 0) { + btnQuick = new QuickslotTool[6]; + + add( btnQuick[5] = new QuickslotTool(64, 0, 22, 24, 5) ); + add( btnQuick[4] = new QuickslotTool(64, 0, 22, 24, 4) ); + } else { + //TODO add functionality for 6 slots on mobile + btnQuick = new QuickslotTool[4]; + } add( btnQuick[3] = new QuickslotTool(64, 0, 22, 24, 3) ); add( btnQuick[2] = new QuickslotTool(64, 0, 22, 24, 2) ); add( btnQuick[1] = new QuickslotTool(64, 0, 22, 24, 1) ); @@ -220,8 +227,8 @@ public class Toolbar extends Component { btnSearch.setPos(btnWait.left() - btnSearch.width(), y); right = btnSearch.left(); - for(int i = 3; i >= 0; i--) { - if (i == 3){ + for(int i = btnQuick.length-1; i >= 0; i--) { + if (i == btnQuick.length-1){ btnQuick[i].border(0, 2); btnQuick[i].frame(106, 0, 19, 24); } else if (i == 0){ @@ -238,13 +245,13 @@ public class Toolbar extends Component { return; } - for(int i = 0; i <= 3; i++) { + for(int i = 0; i < btnQuick.length; i++) { if (i == 0 && !SPDSettings.flipToolbar() || - i == 3 && SPDSettings.flipToolbar()){ + i == btnQuick.length-1 && SPDSettings.flipToolbar()){ btnQuick[i].border(0, 2); btnQuick[i].frame(106, 0, 19, 24); } else if (i == 0 && SPDSettings.flipToolbar() || - i == 3 && !SPDSettings.flipToolbar()){ + i == btnQuick.length-1 && !SPDSettings.flipToolbar()){ btnQuick[i].border(2, 1); btnQuick[i].frame(86, 0, 20, 24); } else {