forked from teamnwah/openmw-tes3coop
first alchemy window layout (not pretty)
parent
51b8a76a68
commit
09c870ad68
@ -1,10 +1,37 @@
|
|||||||
#include "alchemywindow.hpp"
|
#include "alchemywindow.hpp"
|
||||||
|
|
||||||
|
#include "window_manager.hpp"
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
AlchemyWindow::AlchemyWindow(WindowManager& parWindowManager)
|
AlchemyWindow::AlchemyWindow(WindowManager& parWindowManager)
|
||||||
: WindowBase("openmw_alchemy_window_layout.xml", parWindowManager)
|
: WindowBase("openmw_alchemy_window_layout.xml", parWindowManager)
|
||||||
{
|
{
|
||||||
|
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);
|
||||||
|
|
||||||
center();
|
center();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AlchemyWindow::onCancelButtonClicked(MyGUI::Widget* _sender)
|
||||||
|
{
|
||||||
|
mWindowManager.popGuiMode();
|
||||||
|
mWindowManager.popGuiMode();
|
||||||
|
}
|
||||||
|
|
||||||
|
void AlchemyWindow::onCreateButtonClicked(MyGUI::Widget* _sender)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue