v0.9.4: fixed interface weirdness in WndResurrect

This commit is contained in:
Evan Debenham 2021-08-11 15:14:01 -04:00
parent 6a0e792aa5
commit 6bb9be6e6b
3 changed files with 14 additions and 2 deletions

View File

@ -147,6 +147,14 @@ public class ItemSlot extends Button {
} }
public void clear(){
item(null);
enable(true);
sprite.visible(true);
sprite.view(ItemSpriteSheet.SOMETHING, null);
layout();
}
public void item( Item item ) { public void item( Item item ) {
if (this.item == item) { if (this.item == item) {
if (item != null) { if (item != null) {

View File

@ -186,5 +186,9 @@ public class WndBlacksmith extends Window {
public void item( Item item ) { public void item( Item item ) {
slot.item( this.item = item ); slot.item( this.item = item );
} }
public void clear(){
slot.clear();
}
} }
} }

View File

@ -142,9 +142,9 @@ public class WndResurrect extends Window {
if (btnItem1.item == btnItem2.item){ if (btnItem1.item == btnItem2.item){
if (btnPressed == btnItem1){ if (btnPressed == btnItem1){
btnItem2.item(null); btnItem2.clear();
} else { } else {
btnItem1.item(null); btnItem1.clear();
} }
} }