summaryrefslogtreecommitdiff
path: root/src/game/GameView.h
diff options
context:
space:
mode:
authorSimon 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)
commit89cdeef9ad9c164e9f484cded3096bcbc72b7207 (patch)
tree6a26f6313e7cf45a277756890e087201704bab90 /src/game/GameView.h
parent299c1da9ae6b79ddb6cc39477ad31fb1d2a3c566 (diff)
downloadpowder-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/GameView.h')
-rw-r--r--src/game/GameView.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/game/GameView.h b/src/game/GameView.h
index 1be2d96..9658184 100644
--- a/src/game/GameView.h
+++ b/src/game/GameView.h
@@ -3,6 +3,8 @@
#include <vector>
#include <queue>
+#include <deque>
+#include <string>
#include "GameController.h"
#include "GameModel.h"
#include "interface/Window.h"
@@ -41,6 +43,8 @@ private:
//UI Elements
vector<ui::Button*> menuButtons;
vector<ToolButton*> toolButtons;
+ deque<string> logEntries;
+ float lastLogEntry;
ui::Button * searchButton;
ui::Button * reloadButton;
ui::Button * saveSimulationButton;
@@ -88,12 +92,22 @@ public:
void NotifyColourSelectorColourChanged(GameModel * sender);
void NotifyClipboardChanged(GameModel * sender);
void NotifyStampChanged(GameModel * sender);
+ void NotifyLogChanged(GameModel * sender, string entry);
virtual void OnMouseMove(int x, int y, int dx, int dy);
virtual void OnMouseDown(int x, int y, unsigned button);
virtual void OnMouseUp(int x, int y, unsigned button);
virtual void OnMouseWheel(int x, int y, int d);
virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt);
virtual void OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt);
+
+ //Top-level handers, for Lua interface
+ virtual void DoMouseMove(int x, int y, int dx, int dy);
+ virtual void DoMouseDown(int x, int y, unsigned button);
+ virtual void DoMouseUp(int x, int y, unsigned button);
+ virtual void DoMouseWheel(int x, int y, int d);
+ virtual void DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt);
+ virtual void DoKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt);
+
//virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) {}
//virtual void OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) {}
virtual void OnTick(float dt);