Check-in [29ace8e5eb]
Not logged in
Overview
SHA1 Hash:29ace8e5eb9d885574a41bb13ad867507a157238
Date: 2012-07-14 00:42:52
User: kinaba
Comment:Fix wrong gui sizing formula.
Timelines: family | ancestors | descendants | both | trunk
Diffs: redesign
Downloads: Tarball | ZIP archive
Other Links: files | file ages | manifest
Tags And Properties
Changes

Modified test.d from [8775e42f1f972b84] to [f86b02b80bcf28bb].

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 }