summaryrefslogtreecommitdiff
path: root/src/game/ToolButton.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-07-21 17:43:46 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-07-21 17:43:46 (GMT)
commitf7d8556965832821036c210ffc1f9e73f3ff70cc (patch)
tree58e985bdc6e99a2ad8e7382ebaf33553ae93d836 /src/game/ToolButton.cpp
parent5bf0a084ace0e6b673efa4552b40de8b36e0668e (diff)
downloadpowder-f7d8556965832821036c210ffc1f9e73f3ff70cc.zip
powder-f7d8556965832821036c210ffc1f9e73f3ff70cc.tar.gz
Icons for menu items
Diffstat (limited to 'src/game/ToolButton.cpp')
-rw-r--r--src/game/ToolButton.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/game/ToolButton.cpp b/src/game/ToolButton.cpp
index 7295309..21e19be 100644
--- a/src/game/ToolButton.cpp
+++ b/src/game/ToolButton.cpp
@@ -40,7 +40,14 @@ void ToolButton::Draw(const ui::Point& screenPos)
Graphics * g = ui::Engine::Ref().g;
int totalColour = Appearance.BackgroundInactive.Blue + (3*Appearance.BackgroundInactive.Green) + (2*Appearance.BackgroundInactive.Red);
- g->fillrect(screenPos.X+2, screenPos.Y+2, Size.X-4, Size.Y-4, Appearance.BackgroundInactive.Red, Appearance.BackgroundInactive.Green, Appearance.BackgroundInactive.Blue, Appearance.BackgroundInactive.Alpha);
+ if(Appearance.GetTexture())
+ {
+ g->draw_image(Appearance.GetTexture(), screenPos.X, screenPos.Y, 255);
+ }
+ else
+ {
+ g->fillrect(screenPos.X+2, screenPos.Y+2, Size.X-4, Size.Y-4, Appearance.BackgroundInactive.Red, Appearance.BackgroundInactive.Green, Appearance.BackgroundInactive.Blue, Appearance.BackgroundInactive.Alpha);
+ }
if(isMouseInside && currentSelection == -1)
{