From fc77aa9afa6abb2363c747c9712d7a9e0b32ae23 Mon Sep 17 00:00:00 2001 From: Evan Debenham <Evan.SHPX@gmail.com> Date: Sat, 14 Mar 2015 19:35:49 -0400 Subject: [PATCH] v0.2.4d: tweaked the ability to disable parameters on the item slot, edited quickslots to take advantage of this. --- .../shatteredpixeldungeon/ui/ItemSlot.java | 21 ++++++++++--------- .../ui/LootIndicator.java | 2 +- .../ui/QuickSlotButton.java | 1 + 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java b/src/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java index eaf3ba043..be78ce838 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java @@ -194,14 +194,15 @@ public class ItemSlot extends Button { topRight.alpha( alpha ); bottomRight.alpha( alpha ); } - - public void showParams( boolean value ) { - if (value) { - add( topRight ); - add( bottomRight ); - } else { - remove( topRight ); - remove( bottomRight ); - } - } + + public void showParams( boolean TL, boolean TR, boolean BR ) { + if (TL) add( topLeft ); + else remove( topLeft ); + + if (TR) add( topRight ); + else remove( topRight ); + + if (BR) add( bottomRight ); + else remove( bottomRight ); + } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/LootIndicator.java b/src/com/shatteredpixel/shatteredpixeldungeon/ui/LootIndicator.java index b0851a524..b8c1d1173 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/ui/LootIndicator.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/ui/LootIndicator.java @@ -45,7 +45,7 @@ public class LootIndicator extends Tag { Dungeon.hero.handle( Dungeon.hero.pos ); }; }; - slot.showParams( false ); + slot.showParams( true, false, false ); add( slot ); } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java b/src/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java index b0c0dbf0f..faf965fa0 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java @@ -95,6 +95,7 @@ public class QuickSlotButton extends Button implements WndBag.Listener { icon.resetColor(); } }; + slot.showParams( true, false, true ); add( slot ); crossB = Icons.TARGET.get();