diff options
| author | XaviDCR92 <xavi.dcr@gmail.com> | 2018-07-09 22:22:26 +0200 |
|---|---|---|
| committer | XaviDCR92 <xavi.dcr@gmail.com> | 2018-07-09 22:22:26 +0200 |
| commit | cd78b97bceaf6ecbbab6f89631c15ed712878d4d (patch) | |
| tree | c08c69a651ce91c834aef7b588e1074106315df6 /HumanPlayer.h | |
| parent | f0b654b9bf3bc2a93c1f89d4cc3edcf77b948555 (diff) | |
| download | pocketempires-cd78b97bceaf6ecbbab6f89631c15ed712878d4d.tar.gz | |
Calls to HumanPlayer and Camera button pressed event handlers are now automatically handled by two const arrays of member functions pointers.
Diffstat (limited to 'HumanPlayer.h')
| -rw-r--r-- | HumanPlayer.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/HumanPlayer.h b/HumanPlayer.h index 0ed983a..17986ba 100644 --- a/HumanPlayer.h +++ b/HumanPlayer.h @@ -23,12 +23,18 @@ class HumanPlayer : public Player { public: - HumanPlayer(const char* const strPlayerName); - void onLeftBtnPressed(void); + explicit HumanPlayer(const char* const strPlayerName); void drawHandler(void); private: Camera _cam; + void buttonHandler(void); + + /* Event handlers. */ + void onLeftBtnPressed(void); + void onRightBtnPressed(void); + void onABtnPressed(void); + void onBBtnPressed(void); }; #endif /* HUMAN_PLAYER_H__ */ |
