summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/subconscious/graphics/Scene.java2
-rw-r--r--src/subconscious/graphics/widget/TurnInfo.java32
2 files changed, 33 insertions, 1 deletions
diff --git a/src/subconscious/graphics/Scene.java b/src/subconscious/graphics/Scene.java
index 3747318..db035b3 100644
--- a/src/subconscious/graphics/Scene.java
+++ b/src/subconscious/graphics/Scene.java
@@ -344,7 +344,7 @@ public abstract class Scene extends Panel
this.widgetAnchors.get(Widget.Anchor.E ).move(newSize.width, newSize.width / 2);
this.widgetAnchors.get(Widget.Anchor.NE).move(newSize.width, 0);
this.widgetAnchors.get(Widget.Anchor.N ).move(newSize.width / 2, 0);
- this.widgetAnchors.get(Widget.Anchor.NO).move(0, 0);
+ // this.widgetAnchors.get(Widget.Anchor.NO).move(0, 0);
this.widgetAnchors.get(Widget.Anchor.O ).move(0, newSize.height / 2);
}
diff --git a/src/subconscious/graphics/widget/TurnInfo.java b/src/subconscious/graphics/widget/TurnInfo.java
new file mode 100644
index 0000000..f3472ee
--- /dev/null
+++ b/src/subconscious/graphics/widget/TurnInfo.java
@@ -0,0 +1,32 @@
+package subconscious.graphics.widget;
+
+import subconscious.Game;
+
+import java.awt.Graphics2D;
+
+
+public class TurnInfo extends Widget {
+
+ public static final int WIDTH = 250;
+ public static final int HEIGHT = 100;
+
+ protected volatile Game game;
+
+ public TurnInfo(String uniqueName, Game game) {
+ super(uniqueName, WIDTH, -HEIGHT, WIDTH, HEIGHT);
+ this.game = game;
+ this.anchor = Widget.Anchor.SO;
+ }
+
+ public void render(Graphics2D g) {
+ // background
+ g.setColor(Palette.WHITE_T);
+ g.fillRect(0, 0, TerrainInfo.WIDTH, TerrainInfo.HEIGHT);
+
+ g.setColor(Palette.BLACK);
+
+ g.setFont(Fonts.TITLE);
+ final int titleY = BORDER + g.getFontMetrics().getHeight();
+ g.drawString("Turn", BORDER, titleY);
+ }
+} \ No newline at end of file