diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-04-04 17:52:34 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-04-04 17:52:34 (GMT) |
| commit | 89cdeef9ad9c164e9f484cded3096bcbc72b7207 (patch) | |
| tree | 6a26f6313e7cf45a277756890e087201704bab90 /src/game/GameController.cpp | |
| parent | 299c1da9ae6b79ddb6cc39477ad31fb1d2a3c566 (diff) | |
| download | powder-89cdeef9ad9c164e9f484cded3096bcbc72b7207.zip powder-89cdeef9ad9c164e9f484cded3096bcbc72b7207.tar.gz | |
CommandInterface, Mouse, Keyboard and Tick events, on screen log, print redirected to tpt.log
Diffstat (limited to 'src/game/GameController.cpp')
| -rw-r--r-- | src/game/GameController.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 7b7ba20..b8f60f5 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -303,8 +303,39 @@ void GameController::CopyRegion(ui::Point point1, ui::Point point2) gameModel->SetClipboard(saveData, saveSize); } +bool GameController::MouseMove(int x, int y, int dx, int dy) +{ + return commandInterface->OnMouseMove(x, y, dx, dy); +} + +bool GameController::MouseDown(int x, int y, unsigned button) +{ + return commandInterface->OnMouseDown(x, y, button); +} + +bool GameController::MouseUp(int x, int y, unsigned button) +{ + return commandInterface->OnMouseUp(x, y, button); +} + +bool GameController::MouseWheel(int x, int y, int d) +{ + return commandInterface->OnMouseWheel(x, y, d); +} + +bool GameController::KeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +{ + return commandInterface->OnKeyPress(key, character, shift, ctrl, alt); +} + +bool GameController::KeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) +{ + return commandInterface->OnKeyRelease(key, character, shift, ctrl, alt); +} + void GameController::Update() { + commandInterface->OnTick(1.0f); gameModel->GetSimulation()->update_particles(); if(renderOptions && renderOptions->HasExited) { |
