More plugin customization / Renamed Rectangle

This commit is contained in:
Anuken
2019-12-26 22:44:15 -05:00
parent 6080a7e4bc
commit d6d6dc29dc
35 changed files with 166 additions and 90 deletions

View File

@@ -12,7 +12,7 @@ import arc.util.pooling.*;
import mindustry.gen.*;
public class Bar extends Element{
private static Rectangle scissor = new Rectangle();
private static Rect scissor = new Rect();
private Floatp fraction;
private String name = "";

View File

@@ -33,7 +33,7 @@ public class DeployDialog extends FloatingDialog{
private final float nodeSize = Scl.scl(230f);
private ObjectSet<ZoneNode> nodes = new ObjectSet<>();
private ZoneInfoDialog info = new ZoneInfoDialog();
private Rectangle bounds = new Rectangle();
private Rect bounds = new Rect();
private View view = new View();
public DeployDialog(){

View File

@@ -31,7 +31,7 @@ public class TechTreeDialog extends FloatingDialog{
private final float nodeSize = Scl.scl(60f);
private ObjectSet<TechTreeNode> nodes = new ObjectSet<>();
private TechTreeNode root = new TechTreeNode(TechTree.root, null);
private Rectangle bounds = new Rectangle();
private Rect bounds = new Rect();
private ItemsDisplay items;
private View view;
@@ -123,7 +123,7 @@ public class TechTreeDialog extends FloatingDialog{
miny = Math.min(n.y - n.height/2f, miny);
maxy = Math.max(n.y + n.height/2f, maxy);
}
bounds = new Rectangle(minx, miny, maxx - minx, maxy - miny);
bounds = new Rect(minx, miny, maxx - minx, maxy - miny);
bounds.y += nodeSize*1.5f;
}

View File

@@ -66,8 +66,8 @@ public class BranchTreeLayout implements TreeLayout{
}
}
public Rectangle getBounds(){
return new Rectangle(boundsLeft, boundsBottom, boundsRight - boundsLeft, boundsTop - boundsBottom);
public Rect getBounds(){
return new Rect(boundsLeft, boundsBottom, boundsRight - boundsLeft, boundsTop - boundsBottom);
}
private void calcSizeOfLevels(TreeNode node, int level){