2012-05-24 13:57:23 +00:00
|
|
|
#include "alchemywindow.hpp"
|
|
|
|
|
2012-05-25 10:58:28 +00:00
|
|
|
#include "window_manager.hpp"
|
|
|
|
|
2012-05-24 13:57:23 +00:00
|
|
|
namespace MWGui
|
|
|
|
{
|
|
|
|
AlchemyWindow::AlchemyWindow(WindowManager& parWindowManager)
|
|
|
|
: WindowBase("openmw_alchemy_window_layout.xml", parWindowManager)
|
|
|
|
{
|
2012-05-25 10:58:28 +00:00
|
|
|
getWidget(mCreateButton, "CreateButton");
|
|
|
|
getWidget(mCancelButton, "CancelButton");
|
|
|
|
|
|
|
|
|
|
|
|
MyGUI::Widget* buttonBox = mCancelButton->getParent();
|
|
|
|
int cancelButtonWidth = mCancelButton->getTextSize().width + 24;
|
|
|
|
mCancelButton->setCoord(buttonBox->getWidth() - cancelButtonWidth,
|
|
|
|
mCancelButton->getTop(), cancelButtonWidth, mCancelButton->getHeight());
|
|
|
|
int createButtonWidth = mCreateButton->getTextSize().width + 24;
|
|
|
|
mCreateButton->setCoord(buttonBox->getWidth() - createButtonWidth - cancelButtonWidth - 4,
|
|
|
|
mCreateButton->getTop(), createButtonWidth, mCreateButton->getHeight());
|
|
|
|
|
|
|
|
mCreateButton->eventMouseButtonClick += MyGUI::newDelegate(this, &AlchemyWindow::onCreateButtonClicked);
|
|
|
|
mCancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &AlchemyWindow::onCancelButtonClicked);
|
|
|
|
|
2012-05-24 13:57:23 +00:00
|
|
|
center();
|
|
|
|
}
|
2012-05-25 10:58:28 +00:00
|
|
|
|
|
|
|
void AlchemyWindow::onCancelButtonClicked(MyGUI::Widget* _sender)
|
|
|
|
{
|
|
|
|
mWindowManager.popGuiMode();
|
|
|
|
mWindowManager.popGuiMode();
|
|
|
|
}
|
|
|
|
|
|
|
|
void AlchemyWindow::onCreateButtonClicked(MyGUI::Widget* _sender)
|
|
|
|
{
|
|
|
|
}
|
2012-05-24 13:57:23 +00:00
|
|
|
}
|