diff options
| author | jacob1 <jfu614@gmail.com> | 2013-07-18 19:40:32 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-07-18 19:40:32 (GMT) |
| commit | f56a2f60008adb1328f841aa67cc27beb0a3d271 (patch) | |
| tree | 38f7239b1b22f1d60173095d41216226a412a4e7 /src/gui/game/ToolButton.cpp | |
| parent | cc887995c0881d728e13fbdfe0757e0fa256bce0 (diff) | |
| download | powder-f56a2f60008adb1328f841aa67cc27beb0a3d271.zip powder-f56a2f60008adb1328f841aa67cc27beb0a3d271.tar.gz | |
add back replace mode and specific delete. Activated with insert key / delete key, use ctrl+alt click to select what to use for the checks
Diffstat (limited to 'src/gui/game/ToolButton.cpp')
| -rw-r--r-- | src/gui/game/ToolButton.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/game/ToolButton.cpp b/src/gui/game/ToolButton.cpp index 8539ac7..3b3170b 100644 --- a/src/gui/game/ToolButton.cpp +++ b/src/gui/game/ToolButton.cpp @@ -33,7 +33,7 @@ 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); - if(Appearance.GetTexture()) + if (Appearance.GetTexture()) { g->draw_image(Appearance.GetTexture(), screenPos.X+2, screenPos.Y+2, 255); } @@ -42,7 +42,7 @@ void ToolButton::Draw(const ui::Point& screenPos) 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) + if (isMouseInside && currentSelection == -1) { g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, Appearance.BorderActive.Red, Appearance.BorderActive.Green, Appearance.BorderActive.Blue, Appearance.BorderActive.Alpha); } @@ -75,6 +75,9 @@ void ToolButton::SetSelectionState(int state) case 2: Appearance.BorderInactive = ui::Colour(0, 255, 0); break; + case 3: + Appearance.BorderInactive = ui::Colour(0, 255, 255); + break; default: Appearance.BorderInactive = ui::Colour(0, 0, 0); break; |
