Renamed key fields and table methods
This commit is contained in:
@@ -26,7 +26,7 @@ public class ItemSelection{
|
||||
for(T item : items){
|
||||
if(!data.isUnlocked(item) && state.isCampaign()) continue;
|
||||
|
||||
ImageButton button = cont.addImageButton(Tex.whiteui, Styles.clearToggleTransi, 24, () -> control.input.frag.config.hideConfig()).group(group).get();
|
||||
ImageButton button = cont.button(Tex.whiteui, Styles.clearToggleTransi, 24, () -> control.input.frag.config.hideConfig()).group(group).get();
|
||||
button.changed(() -> consumer.get(button.isChecked() ? item : null));
|
||||
button.getStyle().imageUp = new TextureRegionDrawable(item.icon(Cicon.small));
|
||||
button.update(() -> button.setChecked(holder.get() == item));
|
||||
@@ -40,7 +40,7 @@ public class ItemSelection{
|
||||
if(i % 4 != 0){
|
||||
int remaining = 4 - (i % 4);
|
||||
for(int j = 0; j < remaining; j++){
|
||||
cont.addImage(Styles.black6);
|
||||
cont.image(Styles.black6);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ public class MassConveyor extends Block{
|
||||
progress = Time.time() % moveTime;
|
||||
|
||||
//TODO DEBUG
|
||||
if(Core.input.keyTap(KeyCode.G) && world.entWorld(Core.input.mouseWorld().x, Core.input.mouseWorld().y) == this){
|
||||
if(Core.input.keyTap(KeyCode.g) && world.entWorld(Core.input.mouseWorld().x, Core.input.mouseWorld().y) == this){
|
||||
item = new UnitPayload((Mathf.chance(0.5) ? UnitTypes.wraith : UnitTypes.dagger).create(Team.sharded));
|
||||
itemRotation = rotation() * 90;
|
||||
animation = 0f;
|
||||
|
||||
@@ -87,7 +87,7 @@ public class MessageBlock extends Block{
|
||||
|
||||
@Override
|
||||
public void buildConfiguration(Table table){
|
||||
table.addImageButton(Icon.pencil, () -> {
|
||||
table.button(Icon.pencil, () -> {
|
||||
if(mobile){
|
||||
Core.input.getTextInput(new TextInput(){{
|
||||
text = message;
|
||||
@@ -112,7 +112,7 @@ public class MessageBlock extends Block{
|
||||
return true;
|
||||
});
|
||||
a.setMaxLength(maxTextLength);
|
||||
dialog.buttons.addButton("$ok", () -> {
|
||||
dialog.buttons.button("$ok", () -> {
|
||||
tile.configure(a.getText());
|
||||
dialog.hide();
|
||||
}).size(130f, 60f);
|
||||
|
||||
@@ -49,7 +49,7 @@ public class LightBlock extends Block{
|
||||
|
||||
@Override
|
||||
public void buildConfiguration(Table table){
|
||||
table.addImageButton(Icon.pencil, () -> {
|
||||
table.button(Icon.pencil, () -> {
|
||||
ui.picker.show(Tmp.c1.set(color).a(0.5f), false, res -> {
|
||||
color = res.rgba();
|
||||
lastColor = color;
|
||||
|
||||
@@ -139,7 +139,7 @@ public class Drill extends Block{
|
||||
for(int i = 0; i < list.size; i++){
|
||||
Block item = list.get(i);
|
||||
|
||||
l.addImage(item.icon(Cicon.small)).size(8 * 3).padRight(2).padLeft(2).padTop(3).padBottom(3);
|
||||
l.image(item.icon(Cicon.small)).size(8 * 3).padRight(2).padLeft(2).padTop(3).padBottom(3);
|
||||
l.add(item.localizedName).left().padLeft(1).padRight(4);
|
||||
if(i % 5 == 4){
|
||||
l.row();
|
||||
|
||||
@@ -84,7 +84,7 @@ public class CommandCenter extends Block{
|
||||
Table buttons = new Table();
|
||||
|
||||
for(UnitCommand cmd : UnitCommand.all){
|
||||
buttons.addImageButton(commandRegions[cmd.ordinal()], Styles.clearToggleTransi, () -> tile.configure(cmd.ordinal()))
|
||||
buttons.button(commandRegions[cmd.ordinal()], Styles.clearToggleTransi, () -> tile.configure(cmd.ordinal()))
|
||||
.size(44).group(group).update(b -> b.setChecked(command == cmd));
|
||||
}
|
||||
table.add(buttons);
|
||||
|
||||
@@ -28,7 +28,7 @@ public class AmmoListValue<T extends UnlockableContent> implements StatValue{
|
||||
table.row();
|
||||
for(T t : map.keys()){
|
||||
BulletType type = map.get(t);
|
||||
table.addImage(icon(t)).size(3 * 8).padRight(4).right().top();
|
||||
table.image(icon(t)).size(3 * 8).padRight(4).right().top();
|
||||
table.add(t.localizedName).padRight(10).left().top();
|
||||
table.table(Tex.underline, bt -> {
|
||||
bt.left().defaults().padRight(3).left();
|
||||
|
||||
@@ -32,7 +32,7 @@ public class BoosterListValue implements StatValue{
|
||||
for(Liquid liquid : content.liquids()){
|
||||
if(!filter.get(liquid)) continue;
|
||||
|
||||
c.addImage(liquid.icon(Cicon.medium)).size(3 * 8).padRight(4).right().top();
|
||||
c.image(liquid.icon(Cicon.medium)).size(3 * 8).padRight(4).right().top();
|
||||
c.add(liquid.localizedName).padRight(10).left().top();
|
||||
c.table(Tex.underline, bt -> {
|
||||
bt.left().defaults().padRight(3).left();
|
||||
|
||||
Reference in New Issue
Block a user