diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-05-13 16:43:41 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-05-13 16:43:41 (GMT) |
| commit | 4032a0469b1f40f7197468f34986e365bd6e7314 (patch) | |
| tree | f324519139168068628f8d6e0fc8046001c9c0a1 /src/game/Tool.h | |
| parent | a2e91c247fab4a2cee8936d83979f4a72390f7e7 (diff) | |
| download | powder-4032a0469b1f40f7197468f34986e365bd6e7314.zip powder-4032a0469b1f40f7197468f34986e365bd6e7314.tar.gz | |
Click function for tools that aren't continuous. Debug helper for UI components (Ctrl+Shift D when DEBUG is defined), fix add sign window logic
Diffstat (limited to 'src/game/Tool.h')
| -rw-r--r-- | src/game/Tool.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/game/Tool.h b/src/game/Tool.h index 935e598..3a66ae4 100644 --- a/src/game/Tool.h +++ b/src/game/Tool.h @@ -28,6 +28,7 @@ public: } string GetName() { return toolName; } virtual ~Tool() {} + virtual void Click(Simulation * sim, Brush * brush, ui::Point position) { } virtual void Draw(Simulation * sim, Brush * brush, ui::Point position) { sim->ToolBrush(position.X, position.Y, toolID, brush); } @@ -45,18 +46,15 @@ class SignTool: public Tool { public: SignTool(): - Tool(0, "SIGN", 0, 0, 0), - opened(false) + Tool(0, "SIGN", 0, 0, 0) { } virtual ~SignTool() {} - virtual void Draw(Simulation * sim, Brush * brush, ui::Point position); + virtual void Click(Simulation * sim, Brush * brush, ui::Point position); + virtual void Draw(Simulation * sim, Brush * brush, ui::Point position) { } virtual void DrawLine(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { } virtual void DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Point position2) { } virtual void DrawFill(Simulation * sim, Brush * brush, ui::Point position) { } - void SetClosed() { opened = false; } -protected: - bool opened; }; class PropertyTool: public Tool |
