v1.2.2: fixed hero info stats tab not updating with talent changes
This commit is contained in:
@@ -43,6 +43,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.TalentsPane;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||||
import com.watabou.gltextures.SmartTexture;
|
import com.watabou.gltextures.SmartTexture;
|
||||||
import com.watabou.gltextures.TextureCache;
|
import com.watabou.gltextures.TextureCache;
|
||||||
|
import com.watabou.noosa.Gizmo;
|
||||||
import com.watabou.noosa.Group;
|
import com.watabou.noosa.Group;
|
||||||
import com.watabou.noosa.Image;
|
import com.watabou.noosa.Image;
|
||||||
import com.watabou.noosa.TextureFilm;
|
import com.watabou.noosa.TextureFilm;
|
||||||
@@ -83,7 +84,12 @@ public class WndHero extends WndTabbed {
|
|||||||
add( new IconTab( Icons.get(Icons.RANKINGS) ) {
|
add( new IconTab( Icons.get(Icons.RANKINGS) ) {
|
||||||
protected void select( boolean value ) {
|
protected void select( boolean value ) {
|
||||||
super.select( value );
|
super.select( value );
|
||||||
if (selected) lastIdx = 0;
|
if (selected) {
|
||||||
|
lastIdx = 0;
|
||||||
|
if (!stats.visible) {
|
||||||
|
stats.initialize();
|
||||||
|
}
|
||||||
|
}
|
||||||
stats.visible = stats.active = selected;
|
stats.visible = stats.active = selected;
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
@@ -126,6 +132,15 @@ public class WndHero extends WndTabbed {
|
|||||||
private float pos;
|
private float pos;
|
||||||
|
|
||||||
public StatsTab() {
|
public StatsTab() {
|
||||||
|
initialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initialize(){
|
||||||
|
|
||||||
|
for (Gizmo g : members){
|
||||||
|
if (g != null) g.destroy();
|
||||||
|
}
|
||||||
|
clear();
|
||||||
|
|
||||||
Hero hero = Dungeon.hero;
|
Hero hero = Dungeon.hero;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user