This commit is contained in:
Anuken
2022-03-11 00:11:13 -05:00
parent 96329b9b2e
commit da1517879a
29 changed files with 96 additions and 140 deletions

View File

@@ -41,7 +41,7 @@ public class ItemSelection{
if(!item.unlockedNow() || (item instanceof Item checkVisible && state.rules.hiddenBuildItems.contains(checkVisible))) continue;
ImageButton button = cont.button(Tex.whiteui, Styles.clearToggleTransi, 24, () -> {
if(closeSelect) control.input.frag.config.hideConfig();
if(closeSelect) control.input.config.hideConfig();
}).group(group).tooltip(item.localizedName).get();
button.changed(() -> consumer.get(button.isChecked() ? item : null));
button.getStyle().imageUp = new TextureRegionDrawable(item.uiIcon);

View File

@@ -263,7 +263,7 @@ public class ItemBridge extends Block{
}
@Override
public boolean onConfigureTileTapped(Building other){
public boolean onConfigureBuildTapped(Building other){
//reverse connection
if(other instanceof ItemBridgeBuild b && b.link == pos()){
configure(other.pos());

View File

@@ -75,8 +75,8 @@ public class MassDriver extends Block{
Drawf.dashCircle(x * tilesize, y * tilesize, range, Pal.accent);
//check if a mass driver is selected while placing this driver
if(!control.input.frag.config.isShown()) return;
Building selected = control.input.frag.config.getSelectedTile();
if(!control.input.config.isShown()) return;
Building selected = control.input.config.getSelected();
if(selected == null || selected.block != this || !selected.within(x * tilesize, y * tilesize, range)) return;
//if so, draw a dotted line towards it while it is in range
@@ -250,7 +250,7 @@ public class MassDriver extends Block{
}
@Override
public boolean onConfigureTileTapped(Building other){
public boolean onConfigureBuildTapped(Building other){
if(this == other){
if(link == -1) deselect();
configure(-1);

View File

@@ -571,7 +571,7 @@ public class LogicBlock extends Block{
}
@Override
public boolean onConfigureTileTapped(Building other){
public boolean onConfigureBuildTapped(Building other){
if(this == other || !accessible()){
deselect();
return false;
@@ -582,7 +582,7 @@ public class LogicBlock extends Block{
return false;
}
return super.onConfigureTileTapped(other);
return super.onConfigureBuildTapped(other);
}
@Override

View File

@@ -102,8 +102,8 @@ public class PayloadMassDriver extends PayloadBlock{
Drawf.dashCircle(x * tilesize, y * tilesize, range, Pal.accent);
//check if a mass driver is selected while placing this driver
if(!control.input.frag.config.isShown()) return;
Building selected = control.input.frag.config.getSelectedTile();
if(!control.input.config.isShown()) return;
Building selected = control.input.config.getSelected();
if(selected == null || selected.block != this || !selected.within(x * tilesize, y * tilesize, range)) return;
//if so, draw a dotted line towards it while it is in range
@@ -431,7 +431,7 @@ public class PayloadMassDriver extends PayloadBlock{
}
@Override
public boolean onConfigureTileTapped(Building other){
public boolean onConfigureBuildTapped(Building other){
if(this == other){
if(link == -1) deselect();
configure(-1);

View File

@@ -384,7 +384,7 @@ public class PowerNode extends PowerBlock{
}
@Override
public boolean onConfigureTileTapped(Building other){
public boolean onConfigureBuildTapped(Building other){
if(linkValid(this, other)){
configure(other.pos());
return false;