Package moves, new fn in Rect, new bound adapters
This commit is contained in:
@@ -12,7 +12,7 @@ import mightypork.gamecore.render.fonts.GLFont;
|
||||
import mightypork.rogue.Res;
|
||||
import mightypork.utils.math.color.RGB;
|
||||
import mightypork.utils.math.constraints.RectBound;
|
||||
import mightypork.utils.math.vect.Vect;
|
||||
import mightypork.utils.math.constraints.vect.Vect;
|
||||
import mightypork.utils.string.StringProvider;
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ public class LayerFps extends ScreenLayer {
|
||||
}
|
||||
});
|
||||
|
||||
tp.setContext(constraint);
|
||||
tp.setRect(constraint);
|
||||
|
||||
tp.setShadow(RGB.BLACK, Vect.ONE);
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ import mightypork.gamecore.render.Render;
|
||||
import mightypork.utils.math.animation.AnimDouble;
|
||||
import mightypork.utils.math.animation.Easing;
|
||||
import mightypork.utils.math.color.RGB;
|
||||
import mightypork.utils.math.constraints.NumBound;
|
||||
import mightypork.utils.math.constraints.RectBound;
|
||||
import mightypork.utils.math.constraints.num.NumBound;
|
||||
|
||||
|
||||
public class BouncyBox extends AbstractPainter implements Updateable {
|
||||
|
||||
@@ -14,7 +14,7 @@ import mightypork.gamecore.render.fonts.FontRenderer.Align;
|
||||
import mightypork.rogue.Res;
|
||||
import mightypork.utils.math.color.RGB;
|
||||
import mightypork.utils.math.constraints.RectBound;
|
||||
import mightypork.utils.math.vect.VectConst;
|
||||
import mightypork.utils.math.constraints.vect.VectConst;
|
||||
|
||||
|
||||
public class LayerBouncyBoxes extends ScreenLayer {
|
||||
|
||||
@@ -17,10 +17,10 @@ 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.num.Num;
|
||||
import mightypork.utils.math.rect.Rect;
|
||||
import mightypork.utils.math.vect.Vect;
|
||||
import mightypork.utils.math.vect.VectAnimated;
|
||||
import mightypork.utils.math.constraints.num.Num;
|
||||
import mightypork.utils.math.constraints.rect.Rect;
|
||||
import mightypork.utils.math.constraints.vect.Vect;
|
||||
import mightypork.utils.math.constraints.vect.VectAnimated;
|
||||
|
||||
|
||||
public class LayerFlyingCat extends ScreenLayer implements Updateable, MouseButtonEvent.Listener {
|
||||
@@ -43,7 +43,7 @@ public class LayerFlyingCat extends ScreenLayer implements Updateable, MouseButt
|
||||
|
||||
cat = new ImagePainter(Res.getTxQuad("test.kitten"));
|
||||
|
||||
cat.setContext(Rect.make(size, size).centerTo(pos));
|
||||
cat.setRect(Rect.make(size, size).centerTo(pos));
|
||||
|
||||
tp = new TextPainter(Res.getFont("default"));
|
||||
tp.setAlign(Align.CENTER);
|
||||
@@ -51,11 +51,11 @@ public class LayerFlyingCat extends ScreenLayer implements Updateable, MouseButt
|
||||
tp.setText("Meow!");
|
||||
tp.setShadow(RGB.dark(0.8), Vect.make(2, 2));
|
||||
|
||||
tp.setContext(Rect.make(64, 64).centerTo(mouse()));
|
||||
tp.setRect(Rect.make(64, 64).centerTo(mouse()));
|
||||
|
||||
qp = QuadPainter.gradV(RGB.YELLOW, RGB.RED);
|
||||
|
||||
qp.setContext(cat.getRect().bottomLeft().expand(size.half(), Num.ZERO, Num.ZERO, size.half()));
|
||||
qp.setRect(cat.getRect().bottomLeft().expand(size.half(), Num.ZERO, Num.ZERO, size.half()));
|
||||
|
||||
/*
|
||||
* Register keys
|
||||
|
||||
@@ -7,8 +7,8 @@ import mightypork.gamecore.gui.screens.Screen;
|
||||
import mightypork.gamecore.render.fonts.FontRenderer.Align;
|
||||
import mightypork.rogue.Res;
|
||||
import mightypork.utils.math.color.RGB;
|
||||
import mightypork.utils.math.num.Num;
|
||||
import mightypork.utils.math.rect.Rect;
|
||||
import mightypork.utils.math.constraints.num.Num;
|
||||
import mightypork.utils.math.constraints.rect.Rect;
|
||||
|
||||
|
||||
public class ScreenTestFont extends Screen {
|
||||
@@ -25,7 +25,7 @@ public class ScreenTestFont extends Screen {
|
||||
final Num h = bounds().height().mul(0.1);
|
||||
final Rect strbox = Rect.make(Num.ZERO, h).centerTo(bounds());
|
||||
|
||||
tp.setContext(strbox);
|
||||
tp.setRect(strbox);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user