Not all fixed yet, but OMG that bounds system! Wow!

This commit is contained in:
Ondřej Hruška
2014-04-13 20:38:34 +02:00
parent 91f54133b3
commit a5c32834c0
64 changed files with 4826 additions and 1732 deletions
@@ -6,7 +6,7 @@ import static mightypork.utils.math.constraints.ConstraintFactory.*;
import java.util.Random;
import mightypork.gamecore.control.timing.Updateable;
import mightypork.gamecore.gui.components.PluggableRenderer;
import mightypork.gamecore.gui.components.painters.AbstractPainter;
import mightypork.gamecore.render.Render;
import mightypork.utils.math.animation.AnimDouble;
import mightypork.utils.math.animation.Easing;
@@ -15,7 +15,7 @@ import mightypork.utils.math.constraints.NumBound;
import mightypork.utils.math.constraints.RectBound;
public class BouncyBox extends PluggableRenderer implements Updateable {
public class BouncyBox extends AbstractPainter implements Updateable {
private final Random rand = new Random();
@@ -23,7 +23,7 @@ public class ScreenTestFont extends Screen {
tp = new TextPainter(Res.getFont("default"), Align.CENTER, RGB.GREEN);
tp.setText("Hello World!");
final NumBound fontHeight = mul(getDisplay().getSize().yc(), 0.1);
final NumBound fontHeight = mul(getDisplay().getSize().yn(), 0.1);
final RectBound strbox = centerTo(box(fontHeight), this);