Broke tutorial

This commit is contained in:
Anuken
2018-11-05 10:28:18 -05:00
parent 5c193a47eb
commit e399e4960c
4 changed files with 30 additions and 50 deletions
@@ -15,6 +15,7 @@ import io.anuke.ucore.scene.Group;
import io.anuke.ucore.scene.event.InputEvent;
import io.anuke.ucore.scene.event.InputListener;
import io.anuke.ucore.scene.event.Touchable;
import io.anuke.ucore.scene.ui.layout.Cell;
import io.anuke.ucore.scene.ui.layout.Table;
import io.anuke.ucore.scene.ui.layout.Unit;
import io.anuke.ucore.scene.utils.Cursors;
@@ -36,7 +37,7 @@ public class SectorsDialog extends FloatingDialog{
table = new Table(){
@Override
public float getPrefWidth(){
return sectorSize*2f;
return Unit.dp.scl(sectorSize*2f);
}
};
table.visible(() -> selected != null);
@@ -97,7 +98,7 @@ public class SectorsDialog extends FloatingDialog{
}
table.table(t -> {
t.addImageTextButton(sector.hasSave() ? "$text.sector.resume" : "$text.sector.deploy", "icon-play", 10*3, () -> {
Cell<?> cell = t.addImageTextButton(sector.hasSave() ? "$text.sector.resume" : "$text.sector.deploy", "icon-play", 10*3, () -> {
hide();
Vars.ui.loadLogic(() -> world.sectors.playSector(selected));
}).height(60f).growX();
@@ -110,6 +111,7 @@ public class SectorsDialog extends FloatingDialog{
selectSector(selected);
})
).width(sectorSize).height(60f);
cell.width(sectorSize);
}
}).pad(-5).growX().padTop(0);
@@ -198,7 +198,7 @@ public class HudFragment extends Fragment{
blockfrag.build(Core.scene.getRoot());
}
public void showText(String text){
public void showToast(String text){
Table table = new Table("button");
table.update(() -> {
if(state.is(State.menu)){
@@ -219,9 +219,7 @@ public class HudFragment extends Fragment{
Actions.run(() -> container.actions(Actions.translateBy(0, table.getPrefHeight(), 1f, Interpolation.fade), Actions.removeActor())));
}
/**
* Show unlock notification for a new recipe.
*/
/**Show unlock notification for a new recipe.*/
public void showUnlock(Recipe recipe){
blockfrag.rebuild();