Removed LCategory

This commit is contained in:
Anuken
2020-11-10 08:57:30 -05:00
parent ebdced5c6c
commit f0c4ebfd31
6 changed files with 52 additions and 61 deletions

View File

@ -98,5 +98,11 @@ public class Pal{
plasticSmoke = Color.valueOf("f1e479"),
adminChat = Color.valueOf("ff4000");
adminChat = Color.valueOf("ff4000"),
logicBlocks = Color.valueOf("d4816b"),
logicControl = Color.valueOf("6bb2b2"),
logicOperations = Color.valueOf("877bad"),
logicIo = Color.valueOf("a08a8a"),
logicUnits = Color.valueOf("c7b59d");
}

View File

@ -268,7 +268,7 @@ public class LCanvas extends Table{
st.elem = this;
background(Tex.whitePane);
setColor(st.category().color);
setColor(st.color());
margin(0f);
touchable = Touchable.enabled;

View File

@ -1,17 +0,0 @@
package mindustry.logic;
import arc.graphics.*;
public enum LCategory{
blocks(Color.valueOf("d4816b")),
control(Color.valueOf("6bb2b2")),
operations(Color.valueOf("877bad")),
io(Color.valueOf("a08a8a")),
units(Color.valueOf("c7b59d"));
public final Color color;
LCategory(Color color){
this.color = color;
}
}

View File

@ -2,6 +2,7 @@ package mindustry.logic;
import arc.*;
import arc.func.*;
import arc.graphics.*;
import arc.math.*;
import arc.scene.*;
import arc.scene.actions.*;
@ -21,7 +22,7 @@ public abstract class LStatement{
public transient @Nullable StatementElem elem;
public abstract void build(Table table);
public abstract LCategory category();
public abstract Color color();
public abstract LInstruction build(LAssembler builder);
public LStatement copy(){

View File

@ -8,6 +8,7 @@ import arc.scene.ui.layout.*;
import mindustry.*;
import mindustry.annotations.Annotations.*;
import mindustry.gen.*;
import mindustry.graphics.*;
import mindustry.logic.LCanvas.*;
import mindustry.logic.LExecutor.*;
import mindustry.type.*;
@ -29,8 +30,8 @@ public class LStatements{
}
@Override
public LCategory category(){
return LCategory.control;
public Color color(){
return Pal.logicControl;
}
@Override
@ -47,8 +48,8 @@ public class LStatements{
}
@Override
public LCategory category(){
return LCategory.operations;
public Color color(){
return Pal.logicOperations;
}
@Override
@ -79,8 +80,8 @@ public class LStatements{
}
@Override
public LCategory category(){
return LCategory.io;
public Color color(){
return Pal.logicIo;
}
@Override
@ -111,8 +112,8 @@ public class LStatements{
}
@Override
public LCategory category(){
return LCategory.io;
public Color color(){
return Pal.logicIo;
}
@Override
@ -233,8 +234,8 @@ public class LStatements{
}
@Override
public LCategory category(){
return LCategory.io;
public Color color(){
return Pal.logicIo;
}
@Override
@ -258,8 +259,8 @@ public class LStatements{
}
@Override
public LCategory category(){
return LCategory.io;
public Color color(){
return Pal.logicIo;
}
}
@ -274,8 +275,8 @@ public class LStatements{
}
@Override
public LCategory category(){
return LCategory.blocks;
public Color color(){
return Pal.logicBlocks;
}
@Override
@ -295,8 +296,8 @@ public class LStatements{
}
@Override
public LCategory category(){
return LCategory.blocks;
public Color color(){
return Pal.logicBlocks;
}
@Override
@ -319,8 +320,8 @@ public class LStatements{
}
@Override
public LCategory category(){
return LCategory.blocks;
public Color color(){
return Pal.logicBlocks;
}
@Override
@ -372,8 +373,8 @@ public class LStatements{
}
@Override
public LCategory category(){
return LCategory.blocks;
public Color color(){
return Pal.logicBlocks;
}
@Override
@ -443,8 +444,8 @@ public class LStatements{
}
@Override
public LCategory category(){
return LCategory.blocks;
public Color color(){
return Pal.logicBlocks;
}
@Override
@ -546,8 +547,8 @@ public class LStatements{
}
@Override
public LCategory category(){
return LCategory.blocks;
public Color color(){
return Pal.logicBlocks;
}
@Override
@ -571,8 +572,8 @@ public class LStatements{
}
@Override
public LCategory category(){
return LCategory.operations;
public Color color(){
return Pal.logicOperations;
}
@Override
@ -629,8 +630,8 @@ public class LStatements{
}
@Override
public LCategory category(){
return LCategory.operations;
public Color color(){
return Pal.logicOperations;
}
}
@ -647,8 +648,8 @@ public class LStatements{
}
@Override
public LCategory category(){
return LCategory.control;
public Color color(){
return Pal.logicControl;
}
}
@ -712,8 +713,8 @@ public class LStatements{
}
@Override
public LCategory category(){
return LCategory.control;
public Color color(){
return Pal.logicControl;
}
}
@ -750,8 +751,8 @@ public class LStatements{
}
@Override
public LCategory category(){
return LCategory.units;
public Color color(){
return Pal.logicUnits;
}
@Override
@ -803,8 +804,8 @@ public class LStatements{
}
@Override
public LCategory category(){
return LCategory.units;
public Color color(){
return Pal.logicUnits;
}
@Override
@ -823,8 +824,8 @@ public class LStatements{
}
@Override
public LCategory category(){
return LCategory.units;
public Color color(){
return Pal.logicUnits;
}
@Override
@ -932,8 +933,8 @@ public class LStatements{
}
@Override
public LCategory category(){
return LCategory.units;
public Color color(){
return Pal.logicUnits;
}
@Override

View File

@ -65,7 +65,7 @@ public class LogicDialog extends BaseDialog{
if(example instanceof InvalidStatement || example.hidden()) continue;
TextButtonStyle style = new TextButtonStyle(Styles.cleart);
style.fontColor = example.category().color;
style.fontColor = example.color();
style.font = Fonts.outline;
t.button(example.name(), style, () -> {