mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-12-15 07:10:33 -08:00
Configurable plans, taken from Foo's
This commit is contained in:
parent
fd88550b88
commit
bbff564f96
10 changed files with 152 additions and 4 deletions
|
|
@ -116,6 +116,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||
|
||||
public final BlockInventoryFragment inv;
|
||||
public final BlockConfigFragment config;
|
||||
public final PlanConfigFragment planConfig;
|
||||
|
||||
private WidgetGroup group = new WidgetGroup();
|
||||
|
||||
|
|
@ -136,6 +137,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||
group.touchable = Touchable.childrenOnly;
|
||||
inv = new BlockInventoryFragment();
|
||||
config = new BlockConfigFragment();
|
||||
planConfig = new PlanConfigFragment();
|
||||
|
||||
Events.on(UnitDestroyEvent.class, e -> {
|
||||
if(e.unit != null && e.unit.isPlayer() && e.unit.getPlayer().isLocal() && e.unit.type.weapons.contains(w -> w.bullet.killShooter)){
|
||||
|
|
@ -1622,6 +1624,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||
|
||||
/** Handles tile tap events that are not platform specific. */
|
||||
boolean tileTapped(@Nullable Building build){
|
||||
planConfig.hide();
|
||||
if(build == null){
|
||||
inv.hide();
|
||||
config.hideConfig();
|
||||
|
|
@ -1897,6 +1900,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||
|
||||
inv.build(group);
|
||||
config.build(group);
|
||||
planConfig.build(group);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue