LCanvas cleanup
This commit is contained in:
@@ -4565,7 +4565,7 @@ public class Blocks{
|
|||||||
}},
|
}},
|
||||||
|
|
||||||
Items.surgeAlloy, new BasicBulletType(){{
|
Items.surgeAlloy, new BasicBulletType(){{
|
||||||
reloadMultiplier = 0.5f;
|
reloadMultiplier = 0.75f;
|
||||||
damage = 65;
|
damage = 65;
|
||||||
rangeChange = 8f * 3f;
|
rangeChange = 8f * 3f;
|
||||||
lightning = 3;
|
lightning = 3;
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ public class LCanvas extends Table{
|
|||||||
|
|
||||||
public DragLayout statements;
|
public DragLayout statements;
|
||||||
public ScrollPane pane;
|
public ScrollPane pane;
|
||||||
public Group jumps; // compatibility
|
|
||||||
|
|
||||||
StatementElem dragging;
|
StatementElem dragging;
|
||||||
StatementElem hovered;
|
StatementElem hovered;
|
||||||
@@ -110,15 +109,14 @@ public class LCanvas extends Table{
|
|||||||
clear();
|
clear();
|
||||||
|
|
||||||
statements = new DragLayout();
|
statements = new DragLayout();
|
||||||
jumps = statements.jumps;
|
|
||||||
|
|
||||||
pane = pane(t -> {
|
pane = pane(t -> {
|
||||||
t.center();
|
t.center();
|
||||||
t.add(statements).pad(2f).center().width(targetWidth);
|
t.add(statements).pad(2f).center().width(targetWidth);
|
||||||
t.addChild(statements.jumps);
|
t.addChild(statements.jumps);
|
||||||
|
|
||||||
jumps.touchable = Touchable.disabled;
|
statements.jumps.touchable = Touchable.disabled;
|
||||||
jumps.update(()->jumps.setCullingArea(t.getCullingArea()));
|
statements.jumps.update(() -> statements.jumps.setCullingArea(t.getCullingArea()));
|
||||||
statements.jumps.cullable = false;
|
statements.jumps.cullable = false;
|
||||||
}).grow().get();
|
}).grow().get();
|
||||||
pane.setFlickScroll(false);
|
pane.setFlickScroll(false);
|
||||||
@@ -604,7 +602,7 @@ public class LCanvas extends Table{
|
|||||||
if(stage == null){
|
if(stage == null){
|
||||||
curve.remove();
|
curve.remove();
|
||||||
}else{
|
}else{
|
||||||
canvas.jumps.addChild(curve);
|
canvas.statements.jumps.addChild(curve);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -641,7 +639,7 @@ public class LCanvas extends Table{
|
|||||||
|
|
||||||
//MDTX(WayZer, 2024/8/6) Support Cull
|
//MDTX(WayZer, 2024/8/6) Support Cull
|
||||||
invertedHeight = false;
|
invertedHeight = false;
|
||||||
Group desc = canvas.jumps.parent;
|
Group desc = canvas.statements.jumps.parent;
|
||||||
Vec2 t = Tmp.v1.set(button.getWidth() / 2f, button.getHeight() / 2f);
|
Vec2 t = Tmp.v1.set(button.getWidth() / 2f, button.getHeight() / 2f);
|
||||||
button.localToAscendantCoordinates(desc, t);
|
button.localToAscendantCoordinates(desc, t);
|
||||||
setPosition(t.x, t.y);
|
setPosition(t.x, t.y);
|
||||||
|
|||||||
Reference in New Issue
Block a user