Formatting cleanup / Bugfix
This commit is contained in:
@@ -11,7 +11,7 @@ public class ItemImage extends Stack{
|
||||
|
||||
public ItemImage(TextureRegion region, Supplier<CharSequence> text){
|
||||
Table t = new Table().left().bottom();
|
||||
t.label(text);
|
||||
t.label(text).name("item-label");
|
||||
|
||||
add(new Image(region));
|
||||
add(t);
|
||||
@@ -22,7 +22,7 @@ public class ItemImage extends Stack{
|
||||
|
||||
if(stack.amount != 0){
|
||||
Table t = new Table().left().bottom();
|
||||
t.add(stack.amount + "");
|
||||
t.add(stack.amount + "").name("item-label");
|
||||
add(t);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ public class HudFragment extends Fragment{
|
||||
return coreAttackOpacity > 0;
|
||||
});
|
||||
t.table("button", top -> top.add("$text.coreattack").pad(2)
|
||||
.update(label -> label.setColor(Hue.mix(Color.ORANGE, Color.SCARLET, Mathf.absin(Timers.time(), 2f, 1f)))));
|
||||
.update(label -> label.setColor(Hue.mix(Color.ORANGE, Color.SCARLET, Mathf.absin(Timers.time(), 2f, 1f)))));
|
||||
});
|
||||
|
||||
//'saving' indicator
|
||||
@@ -371,16 +371,16 @@ public class HudFragment extends Fragment{
|
||||
table.setTouchable(Touchable.enabled);
|
||||
|
||||
table.labelWrap(() ->
|
||||
world.getSector() == null ?
|
||||
(state.enemies() > 0 && state.mode.disableWaveTimer ?
|
||||
wavef.get(state.wave) + "\n" + (state.enemies() == 1 ?
|
||||
enemyf.get(state.enemies()) :
|
||||
enemiesf.get(state.enemies())) :
|
||||
wavef.get(state.wave) + "\n" +
|
||||
(!state.mode.disableWaveTimer ?
|
||||
Bundles.format("text.wave.waiting", (int) (state.wavetime / 60)) :
|
||||
Bundles.get("text.waiting"))) :
|
||||
Bundles.format("text.mission.display", world.getSector().currentMission().displayString())).growX().pad(8f);
|
||||
world.getSector() == null ?
|
||||
(state.enemies() > 0 && state.mode.disableWaveTimer ?
|
||||
wavef.get(state.wave) + "\n" + (state.enemies() == 1 ?
|
||||
enemyf.get(state.enemies()) :
|
||||
enemiesf.get(state.enemies())) :
|
||||
wavef.get(state.wave) + "\n" +
|
||||
(!state.mode.disableWaveTimer ?
|
||||
Bundles.format("text.wave.waiting", (int)(state.wavetime/60)) :
|
||||
Bundles.get("text.waiting"))) :
|
||||
Bundles.format("text.mission.display", world.getSector().currentMission().displayString())).growX().pad(8f);
|
||||
|
||||
table.clicked(() -> {
|
||||
if(world.getSector() != null && world.getSector().currentMission().hasMessage()){
|
||||
|
||||
@@ -42,15 +42,15 @@ public class PlacementFragment extends Fragment{
|
||||
boolean lastGround;
|
||||
|
||||
final Input[] inputGrid = {
|
||||
Input.NUM_1, Input.NUM_2, Input.NUM_3, Input.NUM_4,
|
||||
Input.Q, Input.W, Input.E, Input.R,
|
||||
Input.A, Input.S, Input.D, Input.F,
|
||||
Input.Z, Input.X, Input.C, Input.V
|
||||
Input.NUM_1, Input.NUM_2, Input.NUM_3, Input.NUM_4,
|
||||
Input.Q, Input.W, Input.E, Input.R,
|
||||
Input.A, Input.S, Input.D, Input.F,
|
||||
Input.Z, Input.X, Input.C, Input.V
|
||||
}, inputCatGrid = {
|
||||
Input.NUM_1, Input.NUM_2,
|
||||
Input.Q, Input.W,
|
||||
Input.A, Input.S,
|
||||
Input.Z, Input.X, Input.C, Input.V
|
||||
Input.NUM_1, Input.NUM_2,
|
||||
Input.Q, Input.W,
|
||||
Input.A, Input.S,
|
||||
Input.Z, Input.X, Input.C, Input.V
|
||||
};
|
||||
|
||||
public PlacementFragment(){
|
||||
@@ -75,10 +75,12 @@ public class PlacementFragment extends Fragment{
|
||||
}
|
||||
return true;
|
||||
}else if(Inputs.keyDown("select")){ // Mouse eyedropper select
|
||||
Tile tile = world.tileWorld(Graphics.mouseWorld().x, Graphics.mouseWorld().y).target();
|
||||
if(tile.block() != null){
|
||||
Tile tile = world.tileWorld(Graphics.mouseWorld().x, Graphics.mouseWorld().y);
|
||||
|
||||
if(tile != null){
|
||||
tile = tile.target();
|
||||
Recipe tryRecipe = Recipe.getByResult(tile.block());
|
||||
if((tryRecipe != null) && control.unlocks.isUnlocked(tryRecipe)){
|
||||
if(tryRecipe != null && control.unlocks.isUnlocked(tryRecipe)){
|
||||
input.recipe = tryRecipe;
|
||||
currentCategory = input.recipe.category;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user