v3.3.5: ingame randomize buttons now blink as a random run reminder

This commit is contained in:
Evan Debenham
2026-02-02 19:23:17 -05:00
parent 149d16892a
commit a6a26d7469
3 changed files with 28 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.ui;
import com.shatteredpixel.shatteredpixeldungeon.Badges;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.Ratmogrify;
@@ -32,6 +33,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions;
import com.watabou.noosa.ColorBlock;
import com.watabou.noosa.Game;
import com.watabou.noosa.Image;
import com.watabou.noosa.ui.Component;
import com.watabou.utils.Random;
@@ -214,6 +216,14 @@ public class TalentsPane extends ScrollPane {
}
});
};
@Override
public void update() {
if (Dungeon.hero.lvl >= 3 && Statistics.qualifiedForRandomVictoryBadge){
icon.tint(1, 1, 1, (float)Math.abs(Math.cos(1.5f*Math.PI*Game.timeTotal)/2f));
}
super.update();
}
};
add(random);
}

View File

@@ -37,6 +37,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.Icons;
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
import com.watabou.noosa.Game;
import com.watabou.utils.Random;
public class WndChooseAbility extends Window {
@@ -77,6 +78,14 @@ public class WndChooseAbility extends Window {
});
}
@Override
public void update() {
if (Statistics.qualifiedForRandomVictoryBadge){
icon.tint(1, 1, 1, (float)Math.abs(Math.cos(1.5f*Math.PI* Game.timeTotal)/2f));
}
super.update();
}
@Override
protected String hoverText() {
return Messages.get(WndChooseAbility.class, "random_title");

View File

@@ -36,6 +36,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.Icons;
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
import com.watabou.noosa.Game;
import com.watabou.utils.Random;
public class WndChooseSubclass extends Window {
@@ -75,6 +76,14 @@ public class WndChooseSubclass extends Window {
});
}
@Override
public void update() {
if (Statistics.qualifiedForRandomVictoryBadge){
icon.tint(1, 1, 1, (float)Math.abs(Math.cos(1.5f*Math.PI* Game.timeTotal)/2f));
}
super.update();
}
@Override
protected String hoverText() {
return Messages.get(WndChooseSubclass.class, "random_title");