summaryrefslogtreecommitdiff
path: root/src/gui/game/GameView.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-07-16 17:08:57 (GMT)
committer jacob1 <jfu614@gmail.com>2013-07-16 17:08:57 (GMT)
commit6f29926b962538a63f9548a3331b7a52b617b46f (patch)
treef741edb788fb73f541c26dbf119c38a6213341fb /src/gui/game/GameView.cpp
parent5773e6afb51a52f0821f2dec0ad34617f4bbf636 (diff)
downloadpowder-6f29926b962538a63f9548a3331b7a52b617b46f.zip
powder-6f29926b962538a63f9548a3331b7a52b617b46f.tar.gz
deco menu button textures (not black)
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)