comparison game/Engine.java @ 81:8932b1300ba1

Adjust about box size, add instructions.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 03 Mar 2011 04:57:04 +0200
parents 3d34258ccc2c
children b8bc5d08b512
comparison
equal deleted inserted replaced
80:3d34258ccc2c 81:8932b1300ba1
40 } 40 }
41 41
42 aboutSecret = false; 42 aboutSecret = false;
43 43
44 setPos(150f, 150f); 44 setPos(150f, 150f);
45 setSize(600f, 400f); 45 setSize(675f, 420f);
46 } 46 }
47 47
48 public void setTextFont(Font font, FontMetrics metrics) 48 public void setTextFont(Font font, FontMetrics metrics)
49 { 49 {
50 textFont = font; 50 textFont = font;
141 setTextPaint(Color.yellow); 141 setTextPaint(Color.yellow);
142 drawString(g, "(c) Copyright 2011 Matti 'ccr' Hämäläinen\n"); 142 drawString(g, "(c) Copyright 2011 Matti 'ccr' Hämäläinen\n");
143 143
144 setTextPaint(Color.white); 144 setTextPaint(Color.white);
145 drawString(g, "Programming project for Java-course\n" + 145 drawString(g, "Programming project for Java-course\n" +
146 "T740306 taught by Kari Laitinen."); 146 "T740306 taught by Kari Laitinen." +
147 "\n \n");
148
149 setTextPaint(Color.red);
150 drawString(g, "Controls:\n");
151
152 IDMPoint old = currOffs.copy();
153
154 setTextPaint(Color.white);
155 drawString(g,
156 "Arrow keys / mouse wheel\n"+
157 "Enter / mouse click\n"+
158 "Space bar\n");
159
160 currPos.x += 330;
161 currOffs.y = old.y;
162 drawString(g,
163 "- Rotate piece\n" +
164 "- Place/lock piece\n" +
165 "- Swap piece\n");
166
167 currPos.x -= 330;
168 setTextPaint(Color.green);
169 drawString(g,
170 "\nObjective: Create a path long as possible by rotating\n"+
171 "and placing pieces. More points will be awarded for\n"+
172 "advancing the path by several segments per turn."
173 );
147 } 174 }
148 } 175 }
149 176
150 public boolean keyPressed(KeyEvent e) 177 public boolean keyPressed(KeyEvent e)
151 { 178 {