diff options
author | Starla Insigna <hatkirby@fourisland.com> | 2009-02-16 11:37:48 -0500 |
---|---|---|
committer | Starla Insigna <hatkirby@fourisland.com> | 2009-02-16 11:37:48 -0500 |
commit | 8b77b7ac364b579053476f9d6541ddc24904e0c1 (patch) | |
tree | 0f68648d4d5715070c9b14459b70a730a02c76db /src/com/fourisland/fourpuzzle/window/MessageWindow.java | |
parent | 8828c24afa7c11e1c24299f0a445231260cfa508 (diff) | |
download | fourpuzzle-8b77b7ac364b579053476f9d6541ddc24904e0c1.tar.gz fourpuzzle-8b77b7ac364b579053476f9d6541ddc24904e0c1.tar.bz2 fourpuzzle-8b77b7ac364b579053476f9d6541ddc24904e0c1.zip |
Engine: Tuned Full Screen Mode
Now, in full screen mode, the image is no longer stretched strangely, it's simply zoomed to the highest possible value. Plus, when returning to non-full-screen mode, decoration is returned so the X button is available. Refs #14
Diffstat (limited to 'src/com/fourisland/fourpuzzle/window/MessageWindow.java')
-rw-r--r-- | src/com/fourisland/fourpuzzle/window/MessageWindow.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/fourisland/fourpuzzle/window/MessageWindow.java b/src/com/fourisland/fourpuzzle/window/MessageWindow.java index 9ddd379..172ba0d 100644 --- a/src/com/fourisland/fourpuzzle/window/MessageWindow.java +++ b/src/com/fourisland/fourpuzzle/window/MessageWindow.java | |||
@@ -161,7 +161,6 @@ public class MessageWindow implements Renderable { | |||
161 | 161 | ||
162 | g2.drawImage(cacheBase, 0, y, null); | 162 | g2.drawImage(cacheBase, 0, y, null); |
163 | 163 | ||
164 | int fw = g2.getFontMetrics().stringWidth(message); | ||
165 | int fh = g2.getFontMetrics().getHeight(); | 164 | int fh = g2.getFontMetrics().getHeight(); |
166 | int tx = Window.Default.getLeftX(); | 165 | int tx = Window.Default.getLeftX(); |
167 | int ty = Window.Default.getTopY()+fh-(SPACER/2)+y; | 166 | int ty = Window.Default.getTopY()+fh-(SPACER/2)+y; |
@@ -178,6 +177,7 @@ public class MessageWindow implements Renderable { | |||
178 | for (int i=0;i<msgs;i++) | 177 | for (int i=0;i<msgs;i++) |
179 | { | 178 | { |
180 | String message = messages.get(i); | 179 | String message = messages.get(i); |
180 | int fw = g2.getFontMetrics().stringWidth(message); | ||
181 | 181 | ||
182 | g2.setPaint(new TexturePaint(SystemGraphic.getTextColor(), new Rectangle(tx, ty, fw, fh))); | 182 | g2.setPaint(new TexturePaint(SystemGraphic.getTextColor(), new Rectangle(tx, ty, fw, fh))); |
183 | g2.drawString(message.substring(0, Math.min(toPrint, message.length())), tx, ty); | 183 | g2.drawString(message.substring(0, Math.min(toPrint, message.length())), tx, ty); |