summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/src/ch/asynk/gdx/boardgame/Paddable.java2
-rw-r--r--core/src/ch/asynk/gdx/boardgame/ui/Element.java20
2 files changed, 13 insertions, 9 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/Paddable.java b/core/src/ch/asynk/gdx/boardgame/Paddable.java
index 988d344..837ad92 100644
--- a/core/src/ch/asynk/gdx/boardgame/Paddable.java
+++ b/core/src/ch/asynk/gdx/boardgame/Paddable.java
@@ -6,6 +6,8 @@ public interface Paddable
public float getInnerY();
public float getInnerWidth();
public float getInnerHeight();
+ public float getInnerTop();
+ public float getInnerRight();
public void setPadding(float padding);
public void setPosition(float x, float y, float w, float h);
}
diff --git a/core/src/ch/asynk/gdx/boardgame/ui/Element.java b/core/src/ch/asynk/gdx/boardgame/ui/Element.java
index 6c10841..3368f3c 100644
--- a/core/src/ch/asynk/gdx/boardgame/ui/Element.java
+++ b/core/src/ch/asynk/gdx/boardgame/ui/Element.java
@@ -38,15 +38,17 @@ public abstract class Element implements Drawable, Paddable, Positionable, Touch
this.taintParent = taintParent;
}
- @Override public final float getX() { return rect.x; }
- @Override public final float getY() { return rect.y; }
- @Override public final float getWidth() { return rect.width; }
- @Override public final float getHeight() { return rect.height; }
-
- @Override public final float getInnerX() { return rect.x + padding; }
- @Override public final float getInnerY() { return rect.y + padding; }
- @Override public final float getInnerWidth() { return rect.width - 2 * padding; }
- @Override public final float getInnerHeight() { return rect.height - 2 * padding; }
+ @Override public final float getX() { return rect.x; }
+ @Override public final float getY() { return rect.y; }
+ @Override public final float getWidth() { return rect.width; }
+ @Override public final float getHeight() { return rect.height; }
+
+ @Override public final float getInnerX() { return rect.x + padding; }
+ @Override public final float getInnerY() { return rect.y + padding; }
+ @Override public final float getInnerWidth() { return rect.width - 2 * padding; }
+ @Override public final float getInnerHeight() { return rect.height - 2 * padding; }
+ @Override public final float getInnerTop() { return rect.y + rect.height - padding; }
+ @Override public final float getInnerRight() { return rect.x + rect.width - padding; }
@Override public String toString()
{