|
5 | 5 | import java.awt.Color; |
6 | 6 | import java.awt.Dimension; |
7 | 7 | import java.awt.Graphics; |
| 8 | +import java.awt.im.InputContext; |
8 | 9 | import java.awt.image.BufferStrategy; |
9 | 10 | import java.awt.image.BufferedImage; |
10 | 11 | import java.awt.image.DataBufferInt; |
@@ -56,7 +57,8 @@ public class Game extends Canvas implements Runnable { |
56 | 57 | private static int steps; |
57 | 58 | private static boolean devMode; |
58 | 59 | private static boolean closingMode; |
59 | | - |
| 60 | + private static boolean isAzertyCountry; |
| 61 | + |
60 | 62 | private static JFrame frame; |
61 | 63 |
|
62 | 64 | private static boolean running = false; |
@@ -88,12 +90,14 @@ public class Game extends Canvas implements Runnable { |
88 | 90 | private static GameClient socketClient; |
89 | 91 | private GameServer socketServer; |
90 | 92 | private Printing print = new Printing(); |
91 | | - |
| 93 | + private static InputContext context; |
| 94 | + |
92 | 95 | /** |
93 | 96 | * @author Redomar |
94 | 97 | * @version Alpha 1.8 |
95 | 98 | */ |
96 | 99 | public Game() { |
| 100 | + context = InputContext.getInstance(); |
97 | 101 | setMinimumSize(new Dimension(WIDTH * SCALE, HEIGHT * SCALE)); |
98 | 102 | setMaximumSize(new Dimension(WIDTH * SCALE, HEIGHT * SCALE)); |
99 | 103 | setPreferredSize(new Dimension(WIDTH * SCALE, HEIGHT * SCALE)); |
@@ -328,7 +332,15 @@ public void render() { |
328 | 332 | + WordUtils.capitalizeFully(player |
329 | 333 | .getSantizedUsername()), 3, getHeight() - 17); |
330 | 334 | g.setColor(Color.ORANGE); |
331 | | - g.drawString("Press Q to quit", (getWidth()/2)-("Press Q to quit".length()*3), getHeight() -17); |
| 335 | + |
| 336 | + if(context.getLocale().getCountry().equals("BE") || context.getLocale().getCountry().equals("FR")) |
| 337 | + { |
| 338 | + g.drawString("Press A to quit", (getWidth()/2)-("Press A to quit".length()*3), getHeight() -17); |
| 339 | + } |
| 340 | + else |
| 341 | + { |
| 342 | + g.drawString("Press Q to quit", (getWidth()/2)-("Press Q to quit".length()*3), getHeight() -17); |
| 343 | + } |
332 | 344 | g.setColor(Color.YELLOW); |
333 | 345 | g.drawString(time.getTime(), (getWidth() - 58), (getHeight() - 3)); |
334 | 346 | g.setColor(Color.WHITE); |
|
0 commit comments