mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-22 12:33:35 -08:00
Marker outline control (#10931)
* Marker `outline` control * Text/ShapeText marker outline
This commit is contained in:
parent
1465916bed
commit
c27eac9bed
3 changed files with 10 additions and 29 deletions
|
|
@ -822,13 +822,8 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
|
|||
switch(type){
|
||||
case fontSize -> fontSize = (float)p1;
|
||||
case textHeight -> textHeight = (float)p1;
|
||||
case labelFlags -> {
|
||||
if(!Mathf.equal((float)p1, 0f)){
|
||||
flags |= WorldLabel.flagBackground;
|
||||
}else{
|
||||
flags &= ~WorldLabel.flagBackground;
|
||||
}
|
||||
}
|
||||
case outline -> flags = (byte)Pack.bitmask(flags, WorldLabel.flagOutline, !Mathf.equal((float)p1, 0f));
|
||||
case labelFlags -> flags = (byte)Pack.bitmask(flags, WorldLabel.flagBackground, !Mathf.equal((float)p1, 0f));
|
||||
case radius -> radius = (float)p1;
|
||||
case rotation -> rotation = (float)p1;
|
||||
case color -> color.fromDouble(p1);
|
||||
|
|
@ -838,13 +833,7 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
|
|||
|
||||
if(!Double.isNaN(p2)){
|
||||
switch(type){
|
||||
case labelFlags -> {
|
||||
if(!Mathf.equal((float)p2, 0f)){
|
||||
flags |= WorldLabel.flagOutline;
|
||||
}else{
|
||||
flags &= ~WorldLabel.flagOutline;
|
||||
}
|
||||
}
|
||||
case labelFlags -> flags = (byte)Pack.bitmask(flags, WorldLabel.flagOutline, !Mathf.equal((float)p2, 0f));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -962,6 +951,7 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
|
|||
switch(type){
|
||||
case radius -> radius = (float)p1;
|
||||
case stroke -> stroke = (float)p1;
|
||||
case outline -> outline = !Mathf.equal((float)p1, 0f);
|
||||
case rotation -> rotation = (float)p1;
|
||||
case color -> color.fromDouble(p1);
|
||||
case shape -> sides = (int)p1;
|
||||
|
|
@ -1025,25 +1015,14 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
|
|||
if(!Double.isNaN(p1)){
|
||||
switch(type){
|
||||
case fontSize -> fontSize = (float)p1;
|
||||
case labelFlags -> {
|
||||
if(!Mathf.equal((float)p1, 0f)){
|
||||
flags |= WorldLabel.flagBackground;
|
||||
}else{
|
||||
flags &= ~WorldLabel.flagBackground;
|
||||
}
|
||||
}
|
||||
case outline -> flags = (byte)Pack.bitmask(flags, WorldLabel.flagOutline, !Mathf.equal((float)p1, 0f));
|
||||
case labelFlags -> flags = (byte)Pack.bitmask(flags, WorldLabel.flagBackground, !Mathf.equal((float)p1, 0f));
|
||||
}
|
||||
}
|
||||
|
||||
if(!Double.isNaN(p2)){
|
||||
switch(type){
|
||||
case labelFlags -> {
|
||||
if(!Mathf.equal((float)p2, 0f)){
|
||||
flags |= WorldLabel.flagOutline;
|
||||
}else{
|
||||
flags &= ~WorldLabel.flagOutline;
|
||||
}
|
||||
}
|
||||
case labelFlags -> flags = (byte)Pack.bitmask(flags, WorldLabel.flagOutline, !Mathf.equal((float)p2, 0f));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1101,6 +1080,7 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
|
|||
case endPos -> endPos.x = (float)p1 * tilesize;
|
||||
case stroke -> stroke = (float)p1;
|
||||
case color -> color1.set(color2.fromDouble(p1));
|
||||
case outline -> outline = !Mathf.equal((float)p1, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ public enum LMarkerControl{
|
|||
color("color"),
|
||||
radius("radius"),
|
||||
stroke("stroke"),
|
||||
outline("outline"),
|
||||
rotation("rotation"),
|
||||
shape("sides", "fill", "outline"),
|
||||
arc("start", "end"),
|
||||
|
|
|
|||
|
|
@ -26,4 +26,4 @@ org.gradle.caching=true
|
|||
org.gradle.internal.http.socketTimeout=100000
|
||||
org.gradle.internal.http.connectionTimeout=100000
|
||||
android.enableR8.fullMode=false
|
||||
archash=8abaedb419
|
||||
archash=79c4cf021d
|
||||
Loading…
Add table
Add a link
Reference in a new issue