Differences From Artifact [f5e549c65e603be1]:
- File
src/gui.d
- 2012-07-14 14:22:32 - part of checkin [a0c3529225] on branch trunk - code cleanup (user: kinaba) [annotate]
To Artifact [e185ff3281d95738]:
- File
src/gui.d
- 2012-07-14 14:33:25 - part of checkin [aea6cfc7e3] on branch trunk - further clean up. (user: kinaba) [annotate]
27 27 };
28 28 t.start();
29 29 this.closing ~= (Form f,CancelEventArgs c){t.stop();};
30 30 }
31 31 Application.run(this);
32 32 }
33 33
34 - override void on_game_changed(char c, const(Game) g, bool finished)
34 + override void on_game_changed(char c, in Game g, bool finished)
35 35 {
36 36 draw(g);
37 37 }
38 38
39 39 private:
40 40 int cell;
41 41
................................................................................
77 77 this.render['L'] = "☒";
78 78 this.render['O'] = "☐";
79 79 this.paint ~= (Control c, PaintEventArgs ev) {
80 80 graphicContext.copyTo(ev.graphics, Rect(0,0,this.clientSize.width,this.clientSize.height));
81 81 };
82 82 }
83 83
84 - void draw(const(Game) g)
84 + void draw(in Game g)
85 85 {
86 86 int scrW = this.clientSize.width;
87 87 int scrH = this.clientSize.height;
88 88
89 89 // Fill bg.
90 90 graphicContext.fillRectangle(this.backColor, Rect(0,0,scrW,scrH));
91 91