diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-18 19:34:58 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-18 19:34:58 (GMT) |
| commit | dd0e6e7f4ddc5a1a9c25111275187b767d51bdb4 (patch) | |
| tree | 79213c37eab4ad4715a00d53029fd6d6c865bc73 /src/game/Tool.cpp | |
| parent | 26dbd547d3a3662c62e7b3ecadae5609f1726df4 (diff) | |
| download | powder-dd0e6e7f4ddc5a1a9c25111275187b767d51bdb4.zip powder-dd0e6e7f4ddc5a1a9c25111275187b767d51bdb4.tar.gz | |
Add descriptions to toolbuttons, add Tooltips to Button, ToolTip event for Windows
Diffstat (limited to 'src/game/Tool.cpp')
| -rw-r--r-- | src/game/Tool.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/game/Tool.cpp b/src/game/Tool.cpp index 2467d3f..22d21ea 100644 --- a/src/game/Tool.cpp +++ b/src/game/Tool.cpp @@ -12,15 +12,17 @@ using namespace std; -Tool::Tool(int id, string name, int r, int g, int b): +Tool::Tool(int id, string name, string description, int r, int g, int b): toolID(id), toolName(name), + toolDescription(description), colRed(r), colGreen(g), colBlue(b) { } string Tool::GetName() { return toolName; } +string Tool::GetDescription() { return toolDescription; } Tool::~Tool() {} void Tool::Click(Simulation * sim, Brush * brush, ui::Point position) { } void Tool::Draw(Simulation * sim, Brush * brush, ui::Point position) { @@ -34,8 +36,8 @@ void Tool::DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui::Po } void Tool::DrawFill(Simulation * sim, Brush * brush, ui::Point position) {}; -ElementTool::ElementTool(int id, string name, int r, int g, int b): - Tool(id, name, r, g, b) +ElementTool::ElementTool(int id, string name, string description, int r, int g, int b): + Tool(id, name, description, r, g, b) { } ElementTool::~ElementTool() {} @@ -53,8 +55,8 @@ void ElementTool::DrawFill(Simulation * sim, Brush * brush, ui::Point position) } -WallTool::WallTool(int id, string name, int r, int g, int b): -Tool(id, name, r, g, b) +WallTool::WallTool(int id, string name, string description, int r, int g, int b): +Tool(id, name, description, r, g, b) { } WallTool::~WallTool() {} @@ -72,8 +74,8 @@ void WallTool::DrawFill(Simulation * sim, Brush * brush, ui::Point position) { } -GolTool::GolTool(int id, string name, int r, int g, int b): - Tool(id, name, r, g, b) +GolTool::GolTool(int id, string name, string description, int r, int g, int b): + Tool(id, name, description, r, g, b) { } GolTool::~GolTool() {} |
