From aec613ba75db8227d8066161d63c87ae428991b0 Mon Sep 17 00:00:00 2001 From: squi2rel <102400902+squi2rel@users.noreply.github.com> Date: Sat, 23 Apr 2022 22:32:29 +0800 Subject: [PATCH 1/3] Update servers_v7.json (#6729) rename&adjust the order --- servers_v7.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servers_v7.json b/servers_v7.json index 4421a524c7..c62fb5dc6c 100644 --- a/servers_v7.json +++ b/servers_v7.json @@ -92,7 +92,7 @@ "address": ["mdt.wayzer.cf"] }, { - "name": "[CIG]Mindustry Server", - "address": ["mindustry.vicp.io:6567", "mindustry.vicp.io:7000", "mindustry.vicp.io:6800"] + "name": "[CIG]Potato", + "address": ["mindustry.vicp.io:6800", "mindustry.vicp.io:7000", "mindustry.vicp.io:6567"] } ] From 653f254b9d48544e122ca1079da52368d41bfe3f Mon Sep 17 00:00:00 2001 From: GaviTSRA <61122293+GaviTSRA@users.noreply.github.com> Date: Sat, 23 Apr 2022 16:32:39 +0200 Subject: [PATCH 2/3] Update servers_v6.json (#6731) --- servers_v6.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers_v6.json b/servers_v6.json index fa4073526b..2bf44155a5 100644 --- a/servers_v6.json +++ b/servers_v6.json @@ -81,7 +81,7 @@ }, { "name": "TSR", - "address": ["us01.optik.host:26194", "uk01.optik.host:26164"] + "address": ["fi01.optik.host:28301", "uk01.optik.host:26164"] }, { "name": "Sakura", From a91ca72f518e6ff4c95fd863adfd308d7617be90 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 23 Apr 2022 11:43:25 -0400 Subject: [PATCH 3/3] Revert "Cullable LogicCanvas (#6699)" This reverts commit 815a396fbdfae35687df52516a658ad91360689d. --- core/src/mindustry/logic/LCanvas.java | 70 +++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/core/src/mindustry/logic/LCanvas.java b/core/src/mindustry/logic/LCanvas.java index 537983a443..2537296566 100644 --- a/core/src/mindustry/logic/LCanvas.java +++ b/core/src/mindustry/logic/LCanvas.java @@ -20,7 +20,7 @@ import mindustry.logic.LStatements.*; import mindustry.ui.*; public class LCanvas extends Table{ - public static final int maxJumpsDrawn = 1000; // TODO Does nothing + public static final int maxJumpsDrawn = 100; //ew static variables static LCanvas canvas; @@ -104,23 +104,14 @@ public class LCanvas extends Table{ clear(); statements = new DragLayout(); - jumps = new WidgetGroup(){ - @Override - public void layout(){ - cullable = false; //culling while scrolling results in weirdness - getChildren().each(h -> { - if(!(h instanceof JumpCurve c)) return; - c.setSize(width, c.getPrefHeight()); - c.setPosition(c.button.x + c.button.getWidth()/2f, c.py); - }); - cullable = true; - } - }; + jumps = new WidgetGroup(); pane = pane(t -> { t.center(); t.add(statements).pad(2f).center().width(targetWidth); - t.add(jumps).growY().width(100f).growY(); + t.addChild(jumps); + + jumps.cullable = false; }).grow().get(); pane.setFlickScroll(false); @@ -167,7 +158,6 @@ public class LCanvas extends Table{ } this.statements.layout(); - jumps.layout(); } StatementElem checkHovered(){ @@ -195,17 +185,21 @@ public class LCanvas extends Table{ pane.setScrollY(pane.getScrollY() + sign * Scl.scl(15f) * Time.delta); } } - - pane.scrolled(f -> jumps.layout()); //don't ask why this is needed, it just is } public class DragLayout extends WidgetGroup{ float space = Scl.scl(10f), prefWidth, prefHeight; Seq seq = new Seq<>(); int insertPosition = 0; + boolean invalidated; + + { + setTransform(true); + } @Override public void layout(){ + invalidated = true; float cy = 0; seq.clear(); @@ -253,9 +247,10 @@ public class LCanvas extends Table{ } } - if(parent instanceof Table){ + invalidateHierarchy(); + + if(parent != null && parent instanceof Table){ setCullingArea(parent.getCullingArea()); - jumps.setCullingArea(parent.getCullingArea()); } } @@ -282,7 +277,16 @@ public class LCanvas extends Table{ Tex.pane.draw(lastX, lastY - shiftAmount, width, dragging.getHeight()); } + if(invalidated){ + children.each(c -> c.cullable = false); + } + super.draw(); + + if(invalidated){ + children.each(c -> c.cullable = true); + invalidated = false; + } } void finishLayout(){ @@ -507,17 +511,11 @@ public class LCanvas extends Table{ public static class JumpCurve extends Element{ public JumpButton button; - float ph, py; public JumpCurve(JumpButton button){ this.button = button; } - @Override - public float getPrefHeight(){ - return ph; - } - @Override public void act(float delta){ super.act(delta); @@ -536,6 +534,7 @@ public class LCanvas extends Table{ } Element hover = button.to.get() == null && button.selecting ? canvas.hovered : button.to.get(); + boolean draw = false; Vec2 t = Tmp.v1, r = Tmp.v2; Group desc = canvas.pane; @@ -544,25 +543,26 @@ public class LCanvas extends Table{ if(hover != null){ hover.localToAscendantCoordinates(desc, t.set(hover.getWidth(), hover.getHeight()/2f)); + + draw = true; }else if(button.selecting){ t.set(r).add(button.mx, button.my); - }else{ - return; + draw = true; } - ph = Math.abs(t.y - r.y); - py = Math.min(t.y, r.y); - float offset = canvas.pane.getVisualScrollY() - canvas.pane.getMaxY(); + t.y += offset; r.y += offset; - drawCurve(r.x + button.getWidth()/2f, r.y + button.getHeight()/2f, t.x, t.y); + if(draw){ + drawCurve(r.x + button.getWidth()/2f, r.y + button.getHeight()/2f, t.x, t.y); - float s = button.getWidth(); - Draw.color(button.color); - Tex.logicNode.draw(t.x + s*0.75f, t.y - s/2f, -s, s); - Draw.reset(); + float s = button.getWidth(); + Draw.color(button.color); + Tex.logicNode.draw(t.x + s*0.75f, t.y - s/2f, -s, s); + Draw.reset(); + } } public void drawCurve(float x, float y, float x2, float y2){