slightly less of a mess
This commit is contained in:
@@ -57,7 +57,7 @@ public class Tutorial{
|
||||
|
||||
/** Resets tutorial state. */
|
||||
public void reset(){
|
||||
stage = TutorialStage.values()[6];
|
||||
stage = TutorialStage.values()[4];
|
||||
stage.begin();
|
||||
blocksPlaced.clear();
|
||||
events.clear();
|
||||
@@ -246,11 +246,12 @@ public class Tutorial{
|
||||
float angle = Angles.angle(Core.graphics.getWidth()/2f, Core.graphics.getHeight()/2f, Tmp.v1.x + element.getWidth()/2f, Tmp.v1.y + element.getHeight()/2f);
|
||||
Tmp.v2.trns(angle + 180f, size*1.4f);
|
||||
float fs = UnitScl.dp.scl(40f);
|
||||
float fs2 = UnitScl.dp.scl(50f);
|
||||
float fs2 = UnitScl.dp.scl(56f);
|
||||
|
||||
Draw.color(Pal.gray);
|
||||
Drawf.tri(Tmp.v1.x + element.getWidth()/2f + Tmp.v2.x, Tmp.v1.y + element.getHeight()/2f + Tmp.v2.y, fs2, fs2, angle);
|
||||
Draw.color(Pal.place);
|
||||
Tmp.v2.setLength(Tmp.v2.len() - UnitScl.dp.scl(4));
|
||||
Drawf.tri(Tmp.v1.x + element.getWidth()/2f + Tmp.v2.x, Tmp.v1.y + element.getHeight()/2f + Tmp.v2.y, fs, fs, angle);
|
||||
Draw.reset();
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ public class HudFragment extends Fragment{
|
||||
});
|
||||
|
||||
//minimap
|
||||
parent.fill(t -> t.top().right().add(new Minimap()).visible(() -> Core.settings.getBool("minimap")));
|
||||
parent.fill(t -> t.top().right().add(new Minimap()).visible(() -> Core.settings.getBool("minimap") && !state.rules.tutorial));
|
||||
|
||||
//spawner warning
|
||||
parent.fill(t -> {
|
||||
@@ -314,8 +314,14 @@ public class HudFragment extends Fragment{
|
||||
|
||||
//tutorial text
|
||||
parent.fill(t -> {
|
||||
t.top().visible(() -> state.rules.tutorial);
|
||||
t.table("button-trans", f -> f.labelWrap(() -> control.tutorial.stage.text()).width(500f).pad(3f));
|
||||
Runnable resize = () -> {
|
||||
t.clearChildren();
|
||||
t.top().right().visible(() -> state.rules.tutorial);
|
||||
t.table("button-trans", f -> f.labelWrap(() -> control.tutorial.stage.text()).width(!Core.graphics.isPortrait() ? 450f : 180f).pad(3f));
|
||||
};
|
||||
|
||||
resize.run();
|
||||
Events.on(ResizeEvent.class, e -> resize.run());
|
||||
});
|
||||
|
||||
//paused table
|
||||
@@ -444,7 +450,7 @@ public class HudFragment extends Fragment{
|
||||
lastUnlockLayout.clearChildren();
|
||||
lastUnlockLayout.defaults().size(size).pad(2);
|
||||
|
||||
for(int i = 0; i < esize && i <= cap; i++){
|
||||
for(int i = 0; i < esize; i++){
|
||||
lastUnlockLayout.add(elements.get(i));
|
||||
|
||||
if(i % col == col - 1){
|
||||
|
||||
Reference in New Issue
Block a user