diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-22 14:01:56 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-22 14:01:56 (GMT) |
| commit | a1b4168b30979fc9bb8571d382b4bfc6aa8f87f0 (patch) | |
| tree | 0bdb25f5f3bf7dab35691faf541a04086a2bab97 /src/game/SignTool.cpp | |
| parent | f445b80e8a0d97408aa6b7b7b62ef5a661ec6e99 (diff) | |
| download | powder-a1b4168b30979fc9bb8571d382b4bfc6aa8f87f0.zip powder-a1b4168b30979fc9bb8571d382b4bfc6aa8f87f0.tar.gz | |
Sign tool icon
Diffstat (limited to 'src/game/SignTool.cpp')
| -rw-r--r-- | src/game/SignTool.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/game/SignTool.cpp b/src/game/SignTool.cpp index 5b3bb8b..333646b 100644 --- a/src/game/SignTool.cpp +++ b/src/game/SignTool.cpp @@ -120,7 +120,18 @@ void SignWindow::OnDraw() VideoBuffer * SignTool::GetIcon(int toolID, int width, int height) { - + VideoBuffer * newTexture = new VideoBuffer(width, height); + for (int y=0; y<height; y++) + { + for (int x=0; x<width; x++) + { + pixel pc = x==0||x==width-1||y==0||y==height-1 ? PIXPACK(0xA0A0A0) : PIXPACK(0x000000); + newTexture->SetPixel(x, y, PIXR(pc), PIXG(pc), PIXB(pc), 255); + } + } + newTexture->SetCharacter((width/2)-5, (height/2)-4, 0xA1, 32, 64, 128, 255); + newTexture->SetCharacter((width/2)-5, (height/2)-4, 0xA0, 255, 255, 255, 255); + return newTexture; } void SignTool::Click(Simulation * sim, Brush * brush, ui::Point position) |
