summary refs log tree commit diff stats
path: root/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/com')
-rwxr-xr-xsrc/com/fourisland/fourpuzzle/window/SystemGraphic.java4
-rw-r--r--src/com/fourisland/fourpuzzle/window/Window.java9
2 files changed, 9 insertions, 4 deletions
diff --git a/src/com/fourisland/fourpuzzle/window/SystemGraphic.java b/src/com/fourisland/fourpuzzle/window/SystemGraphic.java index bc13d0f..a17a83f 100755 --- a/src/com/fourisland/fourpuzzle/window/SystemGraphic.java +++ b/src/com/fourisland/fourpuzzle/window/SystemGraphic.java
@@ -44,14 +44,14 @@ public class SystemGraphic {
44 return systemGraphic.getSubimage(0, 0, 32, 32); 44 return systemGraphic.getSubimage(0, 0, 32, 32);
45 } 45 }
46 46
47 public static BufferedImage getSelectionBackground() 47 public static BufferedImage getSelectionBackground(boolean isFlashing)
48 { 48 {
49 if (systemGraphic == null) 49 if (systemGraphic == null)
50 { 50 {
51 initalize(); 51 initalize();
52 } 52 }
53 53
54 return systemGraphic.getSubimage(Window.Selector.getX(SystemArea.TOP_LEFT)+15, 15, 1, 1); 54 return systemGraphic.getSubimage((isFlashing ? 96 : 64) + 15, 15, 1, 1);
55 } 55 }
56 56
57 public static BufferedImage getChoiceArea(Rectangle sca) 57 public static BufferedImage getChoiceArea(Rectangle sca)
diff --git a/src/com/fourisland/fourpuzzle/window/Window.java b/src/com/fourisland/fourpuzzle/window/Window.java index da3216a..f970b68 100644 --- a/src/com/fourisland/fourpuzzle/window/Window.java +++ b/src/com/fourisland/fourpuzzle/window/Window.java
@@ -46,7 +46,12 @@ public enum Window
46 46
47 protected BufferedImage getBackground() 47 protected BufferedImage getBackground()
48 { 48 {
49 return SystemGraphic.getSelectionBackground(); 49 if (in.isElapsed())
50 {
51 isFlashing = !isFlashing;
52 }
53
54 return SystemGraphic.getSelectionBackground(isFlashing);
50 } 55 }
51 }; 56 };
52 57
@@ -132,7 +137,7 @@ public enum Window
132 BufferedImage temp = new BufferedImage(getFullWidth(width), getFullHeight(height), BufferedImage.TYPE_INT_ARGB); 137 BufferedImage temp = new BufferedImage(getFullWidth(width), getFullHeight(height), BufferedImage.TYPE_INT_ARGB);
133 Graphics2D g = temp.createGraphics(); 138 Graphics2D g = temp.createGraphics();
134 139
135 g.drawImage(getBackground(), 1, 1, getFullWidth(width)-2, getFullHeight(height)-2, null); 140 g.drawImage(getBackground(), 3, 3, getFullWidth(width)-6, getFullHeight(height)-6, null);
136 141
137 g.drawImage(SystemGraphic.getChoiceArea(getBounds(SystemArea.TOP_LEFT)), 0, 0, null); 142 g.drawImage(SystemGraphic.getChoiceArea(getBounds(SystemArea.TOP_LEFT)), 0, 0, null);
138 g.drawImage(SystemGraphic.getChoiceArea(getBounds(SystemArea.TOP)), getWidth(SystemArea.TOP_LEFT), 0, width, getHeight(SystemArea.TOP), null); 143 g.drawImage(SystemGraphic.getChoiceArea(getBounds(SystemArea.TOP)), getWidth(SystemArea.TOP_LEFT), 0, width, getHeight(SystemArea.TOP), null);