mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 13:49:55 +00:00
24 lines
601 B
C++
24 lines
601 B
C++
#include "window_base.hpp"
|
|
#include "window_manager.hpp"
|
|
|
|
using namespace MWGui;
|
|
|
|
WindowBase::WindowBase(const std::string& parLayout, WindowManager& parWindowManager)
|
|
: Layout(parLayout)
|
|
, mWindowManager(parWindowManager)
|
|
{
|
|
}
|
|
|
|
void WindowBase::open()
|
|
{
|
|
}
|
|
|
|
void WindowBase::center()
|
|
{
|
|
// Centre dialog
|
|
MyGUI::IntSize gameWindowSize = MyGUI::RenderManager::getInstance().getViewSize();
|
|
MyGUI::IntCoord coord = mMainWidget->getCoord();
|
|
coord.left = (gameWindowSize.width - coord.width)/2;
|
|
coord.top = (gameWindowSize.height - coord.height)/2;
|
|
mMainWidget->setCoord(coord);
|
|
}
|