v0.6.4: bugfixes
- fixed incorrect window layout when starting new game from gamescene - fixed rare action indicator crashes
This commit is contained in:
parent
d739ae30a2
commit
6756c09204
|
@ -48,7 +48,7 @@ public class ActionIndicator extends Tag {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void layout() {
|
||||
protected synchronized void layout() {
|
||||
super.layout();
|
||||
|
||||
if (icon != null){
|
||||
|
@ -63,7 +63,7 @@ public class ActionIndicator extends Tag {
|
|||
private boolean needsLayout = false;
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
public synchronized void update() {
|
||||
super.update();
|
||||
|
||||
if (!Dungeon.hero.ready){
|
||||
|
@ -104,13 +104,15 @@ public class ActionIndicator extends Tag {
|
|||
|
||||
public static void updateIcon(){
|
||||
if (instance != null){
|
||||
if (instance.icon != null){
|
||||
instance.icon.killAndErase();
|
||||
instance.icon = null;
|
||||
}
|
||||
if (action != null){
|
||||
instance.icon = action.getIcon();
|
||||
instance.needsLayout = true;
|
||||
synchronized (instance) {
|
||||
if (instance.icon != null) {
|
||||
instance.icon.killAndErase();
|
||||
instance.icon = null;
|
||||
}
|
||||
if (action != null) {
|
||||
instance.icon = action.getIcon();
|
||||
instance.needsLayout = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ public class WndGame extends Window {
|
|||
protected void onClick() {
|
||||
GamesInProgress.selectedClass = Dungeon.hero.heroClass;
|
||||
InterlevelScene.noStory = true;
|
||||
ShatteredPixelDungeon.scene().add(new WndStartGame(GamesInProgress.firstEmpty()));
|
||||
GameScene.show(new WndStartGame(GamesInProgress.firstEmpty()));
|
||||
}
|
||||
} );
|
||||
btnStart.textColor(Window.TITLE_COLOR);
|
||||
|
|
Loading…
Reference in New Issue
Block a user