Make StatsWindow use the new WindowBase

This commit is contained in:
Jan-Peter Nilsson 2010-11-06 11:29:49 +01:00
parent 2e7e79f596
commit 6c7f59725f
2 changed files with 5 additions and 5 deletions

View file

@ -13,8 +13,7 @@ using namespace MWGui;
const int StatsWindow::lineHeight = 18; const int StatsWindow::lineHeight = 18;
StatsWindow::StatsWindow (MWWorld::Environment& environment) StatsWindow::StatsWindow (MWWorld::Environment& environment)
: Layout("openmw_stats_window_layout.xml") : WindowBase("openmw_stats_window_layout.xml", environment)
, environment(environment)
, lastPos(0) , lastPos(0)
, reputation(0) , reputation(0)
, bounty(0) , bounty(0)
@ -59,7 +58,8 @@ StatsWindow::StatsWindow (MWWorld::Environment& environment)
skillWidgetMap.insert(std::pair<int, MyGUI::StaticTextPtr>(i, nullptr)); skillWidgetMap.insert(std::pair<int, MyGUI::StaticTextPtr>(i, nullptr));
} }
static_cast<MyGUI::WindowPtr>(mMainWidget)->eventWindowChangeCoord = MyGUI::newDelegate(this, &StatsWindow::onWindowResize); MyGUI::WindowPtr t = static_cast<MyGUI::WindowPtr>(mMainWidget);
t->eventWindowChangeCoord = MyGUI::newDelegate(this, &StatsWindow::onWindowResize);
} }
void StatsWindow::onScrollChangePosition(MyGUI::VScrollPtr scroller, size_t pos) void StatsWindow::onScrollChangePosition(MyGUI::VScrollPtr scroller, size_t pos)

View file

@ -15,6 +15,7 @@
#include "../mwmechanics/stat.hpp" #include "../mwmechanics/stat.hpp"
#include "../mwworld/environment.hpp" #include "../mwworld/environment.hpp"
#include "../mwworld/world.hpp" #include "../mwworld/world.hpp"
#include "window_base.hpp"
/* /*
This file contains classes corresponding to all the window layouts This file contains classes corresponding to all the window layouts
@ -177,7 +178,7 @@ namespace MWGui
} }
}; };
class StatsWindow : public OEngine::GUI::Layout class StatsWindow : public WindowBase
{ {
public: public:
typedef std::pair<std::string, int> Faction; typedef std::pair<std::string, int> Faction;
@ -225,7 +226,6 @@ namespace MWGui
static const int lineHeight; static const int lineHeight;
MWWorld::Environment& environment;
MyGUI::WidgetPtr skillAreaWidget, skillClientWidget; MyGUI::WidgetPtr skillAreaWidget, skillClientWidget;
MyGUI::VScrollPtr skillScrollerWidget; MyGUI::VScrollPtr skillScrollerWidget;
int lastPos, clientHeight; int lastPos, clientHeight;