summaryrefslogtreecommitdiff
path: root/src/gui/game/SignTool.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2013-10-19 17:59:49 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2013-10-19 17:59:49 (GMT)
commit8f4296ac399ba85e79811058744cadec9fd21a0c (patch)
tree8f8c1d862b91c308b531d210fe7d79f81d732032 /src/gui/game/SignTool.cpp
parentcebd28148d8e6ea77d180ef1e186df7993d9e413 (diff)
downloadpowder-8f4296ac399ba85e79811058744cadec9fd21a0c.zip
powder-8f4296ac399ba85e79811058744cadec9fd21a0c.tar.gz
Spark sign tool, {b|sometext}, when the sign is clicked, the a spark will be created at the signs position. Also MouseDown events that draw particles from being triggered when clicking on a sign
Diffstat (limited to 'src/gui/game/SignTool.cpp')
-rw-r--r--src/gui/game/SignTool.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/game/SignTool.cpp b/src/gui/game/SignTool.cpp
index 9cb389a..fdc1fb5 100644
--- a/src/gui/game/SignTool.cpp
+++ b/src/gui/game/SignTool.cpp
@@ -178,15 +178,19 @@ void SignWindow::DoDraw()
{
sign & currentSign = *iter;
int x, y, w, h, dx, dy;
+ char type = 0;
Graphics * g = ui::Engine::Ref().g;
std::string text = currentSign.getText(sim);
+ splitsign(currentSign.text.c_str(), &type);
currentSign.pos(text, x, y, w, h);
g->clearrect(x, y, w+1, h);
g->drawrect(x, y, w+1, h, 192, 192, 192, 255);
- if (splitsign(currentSign.text.c_str()))
- g->drawtext(x+3, y+3, text, 0, 191, 255, 255);
- else
+ if (!type)
g->drawtext(x+3, y+3, text, 255, 255, 255, 255);
+ else if(type == 'b')
+ g->drawtext(x+3, y+3, text, 211, 211, 40, 255);
+ else
+ g->drawtext(x+3, y+3, text, 0, 191, 255, 255);
x = currentSign.x;
y = currentSign.y;