Removed unnecessary UI fragments, began work on Desktop input
This commit is contained in:
@@ -5,7 +5,6 @@ import io.anuke.ucore.scene.Group;
|
||||
|
||||
public class OverlayFragment implements Fragment{
|
||||
public final BlockInventoryFragment inv;
|
||||
public final ToolFragment tool;
|
||||
public final BlockConfigFragment config;
|
||||
|
||||
private Group group = new Group();
|
||||
@@ -14,7 +13,6 @@ public class OverlayFragment implements Fragment{
|
||||
public OverlayFragment(InputHandler input){
|
||||
this.input = input;
|
||||
|
||||
tool = new ToolFragment(input);
|
||||
inv = new BlockInventoryFragment(input);
|
||||
config = new BlockConfigFragment();
|
||||
}
|
||||
@@ -25,7 +23,6 @@ public class OverlayFragment implements Fragment{
|
||||
parent.addChild(group);
|
||||
|
||||
inv.build(group);
|
||||
tool.build(group);
|
||||
config.build(group);
|
||||
|
||||
input.buildUI(group);
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
package io.anuke.mindustry.ui.fragments;
|
||||
|
||||
import io.anuke.ucore.scene.Group;
|
||||
|
||||
public class PlacementFragment implements Fragment{
|
||||
|
||||
@Override
|
||||
public void build(Group parent){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
package io.anuke.mindustry.ui.fragments;
|
||||
|
||||
import io.anuke.ucore.scene.Group;
|
||||
import io.anuke.ucore.util.Strings;
|
||||
|
||||
public class PlayerMenuFragment implements Fragment {
|
||||
|
||||
@Override
|
||||
public void build(Group parent) {
|
||||
/*
|
||||
new table(){{
|
||||
new table("clear"){{
|
||||
ItemImage item = new ItemImage(player.inventory.item.item.region, () -> round(player.inventory.item.amount), Color.WHITE)
|
||||
.updateRegion(() -> player.inventory.item.item.region);
|
||||
|
||||
ItemImage liquid = new ItemImage(Draw.region("icon-liquid"), () -> round(player.inventory.liquid.amount), Color.WHITE)
|
||||
.updateColor(() -> player.inventory.liquid.liquid == Liquids.none ? Color.GRAY : player.inventory.liquid.liquid.color);
|
||||
ItemImage power = new ItemImage(Draw.region("icon-power"), () -> round(player.inventory.power), Colors.get("power"));
|
||||
|
||||
defaults().size(16 * 2).space(6f);
|
||||
add(item);
|
||||
add(liquid);
|
||||
add(power);
|
||||
|
||||
visible(() -> Inputs.keyDown("player_list"));
|
||||
padTop(100);
|
||||
margin(5);
|
||||
}}.end();
|
||||
}}.end();*/
|
||||
}
|
||||
|
||||
public String round(float f){
|
||||
f = (int)f;
|
||||
if(f >= 1000){
|
||||
return Strings.toFixed(f/1000, 1) + "k";
|
||||
}else{
|
||||
return (int)f+"";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package io.anuke.mindustry.ui.fragments;
|
||||
|
||||
import io.anuke.mindustry.input.InputHandler;
|
||||
import io.anuke.ucore.scene.Group;
|
||||
|
||||
public class ToolFragment implements Fragment{
|
||||
private final InputHandler input;
|
||||
|
||||
public ToolFragment(InputHandler input){
|
||||
this.input = input;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void build(Group parent){
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user