Bugfixes / Incomplete zone description field
This commit is contained in:
@@ -62,10 +62,7 @@ public class DeployDialog extends FloatingDialog{
|
||||
|
||||
stack.add(new Image(new Texture("sprites/backgrounds/stars.png"){{
|
||||
setFilter(TextureFilter.Linear);
|
||||
}}){{
|
||||
//setColor(Color.fromGray(0.3f));
|
||||
//setScale(3f);
|
||||
}}.setScaling(Scaling.fill));
|
||||
}}).setScaling(Scaling.fill));
|
||||
|
||||
stack.add(new Image(new Texture("sprites/backgrounds/planet-zero.png"){{
|
||||
setFilter(TextureFilter.Linear);
|
||||
@@ -76,7 +73,7 @@ public class DeployDialog extends FloatingDialog{
|
||||
update(() -> {
|
||||
setOrigin(Align.center);
|
||||
time[0] += Core.graphics.getDeltaTime() * 10f;
|
||||
setTranslation(Mathf.sin(time[0], 60f, 70f), Mathf.cos(time[0], 140f, 80f));
|
||||
setTranslation(Mathf.sin(time[0], 60f, 70f) + panX / 30f, Mathf.cos(time[0], 140f, 80f) + (panY + 200) / 30f);
|
||||
});
|
||||
}}.setScaling(Scaling.fit));
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ public class MapsDialog extends FloatingDialog{
|
||||
buttons.addImageTextButton("$editor.newmap", "icon-add", iconsize, () -> {
|
||||
ui.showTextInput("$editor.newmap", "$name", "", text -> {
|
||||
ui.loadAnd(() -> {
|
||||
hide();
|
||||
ui.editor.show();
|
||||
ui.editor.editor.getTags().put("name", text);
|
||||
});
|
||||
|
||||
@@ -4,6 +4,7 @@ import io.anuke.arc.Core;
|
||||
import io.anuke.arc.graphics.Color;
|
||||
import io.anuke.arc.scene.ui.Button;
|
||||
import io.anuke.arc.scene.ui.layout.Table;
|
||||
import io.anuke.mindustry.game.*;
|
||||
import io.anuke.mindustry.graphics.Pal;
|
||||
import io.anuke.mindustry.type.*;
|
||||
import io.anuke.mindustry.type.Zone.ZoneRequirement;
|
||||
@@ -101,32 +102,40 @@ public class ZoneInfoDialog extends FloatingDialog{
|
||||
cont.row();
|
||||
cont.addImage("whiteui").color(Pal.accent).height(3).pad(6).growX();
|
||||
cont.row();
|
||||
cont.addButton(zone.canConfigure() ? "$configure" : Core.bundle.format("configure.locked", zone.configureWave),
|
||||
() -> loadout.show(
|
||||
zone.loadout.core().itemCapacity,
|
||||
() -> zone.getStartingItems(),
|
||||
() -> zone.resetStartingItems(),
|
||||
() -> zone.updateLaunchCost(),
|
||||
rebuildItems,
|
||||
item -> data.getItem(item) > 0 && item.type == ItemType.material
|
||||
)
|
||||
).fillX().pad(3).disabled(b -> !zone.canConfigure());
|
||||
cont.row();
|
||||
cont.table(res -> {
|
||||
res.add("$zone.resources").padRight(6);
|
||||
if(zone.resources.length > 0){
|
||||
for(Item item : zone.resources){
|
||||
res.addImage(item.icon(Item.Icon.medium)).size(8 * 3);
|
||||
cont.table(desc -> {
|
||||
desc.left().defaults().left().width(400f);
|
||||
desc.add(zone.description).wrap().padBottom(8f);
|
||||
desc.row();
|
||||
|
||||
desc.table(t -> {
|
||||
t.left();
|
||||
t.add("$zone.resources").padRight(6);
|
||||
|
||||
if(zone.resources.length > 0){
|
||||
for(Item item : zone.resources){
|
||||
t.addImage(item.icon(Item.Icon.medium)).size(8 * 3);
|
||||
}
|
||||
}else{
|
||||
t.add("$none");
|
||||
}
|
||||
}else{
|
||||
res.add("$none");
|
||||
});
|
||||
|
||||
Rules rules = zone.getRules();
|
||||
|
||||
desc.row();
|
||||
desc.add(Core.bundle.format("zone.objective", Core.bundle.get(!rules.attackMode ? "zone.objective.survival" : "zone.objective.attack")));
|
||||
|
||||
if(zone.bestWave() > 0){
|
||||
desc.row();
|
||||
desc.add(Core.bundle.format("bestwave", zone.bestWave()));
|
||||
}
|
||||
});
|
||||
|
||||
if(zone.bestWave() > 0){
|
||||
cont.row();
|
||||
cont.add(Core.bundle.format("bestwave", zone.bestWave()));
|
||||
}
|
||||
cont.row();
|
||||
|
||||
cont.addButton(zone.canConfigure() ? "$configure" : Core.bundle.format("configure.locked", zone.configureWave),
|
||||
() -> loadout.show(zone.loadout.core().itemCapacity, zone::getStartingItems, zone::resetStartingItems, zone::updateLaunchCost, rebuildItems, item -> data.getItem(item) > 0 && item.type == ItemType.material)
|
||||
).fillX().pad(3).disabled(b -> !zone.canConfigure());
|
||||
}
|
||||
});
|
||||
cont.row();
|
||||
|
||||
@@ -10,8 +10,7 @@ import io.anuke.arc.scene.Group;
|
||||
import io.anuke.arc.scene.actions.Actions;
|
||||
import io.anuke.arc.scene.event.Touchable;
|
||||
import io.anuke.arc.scene.ui.Button;
|
||||
import io.anuke.arc.scene.ui.layout.Table;
|
||||
import io.anuke.arc.scene.ui.layout.Unit;
|
||||
import io.anuke.arc.scene.ui.layout.*;
|
||||
import io.anuke.arc.util.Align;
|
||||
import io.anuke.mindustry.core.Platform;
|
||||
import io.anuke.mindustry.game.EventType.DisposeEvent;
|
||||
@@ -39,6 +38,13 @@ public class MenuFragment extends Fragment{
|
||||
public void build(Group parent){
|
||||
renderer = new MenuRenderer();
|
||||
|
||||
Group group = new WidgetGroup();
|
||||
group.setFillParent(true);
|
||||
group.visible(() -> !ui.editor.isShown());
|
||||
parent.addChild(group);
|
||||
|
||||
parent = group;
|
||||
|
||||
parent.fill((x, y, w, h) -> {
|
||||
renderer.render();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user