summaryrefslogtreecommitdiff
path: root/src/gui/game/GameView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/game/GameView.cpp')
-rw-r--r--src/gui/game/GameView.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/game/GameView.cpp b/src/gui/game/GameView.cpp
index 96806b1..1b811e0 100644
--- a/src/gui/game/GameView.cpp
+++ b/src/gui/game/GameView.cpp
@@ -17,6 +17,7 @@
#include "Format.h"
#include "QuickOption.h"
#include "IntroText.h"
+#include "DecorationTool.h"
class SplitButton;
@@ -656,10 +657,8 @@ void GameView::NotifyLastToolChanged(GameModel * sender)
void GameView::NotifyToolListChanged(GameModel * sender)
{
- //int currentY = YRES+MENUSIZE-36;
lastOffset = 0;
int currentX = XRES+BARSIZE-56;
- int totalColour;
for(int i = 0; i < menuButtons.size(); i++)
{
if(((MenuAction*)menuButtons[i]->GetActionCallback())->menuID==sender->GetActiveMenu())
@@ -680,10 +679,13 @@ void GameView::NotifyToolListChanged(GameModel * sender)
vector<Tool*> toolList = sender->GetToolList();
for(int i = 0; i < toolList.size(); i++)
{
- //ToolButton * tempButton = new ToolButton(ui::Point(XRES+1, currentY), ui::Point(28, 15), toolList[i]->GetName());
VideoBuffer * tempTexture = toolList[i]->GetTexture(26, 14);
ToolButton * tempButton;
+ //get decotool texture manually, since it changes depending on it's own color
+ if (sender->GetActiveMenu() == SC_DECO)
+ tempTexture = ((DecorationTool*)toolList[i])->GetIcon(toolList[i]->GetToolID(), 26, 14);
+
if(tempTexture)
tempButton = new ToolButton(ui::Point(currentX, YRES+1), ui::Point(30, 18), "", toolList[i]->GetDescription());
else
@@ -808,6 +810,7 @@ void GameView::NotifyColourSelectorColourChanged(GameModel * sender)
{
colourPicker->Appearance.BackgroundInactive = sender->GetColourSelectorColour();
colourPicker->Appearance.BackgroundHover = sender->GetColourSelectorColour();
+ NotifyToolListChanged(sender);
}
void GameView::NotifyRendererChanged(GameModel * sender)