v2.5.1: fixed split alch guide not updating in various cases

This commit is contained in:
Evan Debenham
2024-09-12 16:17:10 -04:00
parent 8261aeeb2b
commit 5434557270
2 changed files with 14 additions and 2 deletions

View File

@@ -107,6 +107,7 @@ public class AlchemyScene extends PixelScene {
private boolean energyAddBlinking = false;
private static boolean splitAlchGuide = false;
private WndJournal.AlchemyTab alchGuide = null;
private static int centerW;
private static final int BTN_SIZE = 28;
@@ -190,7 +191,7 @@ public class AlchemyScene extends PixelScene {
guideBG.x = Camera.main.width - left - guideBG.width();
add(guideBG);
WndJournal.AlchemyTab alchGuide = new WndJournal.AlchemyTab();
alchGuide = new WndJournal.AlchemyTab();
add(alchGuide);
alchGuide.setRect(guideBG.x + guideBG.marginLeft(),
guideBG.y + guideBG.marginTop(),
@@ -648,6 +649,10 @@ public class AlchemyScene extends PixelScene {
energyAddBlinking = promptToAddEnergy;
if (alchGuide != null){
alchGuide.updateList();
}
}
private void combine( int slot ){
@@ -721,6 +726,10 @@ public class AlchemyScene extends PixelScene {
}
}
}
if (alchGuide != null){
alchGuide.updateList();
}
}
public void craftItem( ArrayList<Item> ingredients, Item result ){
@@ -819,6 +828,9 @@ public class AlchemyScene extends PixelScene {
}
cancel.enable(false);
repeat.enable(lastRecipe != null);
if (alchGuide != null){
alchGuide.updateList();
}
}
public void createEnergy(){

View File

@@ -363,7 +363,7 @@ public class WndJournal extends WndTabbed {
updateList();
}
private void updateList() {
public void updateList() {
if (currentPageIdx != -1 && !Document.ALCHEMY_GUIDE.isPageFound(currentPageIdx)){
currentPageIdx = -1;