forked from mirror/openmw-tes3mp
Make StatsWindow use the new WindowBase
This commit is contained in:
parent
2e7e79f596
commit
6c7f59725f
2 changed files with 5 additions and 5 deletions
|
@ -13,8 +13,7 @@ using namespace MWGui;
|
|||
const int StatsWindow::lineHeight = 18;
|
||||
|
||||
StatsWindow::StatsWindow (MWWorld::Environment& environment)
|
||||
: Layout("openmw_stats_window_layout.xml")
|
||||
, environment(environment)
|
||||
: WindowBase("openmw_stats_window_layout.xml", environment)
|
||||
, lastPos(0)
|
||||
, reputation(0)
|
||||
, bounty(0)
|
||||
|
@ -59,7 +58,8 @@ StatsWindow::StatsWindow (MWWorld::Environment& environment)
|
|||
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)
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "../mwmechanics/stat.hpp"
|
||||
#include "../mwworld/environment.hpp"
|
||||
#include "../mwworld/world.hpp"
|
||||
#include "window_base.hpp"
|
||||
|
||||
/*
|
||||
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:
|
||||
typedef std::pair<std::string, int> Faction;
|
||||
|
@ -225,7 +226,6 @@ namespace MWGui
|
|||
|
||||
static const int lineHeight;
|
||||
|
||||
MWWorld::Environment& environment;
|
||||
MyGUI::WidgetPtr skillAreaWidget, skillClientWidget;
|
||||
MyGUI::VScrollPtr skillScrollerWidget;
|
||||
int lastPos, clientHeight;
|
||||
|
|
Loading…
Reference in a new issue