WIP low-tier leg unit
|
Before Width: | Height: | Size: 202 B |
|
Before Width: | Height: | Size: 221 B |
|
Before Width: | Height: | Size: 209 B |
BIN
core/assets-raw/sprites/units/latum-cell.png
Normal file
|
After Width: | Height: | Size: 441 B |
BIN
core/assets-raw/sprites/units/latum-leg-base.png
Normal file
|
After Width: | Height: | Size: 401 B |
BIN
core/assets-raw/sprites/units/latum-leg.png
Normal file
|
After Width: | Height: | Size: 376 B |
BIN
core/assets-raw/sprites/units/latum.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
core/assets-raw/sprites/units/weapons/atrax-weapon.png
Normal file
|
After Width: | Height: | Size: 528 B |
|
Before Width: | Height: | Size: 529 B |
@@ -547,3 +547,4 @@
|
|||||||
63156=ore-beryllium|block-ore-beryllium-ui
|
63156=ore-beryllium|block-ore-beryllium-ui
|
||||||
63155=locus|unit-locus-ui
|
63155=locus|unit-locus-ui
|
||||||
63154=avert|unit-avert-ui
|
63154=avert|unit-avert-ui
|
||||||
|
63153=latum|unit-latum-ui
|
||||||
|
|||||||
@@ -1234,18 +1234,6 @@ public class Fx{
|
|||||||
Lines.circle(e.x, e.y, e.fin() * 50f);
|
Lines.circle(e.x, e.y, e.fin() * 50f);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
nuclearShockwave = new Effect(10f, 200f, e -> {
|
|
||||||
color(Color.white, Color.lightGray, e.fin());
|
|
||||||
stroke(e.fout() * 3f + 0.2f);
|
|
||||||
Lines.circle(e.x, e.y, e.fin() * 140f);
|
|
||||||
}),
|
|
||||||
|
|
||||||
impactShockwave = new Effect(13f, 300f, e -> {
|
|
||||||
color(Pal.lighterOrange, Color.lightGray, e.fin());
|
|
||||||
stroke(e.fout() * 4f + 0.2f);
|
|
||||||
Lines.circle(e.x, e.y, e.fin() * 200f);
|
|
||||||
}),
|
|
||||||
|
|
||||||
spawnShockwave = new Effect(20f, 400f, e -> {
|
spawnShockwave = new Effect(20f, 400f, e -> {
|
||||||
color(Color.white, Color.lightGray, e.fin());
|
color(Color.white, Color.lightGray, e.fin());
|
||||||
stroke(e.fout() * 3f + 0.5f);
|
stroke(e.fout() * 3f + 0.5f);
|
||||||
@@ -1393,27 +1381,6 @@ public class Fx{
|
|||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
|
||||||
blockExplosion = new Effect(30, e -> {
|
|
||||||
e.scaled(7, i -> {
|
|
||||||
stroke(3.1f * i.fout());
|
|
||||||
Lines.circle(e.x, e.y, 3f + i.fin() * 14f);
|
|
||||||
});
|
|
||||||
|
|
||||||
color(Color.gray);
|
|
||||||
|
|
||||||
randLenVectors(e.id, 6, 2f + 19f * e.finpow(), (x, y) -> {
|
|
||||||
Fill.circle(e.x + x, e.y + y, e.fout() * 3f + 0.5f);
|
|
||||||
Fill.circle(e.x + x / 2f, e.y + y / 2f, e.fout());
|
|
||||||
});
|
|
||||||
|
|
||||||
color(Pal.lighterOrange, Pal.lightOrange, Color.gray, e.fin());
|
|
||||||
stroke(1.7f * e.fout());
|
|
||||||
|
|
||||||
randLenVectors(e.id + 1, 9, 1f + 23f * e.finpow(), (x, y) -> {
|
|
||||||
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
blockExplosionSmoke = new Effect(30, e -> {
|
blockExplosionSmoke = new Effect(30, e -> {
|
||||||
color(Color.gray);
|
color(Color.gray);
|
||||||
|
|
||||||
@@ -1872,47 +1839,6 @@ public class Fx{
|
|||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
|
||||||
nuclearsmoke = new Effect(40, e -> {
|
|
||||||
randLenVectors(e.id, 4, e.fin() * 13f, (x, y) -> {
|
|
||||||
float size = e.fslope() * 4f;
|
|
||||||
color(Color.lightGray, Color.gray, e.fin());
|
|
||||||
Fill.circle(e.x + x, e.y + y, size/2f);
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
cloudsmoke = new Effect(70, e -> {
|
|
||||||
randLenVectors(e.id, 12, 15f + e.fin() * 45f, (x, y) -> {
|
|
||||||
float size = e.fslope() * 2f;
|
|
||||||
color(Color.gray);
|
|
||||||
alpha(e.fslope());
|
|
||||||
Fill.circle(e.x + x, e.y + y, size);
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
nuclearcloud = new Effect(90, 200f, e -> {
|
|
||||||
randLenVectors(e.id, 10, e.finpow() * 90f, (x, y) -> {
|
|
||||||
float size = e.fout() * 14f;
|
|
||||||
color(Color.lime, Color.gray, e.fin());
|
|
||||||
Fill.circle(e.x + x, e.y + y, size/2f);
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
impactsmoke = new Effect(60, e -> {
|
|
||||||
randLenVectors(e.id, 7, e.fin() * 20f, (x, y) -> {
|
|
||||||
float size = e.fslope() * 4f;
|
|
||||||
color(Color.lightGray, Color.gray, e.fin());
|
|
||||||
Fill.circle(e.x + x, e.y + y, size/2f);
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
impactcloud = new Effect(140, 400f, e -> {
|
|
||||||
randLenVectors(e.id, 20, e.finpow() * 160f, (x, y) -> {
|
|
||||||
float size = e.fout() * 15f;
|
|
||||||
color(Pal.lighterOrange, Color.lightGray, e.fin());
|
|
||||||
Fill.circle(e.x + x, e.y + y, size/2f);
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
redgeneratespark = new Effect(90, e -> {
|
redgeneratespark = new Effect(90, e -> {
|
||||||
color(Pal.redSpark);
|
color(Pal.redSpark);
|
||||||
alpha(e.fslope());
|
alpha(e.fslope());
|
||||||
@@ -1935,17 +1861,6 @@ public class Fx{
|
|||||||
}
|
}
|
||||||
}).layer(Layer.bullet - 1f),
|
}).layer(Layer.bullet - 1f),
|
||||||
|
|
||||||
crucibleSmoke = new Effect(100, e -> {
|
|
||||||
color(Pal.redLight);
|
|
||||||
alpha(e.fslope() * 0.8f);
|
|
||||||
|
|
||||||
rand.setSeed(e.id);
|
|
||||||
for(int i = 0; i < 5; i++){
|
|
||||||
v.trns(rand.random(360f), rand.random(e.finpow() * 14f)).add(e.x, e.y);
|
|
||||||
Fill.circle(v.x, v.y, rand.random(1.4f, 2.8f));
|
|
||||||
}
|
|
||||||
}).layer(Layer.bullet - 1f),
|
|
||||||
|
|
||||||
generatespark = new Effect(18, e -> {
|
generatespark = new Effect(18, e -> {
|
||||||
randLenVectors(e.id, 5, e.fin() * 8f, (x, y) -> {
|
randLenVectors(e.id, 5, e.fin() * 8f, (x, y) -> {
|
||||||
color(Pal.orangeSpark, Color.gray, e.fin());
|
color(Pal.orangeSpark, Color.gray, e.fin());
|
||||||
@@ -2003,13 +1918,6 @@ public class Fx{
|
|||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
|
||||||
pulverizeRedder = new Effect(40, e -> {
|
|
||||||
randLenVectors(e.id, 5, 3f + e.fin() * 9f, (x, y) -> {
|
|
||||||
color(Pal.redderDust, Pal.stoneGray, e.fin());
|
|
||||||
Fill.square(e.x + x, e.y + y, e.fout() * 2.5f + 0.5f, 45);
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
pulverizeSmall = new Effect(30, e -> {
|
pulverizeSmall = new Effect(30, e -> {
|
||||||
randLenVectors(e.id, 3, e.fin() * 5f, (x, y) -> {
|
randLenVectors(e.id, 3, e.fin() * 5f, (x, y) -> {
|
||||||
color(Pal.stoneGray);
|
color(Pal.stoneGray);
|
||||||
@@ -2096,24 +2004,6 @@ public class Fx{
|
|||||||
Lines.square(e.x, e.y, tilesize + e.fout() * 2f);
|
Lines.square(e.x, e.y, tilesize + e.fout() * 2f);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
purify = new Effect(10, e -> {
|
|
||||||
color(Color.royal, Color.gray, e.fin());
|
|
||||||
stroke(2f);
|
|
||||||
Lines.spikes(e.x, e.y, e.fin() * 4f, 2, 6);
|
|
||||||
}),
|
|
||||||
|
|
||||||
purifyoil = new Effect(10, e -> {
|
|
||||||
color(Color.black, Color.gray, e.fin());
|
|
||||||
stroke(2f);
|
|
||||||
Lines.spikes(e.x, e.y, e.fin() * 4f, 2, 6);
|
|
||||||
}),
|
|
||||||
|
|
||||||
purifystone = new Effect(10, e -> {
|
|
||||||
color(Color.orange, Color.gray, e.fin());
|
|
||||||
stroke(2f);
|
|
||||||
Lines.spikes(e.x, e.y, e.fin() * 4f, 2, 6);
|
|
||||||
}),
|
|
||||||
|
|
||||||
generate = new Effect(11, e -> {
|
generate = new Effect(11, e -> {
|
||||||
color(Color.orange, Color.yellow, e.fin());
|
color(Color.orange, Color.yellow, e.fin());
|
||||||
stroke(1f);
|
stroke(1f);
|
||||||
@@ -2184,13 +2074,6 @@ public class Fx{
|
|||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
|
||||||
smelt = new Effect(20, e -> {
|
|
||||||
color(Color.white, e.color, e.fin());
|
|
||||||
randLenVectors(e.id, 6, 2f + e.fin() * 5f, (x, y) -> {
|
|
||||||
Fill.square(e.x + x, e.y + y, 0.5f + e.fout() * 2f, 45);
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
teleportActivate = new Effect(50, e -> {
|
teleportActivate = new Effect(50, e -> {
|
||||||
color(e.color);
|
color(e.color);
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,8 @@ public class UnitTypes{
|
|||||||
public static @EntityDef(value = {Unitc.class, Mechc.class}, legacy = true) UnitType nova, pulsar, quasar;
|
public static @EntityDef(value = {Unitc.class, Mechc.class}, legacy = true) UnitType nova, pulsar, quasar;
|
||||||
|
|
||||||
//legs
|
//legs
|
||||||
public static @EntityDef({Unitc.class, Legsc.class}) UnitType corvus, atrax, bulwark, krepost;
|
public static @EntityDef({Unitc.class, Legsc.class}) UnitType corvus, atrax,
|
||||||
|
latum, bulwark, krepost;
|
||||||
|
|
||||||
//legs, legacy
|
//legs, legacy
|
||||||
public static @EntityDef(value = {Unitc.class, Legsc.class}, legacy = true) UnitType spiroct, arkyid, toxopid;
|
public static @EntityDef(value = {Unitc.class, Legsc.class}, legacy = true) UnitType spiroct, arkyid, toxopid;
|
||||||
@@ -641,7 +642,7 @@ public class UnitTypes{
|
|||||||
visualElevation = 0.2f;
|
visualElevation = 0.2f;
|
||||||
groundLayer = Layer.legUnit - 1f;
|
groundLayer = Layer.legUnit - 1f;
|
||||||
|
|
||||||
weapons.add(new Weapon("eruption"){{
|
weapons.add(new Weapon("atrax-weapon"){{
|
||||||
top = false;
|
top = false;
|
||||||
shootY = 3f;
|
shootY = 3f;
|
||||||
reload = 9f;
|
reload = 9f;
|
||||||
@@ -2499,6 +2500,7 @@ public class UnitTypes{
|
|||||||
spread = 3.5f;
|
spread = 3.5f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
//TODO make this look nice
|
||||||
bullet = new RailBulletType(){{
|
bullet = new RailBulletType(){{
|
||||||
length = 140f;
|
length = 140f;
|
||||||
damage = 40f;
|
damage = 40f;
|
||||||
@@ -2771,6 +2773,52 @@ public class UnitTypes{
|
|||||||
//endregion
|
//endregion
|
||||||
//region erekir - mech
|
//region erekir - mech
|
||||||
|
|
||||||
|
latum = new ErekirUnitType("latum"){{
|
||||||
|
speed = 0.7f;
|
||||||
|
drag = 0.1f;
|
||||||
|
hitSize = 14f;
|
||||||
|
rotateSpeed = 3f;
|
||||||
|
health = 700;
|
||||||
|
|
||||||
|
legCount = 4;
|
||||||
|
legLength = 14f;
|
||||||
|
lockLegBase = true;
|
||||||
|
legContinuousMove = true;
|
||||||
|
legExtension = -3f;
|
||||||
|
legBaseOffset = 5f;
|
||||||
|
maxStretch = 1.1f;
|
||||||
|
maxCompress = 0.2f;
|
||||||
|
legLengthScl = 0.95f;
|
||||||
|
legTrns = 0.7f;
|
||||||
|
|
||||||
|
legMoveSpace = 1f;
|
||||||
|
hovering = true;
|
||||||
|
armor = 5f;
|
||||||
|
|
||||||
|
visualElevation = 0.2f;
|
||||||
|
groundLayer = Layer.legUnit - 1f;
|
||||||
|
|
||||||
|
if(false)
|
||||||
|
weapons.add(new Weapon("eruption"){{
|
||||||
|
top = false;
|
||||||
|
shootY = 3f;
|
||||||
|
reload = 9f;
|
||||||
|
ejectEffect = Fx.none;
|
||||||
|
recoil = 1f;
|
||||||
|
x = 7f;
|
||||||
|
shootSound = Sounds.flame;
|
||||||
|
|
||||||
|
bullet = new LiquidBulletType(Liquids.slag){{
|
||||||
|
damage = 13;
|
||||||
|
speed = 2.5f;
|
||||||
|
drag = 0.009f;
|
||||||
|
shootEffect = Fx.shootSmall;
|
||||||
|
lifetime = 57f;
|
||||||
|
collidesAir = false;
|
||||||
|
}};
|
||||||
|
}});
|
||||||
|
}};
|
||||||
|
|
||||||
bulwark = new ErekirUnitType("bulwark"){{
|
bulwark = new ErekirUnitType("bulwark"){{
|
||||||
drag = 0.1f;
|
drag = 0.1f;
|
||||||
speed = 0.6f;
|
speed = 0.6f;
|
||||||
|
|||||||
@@ -147,8 +147,8 @@ abstract class LegsComp implements Posc, Rotc, Hitboxc, Flyingc, Unitc{
|
|||||||
Leg l = legs[i];
|
Leg l = legs[i];
|
||||||
|
|
||||||
//TODO is limiting twice necessary?
|
//TODO is limiting twice necessary?
|
||||||
l.joint.sub(baseOffset).limit(type.maxStretch * legLength/2f).add(baseOffset);
|
l.joint.sub(baseOffset).clampLength(type.maxCompress * legLength/2f, type.maxStretch * legLength/2f).add(baseOffset);
|
||||||
l.base.sub(baseOffset).limit(type.maxStretch * legLength).add(baseOffset);
|
l.base.sub(baseOffset).clampLength(type.maxCompress * legLength, type.maxStretch * legLength).add(baseOffset);
|
||||||
|
|
||||||
float stageF = (totalLength + i*type.legPairOffset) / moveSpace;
|
float stageF = (totalLength + i*type.legPairOffset) / moveSpace;
|
||||||
int stage = (int)stageF;
|
int stage = (int)stageF;
|
||||||
@@ -212,8 +212,8 @@ abstract class LegsComp implements Posc, Rotc, Hitboxc, Flyingc, Unitc{
|
|||||||
l.joint.lerpDelta(jointDest, moveSpeed / 4f);
|
l.joint.lerpDelta(jointDest, moveSpeed / 4f);
|
||||||
|
|
||||||
//limit again after updating
|
//limit again after updating
|
||||||
l.joint.sub(baseOffset).limit(type.maxStretch * legLength/2f).add(baseOffset);
|
l.joint.sub(baseOffset).clampLength(type.maxCompress * legLength/2f, type.maxStretch * legLength/2f).add(baseOffset);
|
||||||
l.base.sub(baseOffset).limit(type.maxStretch * legLength).add(baseOffset);
|
l.base.sub(baseOffset).clampLength(type.maxCompress * legLength, type.maxStretch * legLength).add(baseOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
//when at least 1 leg is touching land, it can't drown
|
//when at least 1 leg is touching land, it can't drown
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ public class UnitType extends UnlockableContent{
|
|||||||
public boolean outlines = true;
|
public boolean outlines = true;
|
||||||
|
|
||||||
public int legCount = 4, legGroupSize = 2;
|
public int legCount = 4, legGroupSize = 2;
|
||||||
public float legLength = 10f, legSpeed = 0.1f, legTrns = 1f, legBaseOffset = 0f, legMoveSpace = 1f, legExtension = 0, legPairOffset = 0, legLengthScl = 1f, kinematicScl = 1f, maxStretch = 1.75f;
|
public float legLength = 10f, legSpeed = 0.1f, legTrns = 1f, legBaseOffset = 0f, legMoveSpace = 1f, legExtension = 0, legPairOffset = 0, legLengthScl = 1f, kinematicScl = 1f, maxStretch = 1.75f, maxCompress = 0f;
|
||||||
public float legSplashDamage = 0f, legSplashRange = 5;
|
public float legSplashDamage = 0f, legSplashRange = 5;
|
||||||
public float legStraightLength = 1f;
|
public float legStraightLength = 1f;
|
||||||
/** If true, legs are locked to the base of the unit instead of being on an implicit rotating "mount". */
|
/** If true, legs are locked to the base of the unit instead of being on an implicit rotating "mount". */
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import arc.scene.ui.TreeElement.*;
|
|||||||
import mindustry.annotations.Annotations.*;
|
import mindustry.annotations.Annotations.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.graphics.*;
|
import mindustry.graphics.*;
|
||||||
import mindustry.ui.dialogs.*;
|
|
||||||
|
|
||||||
import static mindustry.gen.Tex.*;
|
import static mindustry.gen.Tex.*;
|
||||||
|
|
||||||
@@ -26,11 +25,12 @@ import static mindustry.gen.Tex.*;
|
|||||||
public class Styles{
|
public class Styles{
|
||||||
//TODO all these names are inconsistent and not descriptive
|
//TODO all these names are inconsistent and not descriptive
|
||||||
public static Drawable black, black9, black8, black6, black3, black5, none, flatDown, flatOver, accentDrawable;
|
public static Drawable black, black9, black8, black6, black3, black5, none, flatDown, flatOver, accentDrawable;
|
||||||
public static ButtonStyle defaultb, waveb, modsb, underlineb;
|
|
||||||
public static TextButtonStyle defaultt, squaret, nodet, cleart, discordt, nonet, infot, clearPartialt, clearTogglet, logicTogglet, clearToggleMenut, togglet, transt, fullTogglet, squareTogglet, logict;
|
public static ButtonStyle defaultb, underlineb;
|
||||||
public static ImageButtonStyle defaulti, nodei, righti, emptyi, emptytogglei, selecti, logici, geni, colori, accenti, cleari, clearFulli, clearPartiali, clearPartial2i, clearTogglei, clearTransi, clearToggleTransi, clearTogglePartiali;
|
|
||||||
|
public static TextButtonStyle defaultt, nodet, cleart, nonet, clearPartialt, clearTogglet, logicTogglet, clearToggleMenut, togglet, transt, fullTogglet, squareTogglet, logict;
|
||||||
|
public static ImageButtonStyle defaulti, nodei, emptyi, emptytogglei, selecti, logici, geni, colori, accenti, cleari, clearFulli, clearPartiali, clearTogglei, clearTransi, clearToggleTransi, clearTogglePartiali;
|
||||||
public static ScrollPaneStyle defaultPane, horizontalPane, smallPane, nonePane;
|
public static ScrollPaneStyle defaultPane, horizontalPane, smallPane, nonePane;
|
||||||
public static KeybindDialog.KeybindDialogStyle defaultKeybindDialog;
|
|
||||||
public static SliderStyle defaultSlider;
|
public static SliderStyle defaultSlider;
|
||||||
public static LabelStyle defaultLabel, outlineLabel, techLabel;
|
public static LabelStyle defaultLabel, outlineLabel, techLabel;
|
||||||
public static TextFieldStyle defaultField, nodeField, areaField, nodeArea;
|
public static TextFieldStyle defaultField, nodeField, areaField, nodeArea;
|
||||||
@@ -59,24 +59,12 @@ public class Styles{
|
|||||||
disabled = buttonDisabled;
|
disabled = buttonDisabled;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
modsb = new ButtonStyle(){{
|
|
||||||
down = flatOver;
|
|
||||||
up = underline;
|
|
||||||
over = underline2;
|
|
||||||
}};
|
|
||||||
|
|
||||||
underlineb = new ButtonStyle(){{
|
underlineb = new ButtonStyle(){{
|
||||||
down = flatOver;
|
down = flatOver;
|
||||||
up = sideline;
|
up = sideline;
|
||||||
over = sidelineOver;
|
over = sidelineOver;
|
||||||
checked = flatOver;
|
checked = flatOver;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
waveb = new ButtonStyle(){{
|
|
||||||
up = wavepane;
|
|
||||||
over = wavepane; //TODO wrong
|
|
||||||
disabled = wavepane;
|
|
||||||
}};
|
|
||||||
|
|
||||||
defaultt = new TextButtonStyle(){{
|
defaultt = new TextButtonStyle(){{
|
||||||
over = buttonOver;
|
over = buttonOver;
|
||||||
@@ -87,15 +75,6 @@ public class Styles{
|
|||||||
down = buttonDown;
|
down = buttonDown;
|
||||||
up = button;
|
up = button;
|
||||||
}};
|
}};
|
||||||
squaret = new TextButtonStyle(){{
|
|
||||||
font = Fonts.def;
|
|
||||||
fontColor = Color.white;
|
|
||||||
disabledFontColor = Color.gray;
|
|
||||||
over = buttonSquareOver;
|
|
||||||
disabled = buttonDisabled;
|
|
||||||
down = buttonSquareDown;
|
|
||||||
up = buttonSquare;
|
|
||||||
}};
|
|
||||||
nodet = new TextButtonStyle(){{
|
nodet = new TextButtonStyle(){{
|
||||||
disabled = button;
|
disabled = button;
|
||||||
font = Fonts.def;
|
font = Fonts.def;
|
||||||
@@ -127,16 +106,6 @@ public class Styles{
|
|||||||
down = flatOver;
|
down = flatOver;
|
||||||
up = underlineWhite;
|
up = underlineWhite;
|
||||||
}};
|
}};
|
||||||
discordt = new TextButtonStyle(){{
|
|
||||||
font = Fonts.def;
|
|
||||||
fontColor = Color.white;
|
|
||||||
up = discordBanner;
|
|
||||||
}};
|
|
||||||
infot = new TextButtonStyle(){{
|
|
||||||
font = Fonts.def;
|
|
||||||
fontColor = Color.white;
|
|
||||||
up = infoBanner;
|
|
||||||
}};
|
|
||||||
clearPartialt = new TextButtonStyle(){{
|
clearPartialt = new TextButtonStyle(){{
|
||||||
down = flatOver;
|
down = flatOver;
|
||||||
up = pane;
|
up = pane;
|
||||||
@@ -225,14 +194,6 @@ public class Styles{
|
|||||||
up = buttonOver;
|
up = buttonOver;
|
||||||
over = buttonDown;
|
over = buttonDown;
|
||||||
}};
|
}};
|
||||||
righti = new ImageButtonStyle(){{
|
|
||||||
over = buttonRightOver;
|
|
||||||
down = buttonRightDown;
|
|
||||||
up = buttonRight;
|
|
||||||
disabled = buttonRightDisabled;
|
|
||||||
imageDisabledColor = Color.clear;
|
|
||||||
imageUpColor = Color.white;
|
|
||||||
}};
|
|
||||||
emptyi = new ImageButtonStyle(){{
|
emptyi = new ImageButtonStyle(){{
|
||||||
imageDownColor = Pal.accent;
|
imageDownColor = Pal.accent;
|
||||||
imageOverColor = Color.lightGray;
|
imageOverColor = Color.lightGray;
|
||||||
@@ -282,11 +243,6 @@ public class Styles{
|
|||||||
imageDisabledColor = Color.gray;
|
imageDisabledColor = Color.gray;
|
||||||
imageUpColor = Color.white;
|
imageUpColor = Color.white;
|
||||||
}};
|
}};
|
||||||
clearPartial2i = new ImageButtonStyle(){{
|
|
||||||
down = whiteui;
|
|
||||||
up = pane;
|
|
||||||
over = flatDown;
|
|
||||||
}};
|
|
||||||
clearTogglei = new ImageButtonStyle(){{
|
clearTogglei = new ImageButtonStyle(){{
|
||||||
down = flatDown;
|
down = flatDown;
|
||||||
checked = flatDown;
|
checked = flatDown;
|
||||||
@@ -330,12 +286,6 @@ public class Styles{
|
|||||||
}};
|
}};
|
||||||
nonePane = new ScrollPaneStyle();
|
nonePane = new ScrollPaneStyle();
|
||||||
|
|
||||||
defaultKeybindDialog = new KeybindDialog.KeybindDialogStyle(){{
|
|
||||||
keyColor = Pal.accent;
|
|
||||||
keyNameColor = Color.white;
|
|
||||||
controllerColor = Color.lightGray;
|
|
||||||
}};
|
|
||||||
|
|
||||||
defaultSlider = new SliderStyle(){{
|
defaultSlider = new SliderStyle(){{
|
||||||
background = sliderBack;
|
background = sliderBack;
|
||||||
knob = sliderKnob;
|
knob = sliderKnob;
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import arc.graphics.*;
|
|||||||
import arc.input.*;
|
import arc.input.*;
|
||||||
import arc.input.InputDevice.*;
|
import arc.input.InputDevice.*;
|
||||||
import arc.scene.event.*;
|
import arc.scene.event.*;
|
||||||
import arc.scene.style.*;
|
|
||||||
import arc.scene.ui.*;
|
import arc.scene.ui.*;
|
||||||
import arc.scene.ui.layout.*;
|
import arc.scene.ui.layout.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
@@ -18,7 +17,6 @@ import mindustry.ui.*;
|
|||||||
import static arc.Core.*;
|
import static arc.Core.*;
|
||||||
|
|
||||||
public class KeybindDialog extends Dialog{
|
public class KeybindDialog extends Dialog{
|
||||||
protected KeybindDialogStyle style;
|
|
||||||
protected Section section;
|
protected Section section;
|
||||||
protected KeyBind rebindKey = null;
|
protected KeyBind rebindKey = null;
|
||||||
protected boolean rebindAxis = false;
|
protected boolean rebindAxis = false;
|
||||||
@@ -30,7 +28,6 @@ public class KeybindDialog extends Dialog{
|
|||||||
|
|
||||||
public KeybindDialog(){
|
public KeybindDialog(){
|
||||||
super(bundle.get("keybind.title", "Rebind Keys"));
|
super(bundle.get("keybind.title", "Rebind Keys"));
|
||||||
style = scene.getStyle(KeybindDialogStyle.class);
|
|
||||||
setup();
|
setup();
|
||||||
addCloseButton();
|
addCloseButton();
|
||||||
setFillParent(true);
|
setFillParent(true);
|
||||||
@@ -48,11 +45,6 @@ public class KeybindDialog extends Dialog{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStyle(KeybindDialogStyle style){
|
|
||||||
this.style = style;
|
|
||||||
setup();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setup(){
|
private void setup(){
|
||||||
cont.clear();
|
cont.clear();
|
||||||
|
|
||||||
@@ -124,7 +116,7 @@ public class KeybindDialog extends Dialog{
|
|||||||
table.add().height(10);
|
table.add().height(10);
|
||||||
table.row();
|
table.row();
|
||||||
if(section.device.type() == DeviceType.controller){
|
if(section.device.type() == DeviceType.controller){
|
||||||
table.table(info -> info.add("Controller Type: [#" + style.controllerColor.toString().toUpperCase() + "]" +
|
table.table(info -> info.add("Controller Type: [lightGray]" +
|
||||||
Strings.capitalize(section.device.name())).left());
|
Strings.capitalize(section.device.name())).left());
|
||||||
}
|
}
|
||||||
table.row();
|
table.row();
|
||||||
@@ -140,12 +132,12 @@ public class KeybindDialog extends Dialog{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(keybind.defaultValue(section.device.type()) instanceof Axis){
|
if(keybind.defaultValue(section.device.type()) instanceof Axis){
|
||||||
table.add(bundle.get("keybind." + keybind.name() + ".name", Strings.capitalize(keybind.name())), style.keyNameColor).left().padRight(40).padLeft(8);
|
table.add(bundle.get("keybind." + keybind.name() + ".name", Strings.capitalize(keybind.name())), Color.white).left().padRight(40).padLeft(8);
|
||||||
|
|
||||||
table.labelWrap(() -> {
|
table.labelWrap(() -> {
|
||||||
Axis axis = keybinds.get(section, keybind);
|
Axis axis = keybinds.get(section, keybind);
|
||||||
return axis.key != null ? axis.key.toString() : axis.min + " [red]/[] " + axis.max;
|
return axis.key != null ? axis.key.toString() : axis.min + " [red]/[] " + axis.max;
|
||||||
}).color(style.keyColor).left().minWidth(90).fillX().padRight(20);
|
}).color(Pal.accent).left().minWidth(90).fillX().padRight(20);
|
||||||
|
|
||||||
table.button("@settings.rebind", tstyle, () -> {
|
table.button("@settings.rebind", tstyle, () -> {
|
||||||
rebindAxis = true;
|
rebindAxis = true;
|
||||||
@@ -153,8 +145,8 @@ public class KeybindDialog extends Dialog{
|
|||||||
openDialog(section, keybind);
|
openDialog(section, keybind);
|
||||||
}).width(130f);
|
}).width(130f);
|
||||||
}else{
|
}else{
|
||||||
table.add(bundle.get("keybind." + keybind.name() + ".name", Strings.capitalize(keybind.name())), style.keyNameColor).left().padRight(40).padLeft(8);
|
table.add(bundle.get("keybind." + keybind.name() + ".name", Strings.capitalize(keybind.name())), Color.white).left().padRight(40).padLeft(8);
|
||||||
table.label(() -> keybinds.get(section, keybind).key.toString()).color(style.keyColor).left().minWidth(90).padRight(20);
|
table.label(() -> keybinds.get(section, keybind).key.toString()).color(Pal.accent).left().minWidth(90).padRight(20);
|
||||||
|
|
||||||
table.button("@settings.rebind", tstyle, () -> {
|
table.button("@settings.rebind", tstyle, () -> {
|
||||||
rebindAxis = false;
|
rebindAxis = false;
|
||||||
@@ -239,10 +231,4 @@ public class KeybindDialog extends Dialog{
|
|||||||
rebindDialog.show();
|
rebindDialog.show();
|
||||||
Time.runTask(1f, () -> getScene().setScrollFocus(rebindDialog));
|
Time.runTask(1f, () -> getScene().setScrollFocus(rebindDialog));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class KeybindDialogStyle extends Style{
|
|
||||||
public Color keyColor = Color.white;
|
|
||||||
public Color keyNameColor = Color.white;
|
|
||||||
public Color controllerColor = Color.white;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import mindustry.type.*;
|
|||||||
import mindustry.ui.*;
|
import mindustry.ui.*;
|
||||||
|
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
import static mindustry.gen.Tex.*;
|
||||||
|
|
||||||
public class HudFragment extends Fragment{
|
public class HudFragment extends Fragment{
|
||||||
private static final float dsize = 65f, pauseHeight = 36f;
|
private static final float dsize = 65f, pauseHeight = 36f;
|
||||||
@@ -199,8 +200,17 @@ public class HudFragment extends Fragment{
|
|||||||
//wave info button with text
|
//wave info button with text
|
||||||
s.add(makeStatusTable()).grow().name("status");
|
s.add(makeStatusTable()).grow().name("status");
|
||||||
|
|
||||||
|
var rightStyle = new ImageButtonStyle(){{
|
||||||
|
over = buttonRightOver;
|
||||||
|
down = buttonRightDown;
|
||||||
|
up = buttonRight;
|
||||||
|
disabled = buttonRightDisabled;
|
||||||
|
imageDisabledColor = Color.clear;
|
||||||
|
imageUpColor = Color.white;
|
||||||
|
}};
|
||||||
|
|
||||||
//table with button to skip wave
|
//table with button to skip wave
|
||||||
s.button(Icon.play, Styles.righti, 30f, () -> {
|
s.button(Icon.play, rightStyle, 30f, () -> {
|
||||||
if(net.client() && player.admin){
|
if(net.client() && player.admin){
|
||||||
Call.adminRequest(player, AdminAction.wave);
|
Call.adminRequest(player, AdminAction.wave);
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import arc.scene.actions.*;
|
|||||||
import arc.scene.event.*;
|
import arc.scene.event.*;
|
||||||
import arc.scene.style.*;
|
import arc.scene.style.*;
|
||||||
import arc.scene.ui.*;
|
import arc.scene.ui.*;
|
||||||
|
import arc.scene.ui.TextButton.*;
|
||||||
import arc.scene.ui.layout.*;
|
import arc.scene.ui.layout.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import mindustry.core.*;
|
import mindustry.core.*;
|
||||||
@@ -18,6 +19,7 @@ import mindustry.graphics.*;
|
|||||||
import mindustry.ui.*;
|
import mindustry.ui.*;
|
||||||
|
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
import static mindustry.gen.Tex.*;
|
||||||
|
|
||||||
public class MenuFragment extends Fragment{
|
public class MenuFragment extends Fragment{
|
||||||
private Table container, submenu;
|
private Table container, submenu;
|
||||||
@@ -52,8 +54,17 @@ public class MenuFragment extends Fragment{
|
|||||||
|
|
||||||
//info icon
|
//info icon
|
||||||
if(mobile){
|
if(mobile){
|
||||||
parent.fill(c -> c.bottom().left().button("", Styles.infot, ui.about::show).size(84, 45).name("info"));
|
parent.fill(c -> c.bottom().left().button("", new TextButtonStyle(){{
|
||||||
parent.fill(c -> c.bottom().right().button("", Styles.discordt, ui.discord::show).size(84, 45).name("discord"));
|
font = Fonts.def;
|
||||||
|
fontColor = Color.white;
|
||||||
|
up = infoBanner;
|
||||||
|
}}, ui.about::show).size(84, 45).name("info"));
|
||||||
|
|
||||||
|
parent.fill(c -> c.bottom().right().button("", new TextButtonStyle(){{
|
||||||
|
font = Fonts.def;
|
||||||
|
fontColor = Color.white;
|
||||||
|
up = discordBanner;
|
||||||
|
}}, ui.discord::show).size(84, 45).name("discord"));
|
||||||
}else if(becontrol.active()){
|
}else if(becontrol.active()){
|
||||||
parent.fill(c -> c.bottom().right().button("@be.check", Icon.refresh, () -> {
|
parent.fill(c -> c.bottom().right().button("@be.check", Icon.refresh, () -> {
|
||||||
ui.loadfrag.show();
|
ui.loadfrag.show();
|
||||||
|
|||||||
@@ -24,4 +24,4 @@ android.useAndroidX=true
|
|||||||
#used for slow jitpack builds; TODO see if this actually works
|
#used for slow jitpack builds; TODO see if this actually works
|
||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
archash=62774bbfce
|
archash=157fec7f27
|
||||||
|
|||||||