Removed Rules#tutorial

This commit is contained in:
Anuken
2020-11-20 11:23:30 -05:00
parent 139fa329d4
commit 814065bf8e
10 changed files with 33 additions and 57 deletions

View File

@@ -96,13 +96,13 @@ public class HudFragment extends Fragment{
//minimap + position
parent.fill(t -> {
t.name = "minimap/position";
t.visible(() -> Core.settings.getBool("minimap") && !state.rules.tutorial && shown);
t.visible(() -> Core.settings.getBool("minimap") && shown);
//minimap
t.add(new Minimap()).name("minimap");
t.row();
//position
t.label(() -> player.tileX() + "," + player.tileY())
.visible(() -> Core.settings.getBool("position") && !state.rules.tutorial)
.visible(() -> Core.settings.getBool("position"))
.touchable(Touchable.disabled)
.name("position");
t.top().right();
@@ -319,12 +319,12 @@ public class HudFragment extends Fragment{
.update(label -> label.color.set(Color.orange).lerp(Color.scarlet, Mathf.absin(Time.time(), 2f, 1f)))).touchable(Touchable.disabled);
});
//tutorial text
//TODO tutorial text
parent.fill(t -> {
t.name = "tutorial";
Runnable resize = () -> {
t.clearChildren();
t.top().right().visible(() -> state.rules.tutorial);
t.top().right().visible(() -> false);
t.stack(new Button(){{
marginLeft(48f);
labelWrap(() -> control.tutorial.stage.text() + (control.tutorial.canNext() ? "\n\n" + Core.bundle.get("tutorial.next") : "")).width(!Core.graphics.isPortrait() ? 400f : 160f).pad(2f);
@@ -465,7 +465,7 @@ public class HudFragment extends Fragment{
public void showUnlock(UnlockableContent content){
//some content may not have icons... yet
//also don't play in the tutorial to prevent confusion
if(state.isMenu() || state.rules.tutorial) return;
if(state.isMenu()) return;
Sounds.message.play();
@@ -788,7 +788,7 @@ public class HudFragment extends Fragment{
}
private boolean canSkipWave(){
return state.rules.waves && ((net.server() || player.admin) || !net.active()) && state.enemies == 0 && !spawner.isSpawning() && !state.rules.tutorial;
return state.rules.waves && ((net.server() || player.admin) || !net.active()) && state.enemies == 0 && !spawner.isSpawning();
}
}