Map objective editor fixes

This commit is contained in:
Anuken
2022-06-26 14:07:58 -04:00
parent 02e46a9909
commit 3f6ab92fcb
3 changed files with 63 additions and 40 deletions

View File

@@ -489,22 +489,22 @@ public class MapObjectives{
/** Displays a circle on the minimap. */
public static class MinimapMarker extends ObjectiveMarker{
//in tiles.
public float x, y, radius = 5f, stroke = 11f;
public int x, y;
public float radius = 5f, stroke = 11f;
public Color color = Color.valueOf("f25555");
public MinimapMarker(float x, float y){
public MinimapMarker(int x, int y){
this.x = x;
this.y = y;
}
public MinimapMarker(float x, float y, Color color){
public MinimapMarker(int x, int y, Color color){
this.x = x;
this.y = y;
this.color = color;
}
public MinimapMarker(float x, float y, float radius, float stroke, Color color){
public MinimapMarker(int x, int y, float radius, float stroke, Color color){
this.x = x;
this.y = y;
this.stroke = stroke;
@@ -530,7 +530,7 @@ public class MapObjectives{
/** Displays a shape with an outline and color. */
public static class ShapeMarker extends ObjectiveMarker{
public float x, y, radius = 6f, rotation = 0f, stroke = 1f;
public float x, y, radius = 8f, rotation = 0f, stroke = 1f;
public boolean fill = false, outline = true;
public int sides = 4;
public Color color = Color.valueOf("ffd37f");
@@ -552,6 +552,9 @@ public class MapObjectives{
@Override
public void draw(){
//in case some idiot decides to make 9999999 sides and freeze the game
int sides = Math.min(this.sides, 200);
if(!fill){
if(outline){
Lines.stroke(stroke + 2f, Pal.gray);
@@ -611,7 +614,7 @@ public class MapObjectives{
//TODO localize
public String typeName(){
return getClass().getSimpleName().replace("Objective", "");
return getClass().getSimpleName().replace("Marker", "");
}
/** Called in the overlay draw layer.*/