Refactoring and polishing of the constraint system
Now it will be clear what is VALUE, VIEW and MUTABLE.
This commit is contained in:
@@ -13,7 +13,7 @@ import mightypork.gamecore.render.fonts.GLFont;
|
||||
import mightypork.rogue.Res;
|
||||
import mightypork.utils.math.color.RGB;
|
||||
import mightypork.utils.math.constraints.RectConstraint;
|
||||
import mightypork.utils.math.coord.Vec;
|
||||
import mightypork.utils.math.vect.Vect;
|
||||
import mightypork.utils.string.StringProvider;
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ public class LayerFps extends ScreenLayer {
|
||||
|
||||
tp.setContext(constraint);
|
||||
|
||||
tp.setShadow(RGB.BLACK, Vec.ONE);
|
||||
tp.setShadow(RGB.BLACK, Vect.ONE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import mightypork.gamecore.render.fonts.FontRenderer.Align;
|
||||
import mightypork.rogue.Res;
|
||||
import mightypork.utils.math.color.RGB;
|
||||
import mightypork.utils.math.constraints.RectConstraint;
|
||||
import mightypork.utils.math.coord.VecView;
|
||||
import mightypork.utils.math.vect.VectVal;
|
||||
|
||||
|
||||
public class LayerBouncyBoxes extends ScreenLayer {
|
||||
@@ -59,7 +59,7 @@ public class LayerBouncyBoxes extends ScreenLayer {
|
||||
|
||||
final TextPainter tp = new TextPainter(Res.getFont("default"), Align.LEFT, RGB.WHITE);
|
||||
tp.setText("Press \"C\" for \"Cat\" screen.");
|
||||
tp.setShadow(RGB.RED, VecView.make(2, 2));
|
||||
tp.setShadow(RGB.RED, VectVal.make(2, 2));
|
||||
|
||||
layout.add(tp);
|
||||
}
|
||||
|
||||
@@ -19,16 +19,16 @@ import mightypork.rogue.Res;
|
||||
import mightypork.utils.math.animation.AnimDouble;
|
||||
import mightypork.utils.math.animation.Easing;
|
||||
import mightypork.utils.math.color.RGB;
|
||||
import mightypork.utils.math.coord.Vec;
|
||||
import mightypork.utils.math.coord.VecMutable;
|
||||
import mightypork.utils.math.coord.VecMutableAnim;
|
||||
import mightypork.utils.math.coord.VecView;
|
||||
import mightypork.utils.math.vect.Vect;
|
||||
import mightypork.utils.math.vect.VectMutable;
|
||||
import mightypork.utils.math.vect.VectMutableAnim;
|
||||
import mightypork.utils.math.vect.VectVal;
|
||||
|
||||
|
||||
public class LayerFlyingCat extends ScreenLayer implements Updateable, MouseButtonEvent.Listener {
|
||||
|
||||
private final AnimDouble size = new AnimDouble(400, Easing.SINE_BOTH);
|
||||
private final VecMutableAnim pos = VecMutable.makeAnim(Easing.ELASTIC_OUT);
|
||||
private final VectMutableAnim pos = VectMutable.makeAnim(Easing.ELASTIC_OUT);
|
||||
|
||||
private final Random rand = new Random();
|
||||
|
||||
@@ -51,7 +51,7 @@ public class LayerFlyingCat extends ScreenLayer implements Updateable, MouseButt
|
||||
tp.setAlign(Align.CENTER);
|
||||
tp.setColor(RGB.YELLOW);
|
||||
tp.setText("Meow!");
|
||||
tp.setShadow(RGB.dark(0.8), VecView.make(2, 2));
|
||||
tp.setShadow(RGB.dark(0.8), VectVal.make(2, 2));
|
||||
|
||||
tp.setContext(cCenterTo(cBox(64, 64), cMousePos));
|
||||
|
||||
@@ -85,7 +85,7 @@ public class LayerFlyingCat extends ScreenLayer implements Updateable, MouseButt
|
||||
{
|
||||
if (!event.isDown()) return;
|
||||
|
||||
final Vec pos = event.getPos();
|
||||
final Vect pos = event.getPos();
|
||||
|
||||
this.pos.setTo(pos);
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import mightypork.gamecore.gui.screens.ScreenLayer;
|
||||
import mightypork.gamecore.render.Render;
|
||||
import mightypork.utils.math.color.RGB;
|
||||
import mightypork.utils.math.constraints.RectConstraint;
|
||||
import mightypork.utils.math.coord.Vec;
|
||||
import mightypork.utils.math.vect.Vect;
|
||||
|
||||
|
||||
public class LayerTestGradient extends ScreenLayer {
|
||||
@@ -44,7 +44,7 @@ public class LayerTestGradient extends ScreenLayer {
|
||||
|
||||
|
||||
@Override
|
||||
protected void onSizeChanged(Vec size)
|
||||
protected void onSizeChanged(Vect size)
|
||||
{
|
||||
p.poll();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user