v0.7.5b: fixed further cases of text being rendered from the actor thread

This commit is contained in:
Evan Debenham 2019-10-13 02:31:13 -04:00
parent dcba7d03eb
commit f98cbd80f1

View File

@ -17,6 +17,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.sprites.WardSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.WardSprite;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions; import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions;
import com.watabou.noosa.Game;
import com.watabou.noosa.audio.Sample; import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Bundle; import com.watabou.utils.Bundle;
import com.watabou.utils.Callback; import com.watabou.utils.Callback;
@ -362,15 +363,20 @@ public class WandOfWarding extends Wand {
@Override @Override
public boolean interact() { public boolean interact() {
GameScene.show(new WndOptions( Messages.get(this, "dismiss_title"), Game.runOnRenderThread(new Callback() {
Messages.get(this, "dismiss_body"),
Messages.get(this, "dismiss_confirm"),
Messages.get(this, "dismiss_cancel") ){
@Override @Override
protected void onSelect(int index) { public void call() {
if (index == 0){ GameScene.show(new WndOptions( Messages.get(this, "dismiss_title"),
die(null); Messages.get(this, "dismiss_body"),
} Messages.get(this, "dismiss_confirm"),
Messages.get(this, "dismiss_cancel") ){
@Override
protected void onSelect(int index) {
if (index == 0){
die(null);
}
}
});
} }
}); });
return true; return true;