Differences From Artifact [8775e42f1f972b84]:
- File
test.d
- 2012-07-13 15:36:14 - part of checkin [4027d34fe8] on branch trunk - Changed map letters, with my best respect to the greatest novel "Tobira-no-Soto". (user: kinaba) [annotate]
To Artifact [f86b02b80bcf28bb]:
- File
test.d
- 2012-07-13 15:42:52 - part of checkin [29ace8e5eb] on branch trunk - Fix wrong gui sizing formula. (user: kinaba) [annotate]
151 151 this.score = 0;
152 152 }
153 153 override void onResize(EventArgs ev) {
154 154 invalidate();
155 155 }
156 156 override void onPaint(PaintEventArgs ev)
157 157 {
158 - int Z = min(this.clientSize.width, this.clientSize.height) / max(m.W-2, m.H-2);
158 + int Z = min(this.clientSize.width/(m.W-2), this.clientSize.height/(m.H-2));
159 159 Font font = new Font("MS Gothic", Z-4);
160 160 Graphics g = ev.graphics;
161 161 for(int y=1; y+1<m.H; ++y)
162 162 for(int x=1; x+1<m.W; ++x) {
163 163 if(m.data[y][x]=='*') {
164 164 g.drawText("岩", font, Color(0,0,0), Rect((x-1)*Z, (y-1)*Z, Z, Z));
165 165 }