File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -9,5 +9,10 @@ namespace chesspp
9
9
display.draw (sf::Sprite (TextureManager::getInstance ().Load (" ../res/img/chessboard_640x640.png" )));
10
10
}
11
11
12
-
12
+ void AppStateGame::OnLButtonPressed (int x, int y)
13
+ {
14
+ #ifdef _DEBUG
15
+ cout << " Left clicked at (" << x << " , " << y << " )\n " ;
16
+ #endif // _DEBUG
17
+ }
13
18
}
Original file line number Diff line number Diff line change 10
10
11
11
namespace chesspp
12
12
{
13
+ class Application ;
13
14
class AppStateGame : public AppState
14
15
{
15
- Application* app;
16
+ Application* app;
16
17
17
18
public:
18
- AppStateGame (Application*);
19
+ AppStateGame (Application* _app) : app(_app) {}
19
20
virtual ~AppStateGame () {}
20
21
21
22
virtual int id ();
22
23
virtual void OnRender (sf::RenderWindow &display);
24
+
25
+ virtual void OnLButtonPressed (int x, int y); // example implementation
23
26
};
24
27
}
25
28
You can’t perform that action at this time.
0 commit comments