Shooting -> Function category / Dialog cleanup
This commit is contained in:
@@ -719,7 +719,7 @@ category.power = Power
|
|||||||
category.liquids = Liquids
|
category.liquids = Liquids
|
||||||
category.items = Items
|
category.items = Items
|
||||||
category.crafting = Input/Output
|
category.crafting = Input/Output
|
||||||
category.shooting = Shooting
|
category.function = Function
|
||||||
category.optional = Optional Enhancements
|
category.optional = Optional Enhancements
|
||||||
setting.landscape.name = Lock Landscape
|
setting.landscape.name = Lock Landscape
|
||||||
setting.shadows.name = Shadows
|
setting.shadows.name = Shadows
|
||||||
@@ -728,7 +728,7 @@ setting.linear.name = Linear Filtering
|
|||||||
setting.hints.name = Hints
|
setting.hints.name = Hints
|
||||||
setting.flow.name = Display Resource Flow Rate
|
setting.flow.name = Display Resource Flow Rate
|
||||||
setting.buildautopause.name = Auto-Pause Building
|
setting.buildautopause.name = Auto-Pause Building
|
||||||
setting.animatedwater.name = Animated Fluids
|
setting.animatedwater.name = Animated Surfaces
|
||||||
setting.animatedshields.name = Animated Shields
|
setting.animatedshields.name = Animated Shields
|
||||||
setting.antialias.name = Antialias[lightgray] (requires restart)[]
|
setting.antialias.name = Antialias[lightgray] (requires restart)[]
|
||||||
setting.playerindicators.name = Player Indicators
|
setting.playerindicators.name = Player Indicators
|
||||||
|
|||||||
@@ -691,7 +691,7 @@ setting.touchscreen.name = Touchscreen Controls
|
|||||||
setting.fpscap.name = Max FPS
|
setting.fpscap.name = Max FPS
|
||||||
setting.fpscap.none = None
|
setting.fpscap.none = None
|
||||||
setting.fpscap.text = {0} FPS
|
setting.fpscap.text = {0} FPS
|
||||||
setting.uiscale.name = UI Scaling[lightgray] (require restart)[]
|
setting.uiscale.name = UI Scaling[lightgray] (requires restart)[]
|
||||||
setting.swapdiagonal.name = Always Diagonal Placement
|
setting.swapdiagonal.name = Always Diagonal Placement
|
||||||
setting.difficulty.training = Training
|
setting.difficulty.training = Training
|
||||||
setting.difficulty.easy = Easy
|
setting.difficulty.easy = Easy
|
||||||
|
|||||||
@@ -691,7 +691,7 @@ setting.touchscreen.name = Touchscreen Controls
|
|||||||
setting.fpscap.name = Max FPS
|
setting.fpscap.name = Max FPS
|
||||||
setting.fpscap.none = None
|
setting.fpscap.none = None
|
||||||
setting.fpscap.text = {0} FPS
|
setting.fpscap.text = {0} FPS
|
||||||
setting.uiscale.name = UI Scaling[lightgray] (require restart)[]
|
setting.uiscale.name = UI Scaling[lightgray] (requires restart)[]
|
||||||
setting.swapdiagonal.name = Always Diagonal Placement
|
setting.swapdiagonal.name = Always Diagonal Placement
|
||||||
setting.difficulty.training = Training
|
setting.difficulty.training = Training
|
||||||
setting.difficulty.easy = Easy
|
setting.difficulty.easy = Easy
|
||||||
|
|||||||
@@ -691,7 +691,7 @@ setting.touchscreen.name = Touchscreen Controls
|
|||||||
setting.fpscap.name = Max FPS
|
setting.fpscap.name = Max FPS
|
||||||
setting.fpscap.none = None
|
setting.fpscap.none = None
|
||||||
setting.fpscap.text = {0} FPS
|
setting.fpscap.text = {0} FPS
|
||||||
setting.uiscale.name = UI Scaling[lightgray] (require restart)[]
|
setting.uiscale.name = UI Scaling[lightgray] (requires restart)[]
|
||||||
setting.swapdiagonal.name = Always Diagonal Placement
|
setting.swapdiagonal.name = Always Diagonal Placement
|
||||||
setting.difficulty.training = training
|
setting.difficulty.training = training
|
||||||
setting.difficulty.easy = easy
|
setting.difficulty.easy = easy
|
||||||
|
|||||||
@@ -691,7 +691,7 @@ setting.touchscreen.name = Touchscreen Controls
|
|||||||
setting.fpscap.name = Begränsade FPS
|
setting.fpscap.name = Begränsade FPS
|
||||||
setting.fpscap.none = Inga
|
setting.fpscap.none = Inga
|
||||||
setting.fpscap.text = {0} FPS
|
setting.fpscap.text = {0} FPS
|
||||||
setting.uiscale.name = UI Scaling[lightgray] (require restart)[]
|
setting.uiscale.name = UI Scaling[lightgray] (requires restart)[]
|
||||||
setting.swapdiagonal.name = Always Diagonal Placement
|
setting.swapdiagonal.name = Always Diagonal Placement
|
||||||
setting.difficulty.training = Träning
|
setting.difficulty.training = Träning
|
||||||
setting.difficulty.easy = Lätt
|
setting.difficulty.easy = Lätt
|
||||||
|
|||||||
@@ -691,7 +691,7 @@ setting.touchscreen.name = Touchscreen Controls
|
|||||||
setting.fpscap.name = Max FPS
|
setting.fpscap.name = Max FPS
|
||||||
setting.fpscap.none = Yok
|
setting.fpscap.none = Yok
|
||||||
setting.fpscap.text = {0} FPS
|
setting.fpscap.text = {0} FPS
|
||||||
setting.uiscale.name = UI Scaling[lightgray] (require restart)[]
|
setting.uiscale.name = UI Scaling[lightgray] (requires restart)[]
|
||||||
setting.swapdiagonal.name = Always Diagonal Placement
|
setting.swapdiagonal.name = Always Diagonal Placement
|
||||||
setting.difficulty.training = training
|
setting.difficulty.training = training
|
||||||
setting.difficulty.easy = kolay
|
setting.difficulty.easy = kolay
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package mindustry.editor;
|
package mindustry.editor;
|
||||||
|
|
||||||
import arc.*;
|
import arc.*;
|
||||||
import arc.input.*;
|
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.scene.event.*;
|
import arc.scene.event.*;
|
||||||
import arc.scene.ui.*;
|
import arc.scene.ui.*;
|
||||||
@@ -39,11 +38,7 @@ public class WaveInfoDialog extends BaseDialog{
|
|||||||
state.rules.spawns = groups;
|
state.rules.spawns = groups;
|
||||||
});
|
});
|
||||||
|
|
||||||
keyDown(key -> {
|
addCloseListener();
|
||||||
if(key == KeyCode.escape || key == KeyCode.back){
|
|
||||||
Core.app.post(this::hide);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
onResize(this::setup);
|
onResize(this::setup);
|
||||||
addCloseButton();
|
addCloseButton();
|
||||||
|
|||||||
@@ -53,15 +53,19 @@ public class BaseDialog extends Dialog{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public void addCloseListener(){
|
||||||
public void addCloseButton(){
|
|
||||||
buttons.defaults().size(210f, 64f);
|
|
||||||
buttons.button("@back", Icon.left, this::hide).size(210f, 64f);
|
|
||||||
|
|
||||||
keyDown(key -> {
|
keyDown(key -> {
|
||||||
if(key == KeyCode.escape || key == KeyCode.back){
|
if(key == KeyCode.escape || key == KeyCode.back){
|
||||||
Core.app.post(this::hide);
|
Core.app.post(this::hide);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addCloseButton(){
|
||||||
|
buttons.defaults().size(210f, 64f);
|
||||||
|
buttons.button("@back", Icon.left, this::hide).size(210f, 64f);
|
||||||
|
|
||||||
|
addCloseListener();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,11 +51,7 @@ public class FileChooser extends BaseDialog{
|
|||||||
ok.fireClick();
|
ok.fireClick();
|
||||||
});
|
});
|
||||||
|
|
||||||
keyDown(key -> {
|
addCloseListener();
|
||||||
if(key == KeyCode.escape || key == KeyCode.back){
|
|
||||||
Core.app.post(this::hide);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupWidgets(){
|
private void setupWidgets(){
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package mindustry.ui.dialogs;
|
|||||||
|
|
||||||
import arc.*;
|
import arc.*;
|
||||||
import arc.func.*;
|
import arc.func.*;
|
||||||
import arc.input.*;
|
|
||||||
import arc.scene.ui.*;
|
import arc.scene.ui.*;
|
||||||
import arc.scene.ui.layout.*;
|
import arc.scene.ui.layout.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
@@ -37,11 +36,7 @@ public class LaunchLoadoutDialog extends BaseDialog{
|
|||||||
buttons.defaults().size(160f, 64f);
|
buttons.defaults().size(160f, 64f);
|
||||||
buttons.button("@back", Icon.left, this::hide);
|
buttons.button("@back", Icon.left, this::hide);
|
||||||
|
|
||||||
keyDown(key -> {
|
addCloseListener();
|
||||||
if(key == KeyCode.escape || key == KeyCode.back){
|
|
||||||
Core.app.post(this::hide);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
ItemSeq sitems = sector.getItems();
|
ItemSeq sitems = sector.getItems();
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package mindustry.ui.dialogs;
|
|||||||
|
|
||||||
import arc.*;
|
import arc.*;
|
||||||
import arc.graphics.*;
|
import arc.graphics.*;
|
||||||
import arc.input.*;
|
|
||||||
import arc.scene.ui.*;
|
import arc.scene.ui.*;
|
||||||
import arc.scene.ui.layout.*;
|
import arc.scene.ui.layout.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
@@ -24,11 +23,7 @@ public class MapsDialog extends BaseDialog{
|
|||||||
|
|
||||||
buttons.remove();
|
buttons.remove();
|
||||||
|
|
||||||
keyDown(key -> {
|
addCloseListener();
|
||||||
if(key == KeyCode.escape || key == KeyCode.back){
|
|
||||||
Core.app.post(this::hide);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
shown(this::setup);
|
shown(this::setup);
|
||||||
onResize(() -> {
|
onResize(() -> {
|
||||||
|
|||||||
@@ -38,8 +38,7 @@ public class PaletteDialog extends Dialog{
|
|||||||
}
|
}
|
||||||
|
|
||||||
keyDown(key -> {
|
keyDown(key -> {
|
||||||
if(key == KeyCode.escape || key == KeyCode.back)
|
if(key == KeyCode.escape || key == KeyCode.back) hide();
|
||||||
hide();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package mindustry.ui.dialogs;
|
package mindustry.ui.dialogs;
|
||||||
|
|
||||||
import arc.*;
|
import arc.*;
|
||||||
import arc.input.*;
|
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
|
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
@@ -17,11 +16,7 @@ public class PausedDialog extends BaseDialog{
|
|||||||
|
|
||||||
shown(this::rebuild);
|
shown(this::rebuild);
|
||||||
|
|
||||||
keyDown(key -> {
|
addCloseListener();
|
||||||
if(key == KeyCode.escape || key == KeyCode.back){
|
|
||||||
hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void rebuild(){
|
void rebuild(){
|
||||||
|
|||||||
@@ -49,14 +49,10 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
|
|
||||||
shouldPause = true;
|
shouldPause = true;
|
||||||
|
|
||||||
getCell(buttons).padBottom(-4);
|
buttons.defaults().size(200f, 56f).pad(2);
|
||||||
buttons.background(Styles.black).defaults().growX().height(64f).pad(0);
|
buttons.button("@back", Icon.left, this::hide);
|
||||||
|
buttons.button("@techtree", Icon.tree, () -> ui.research.show());
|
||||||
keyDown(key -> {
|
buttons.bottom().margin(0).marginBottom(-8);
|
||||||
if(key == KeyCode.escape || key == KeyCode.back){
|
|
||||||
Core.app.post(this::hide);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
dragged((cx, cy) -> {
|
dragged((cx, cy) -> {
|
||||||
Vec3 pos = planets.camPos;
|
Vec3 pos = planets.camPos;
|
||||||
@@ -263,11 +259,14 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
Core.scene.setScrollFocus(PlanetDialog.this);
|
Core.scene.setScrollFocus(PlanetDialog.this);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//info text
|
||||||
new Table(t -> {
|
new Table(t -> {
|
||||||
t.touchable = Touchable.disabled;
|
t.touchable = Touchable.disabled;
|
||||||
t.top();
|
t.top();
|
||||||
t.label(() -> mode == select ? "@sectors.select" : "").style(Styles.outlineLabel).color(Pal.accent);
|
t.label(() -> mode == select ? "@sectors.select" : "").style(Styles.outlineLabel).color(Pal.accent);
|
||||||
}),
|
}),
|
||||||
|
buttons,
|
||||||
|
//planet selection
|
||||||
new Table(t -> {
|
new Table(t -> {
|
||||||
t.right();
|
t.right();
|
||||||
if(content.planets().count(p -> p.accessible) > 1) {
|
if(content.planets().count(p -> p.accessible) > 1) {
|
||||||
|
|||||||
@@ -53,20 +53,20 @@ public enum Stat{
|
|||||||
linkRange(StatCat.crafting),
|
linkRange(StatCat.crafting),
|
||||||
instructions(StatCat.crafting),
|
instructions(StatCat.crafting),
|
||||||
|
|
||||||
speedIncrease(StatCat.shooting),
|
speedIncrease(StatCat.function),
|
||||||
repairTime(StatCat.shooting),
|
repairTime(StatCat.function),
|
||||||
range(StatCat.shooting),
|
range(StatCat.function),
|
||||||
shootRange(StatCat.shooting),
|
shootRange(StatCat.function),
|
||||||
inaccuracy(StatCat.shooting),
|
inaccuracy(StatCat.function),
|
||||||
shots(StatCat.shooting),
|
shots(StatCat.function),
|
||||||
reload(StatCat.shooting),
|
reload(StatCat.function),
|
||||||
powerShot(StatCat.shooting),
|
powerShot(StatCat.function),
|
||||||
targetsAir(StatCat.shooting),
|
targetsAir(StatCat.function),
|
||||||
targetsGround(StatCat.shooting),
|
targetsGround(StatCat.function),
|
||||||
damage(StatCat.shooting),
|
damage(StatCat.function),
|
||||||
ammo(StatCat.shooting),
|
ammo(StatCat.function),
|
||||||
shieldHealth(StatCat.shooting),
|
shieldHealth(StatCat.function),
|
||||||
cooldownTime(StatCat.shooting),
|
cooldownTime(StatCat.function),
|
||||||
|
|
||||||
booster(StatCat.optional),
|
booster(StatCat.optional),
|
||||||
boostEffect(StatCat.optional),
|
boostEffect(StatCat.optional),
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ public enum StatCat{
|
|||||||
liquids,
|
liquids,
|
||||||
items,
|
items,
|
||||||
crafting,
|
crafting,
|
||||||
shooting,
|
function,
|
||||||
optional;
|
optional;
|
||||||
|
|
||||||
public String localized(){
|
public String localized(){
|
||||||
|
|||||||
Reference in New Issue
Block a user