summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/gdx/boardgame/ui/Assembly.java4
-rw-r--r--core/src/ch/asynk/gdx/boardgame/ui/Button.java6
-rw-r--r--core/src/ch/asynk/gdx/boardgame/ui/Element.java4
-rw-r--r--core/src/ch/asynk/gdx/boardgame/ui/Menu.java10
4 files changed, 17 insertions, 7 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/ui/Assembly.java b/core/src/ch/asynk/gdx/boardgame/ui/Assembly.java
index 8925032..6754518 100644
--- a/core/src/ch/asynk/gdx/boardgame/ui/Assembly.java
+++ b/core/src/ch/asynk/gdx/boardgame/ui/Assembly.java
@@ -56,8 +56,8 @@ public abstract class Assembly extends Element
children.forEach( c -> c.draw(batch) );
}
- @Override public void drawDebug(ShapeRenderer debugShapes)
+ @Override public void drawDebug(ShapeRenderer shapeRenderer)
{
- children.forEach( c -> c.drawDebug(debugShapes) );
+ children.forEach( c -> c.drawDebug(shapeRenderer) );
}
}
diff --git a/core/src/ch/asynk/gdx/boardgame/ui/Button.java b/core/src/ch/asynk/gdx/boardgame/ui/Button.java
index e33ee07..c19eab1 100644
--- a/core/src/ch/asynk/gdx/boardgame/ui/Button.java
+++ b/core/src/ch/asynk/gdx/boardgame/ui/Button.java
@@ -58,9 +58,9 @@ public class Button extends Patch
label.draw(batch);
}
- @Override public void drawDebug(ShapeRenderer debugShapes)
+ @Override public void drawDebug(ShapeRenderer shapeRenderer)
{
- super.drawDebug(debugShapes);
- label.drawDebug(debugShapes);
+ super.drawDebug(shapeRenderer);
+ label.drawDebug(shapeRenderer);
}
}
diff --git a/core/src/ch/asynk/gdx/boardgame/ui/Element.java b/core/src/ch/asynk/gdx/boardgame/ui/Element.java
index e24498b..2fe9f89 100644
--- a/core/src/ch/asynk/gdx/boardgame/ui/Element.java
+++ b/core/src/ch/asynk/gdx/boardgame/ui/Element.java
@@ -48,9 +48,9 @@ public abstract class Element implements Drawable, Paddable, Positionable, Touch
@Override public final float getInnerWidth() { return rect.width - 2 * padding; }
@Override public final float getInnerHeight() { return rect.height - 2 * padding; }
- @Override public void drawDebug(ShapeRenderer debugShapes)
+ @Override public void drawDebug(ShapeRenderer shapeRenderer)
{
- debugShapes.rect(getX(), getY(), getWidth(), getHeight());
+ shapeRenderer.rect(getX(), getY(), getWidth(), getHeight());
}
@Override public boolean touch(float x, float y)
diff --git a/core/src/ch/asynk/gdx/boardgame/ui/Menu.java b/core/src/ch/asynk/gdx/boardgame/ui/Menu.java
index 243b000..93309ab 100644
--- a/core/src/ch/asynk/gdx/boardgame/ui/Menu.java
+++ b/core/src/ch/asynk/gdx/boardgame/ui/Menu.java
@@ -3,6 +3,7 @@ package ch.asynk.gdx.boardgame.ui;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.NinePatch;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
+import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
public class Menu extends Patch
{
@@ -121,4 +122,13 @@ public class Menu extends Patch
label.draw(batch);
}
}
+
+ @Override public void drawDebug(ShapeRenderer shapeRenderer)
+ {
+ super.drawDebug(shapeRenderer);
+ title.drawDebug(shapeRenderer);
+ for (Label label : entries) {
+ label.drawDebug(shapeRenderer);
+ }
+ }
}