diff options
| author | Simon 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) |
| commit | 8f4296ac399ba85e79811058744cadec9fd21a0c (patch) | |
| tree | 8f8c1d862b91c308b531d210fe7d79f81d732032 /src/graphics/Renderer.cpp | |
| parent | cebd28148d8e6ea77d180ef1e186df7993d9e413 (diff) | |
| download | powder-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/graphics/Renderer.cpp')
| -rw-r--r-- | src/graphics/Renderer.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/graphics/Renderer.cpp b/src/graphics/Renderer.cpp index 45bc15e..9c99bfa 100644 --- a/src/graphics/Renderer.cpp +++ b/src/graphics/Renderer.cpp @@ -923,14 +923,18 @@ void Renderer::DrawSigns() for (i=0; i < signs.size(); i++) if (signs[i].text.length()) { + char type = 0; std::string text = signs[i].getText(sim); + splitsign(signs[i].text.c_str(), &type); signs[i].pos(text, x, y, w, h); clearrect(x, y, w+1, h); drawrect(x, y, w+1, h, 192, 192, 192, 255); - if (splitsign(signs[i].text.c_str())) - drawtext(x+3, y+3, text, 0, 191, 255, 255); - else + if (!type) drawtext(x+3, y+3, text, 255, 255, 255, 255); + else if(type == 'b') + drawtext(x+3, y+3, text, 211, 211, 40, 255); + else + drawtext(x+3, y+3, text, 0, 191, 255, 255); x = signs[i].x; y = signs[i].y; |
