mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-24 19:41:34 +00:00
Make InfoBoxDialog use the new WindowBase
This commit is contained in:
parent
6c7f59725f
commit
0d97200e18
2 changed files with 3 additions and 16 deletions
|
@ -291,8 +291,7 @@ void InfoBoxDialog::layoutVertically(MyGUI::WidgetPtr widget, int margin)
|
||||||
}
|
}
|
||||||
|
|
||||||
InfoBoxDialog::InfoBoxDialog(MWWorld::Environment& environment)
|
InfoBoxDialog::InfoBoxDialog(MWWorld::Environment& environment)
|
||||||
: Layout("openmw_infobox_layout.xml")
|
: WindowBase("openmw_infobox_layout.xml", environment)
|
||||||
, environment(environment)
|
|
||||||
, currentButton(-1)
|
, currentButton(-1)
|
||||||
{
|
{
|
||||||
getWidget(textBox, "TextBox");
|
getWidget(textBox, "TextBox");
|
||||||
|
@ -373,16 +372,6 @@ void InfoBoxDialog::onButtonClicked(MyGUI::WidgetPtr _sender)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InfoBoxDialog::center()
|
|
||||||
{
|
|
||||||
// Centre dialog
|
|
||||||
MyGUI::IntSize gameWindowSize = environment.mWindowManager->getGui()->getViewSize();
|
|
||||||
MyGUI::IntCoord coord = mMainWidget->getCoord();
|
|
||||||
coord.left = (gameWindowSize.width - coord.width)/2;
|
|
||||||
coord.top = (gameWindowSize.height - coord.height)/2;
|
|
||||||
mMainWidget->setCoord(coord);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ClassChoiceDialog */
|
/* ClassChoiceDialog */
|
||||||
|
|
||||||
ClassChoiceDialog::ClassChoiceDialog(MWWorld::Environment& environment)
|
ClassChoiceDialog::ClassChoiceDialog(MWWorld::Environment& environment)
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <MyGUI.h>
|
#include <MyGUI.h>
|
||||||
|
|
||||||
#include "widgets.hpp"
|
#include "widgets.hpp"
|
||||||
|
#include "window_base.hpp"
|
||||||
|
|
||||||
namespace MWWorld
|
namespace MWWorld
|
||||||
{
|
{
|
||||||
|
@ -23,7 +24,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
using namespace MyGUI;
|
using namespace MyGUI;
|
||||||
|
|
||||||
class InfoBoxDialog : public OEngine::GUI::Layout
|
class InfoBoxDialog : public WindowBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
InfoBoxDialog(MWWorld::Environment& environment);
|
InfoBoxDialog(MWWorld::Environment& environment);
|
||||||
|
@ -49,9 +50,6 @@ namespace MWGui
|
||||||
void onButtonClicked(MyGUI::WidgetPtr _sender);
|
void onButtonClicked(MyGUI::WidgetPtr _sender);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void center();
|
|
||||||
|
|
||||||
MWWorld::Environment& environment;
|
|
||||||
|
|
||||||
void fitToText(MyGUI::StaticTextPtr widget);
|
void fitToText(MyGUI::StaticTextPtr widget);
|
||||||
void layoutVertically(MyGUI::WidgetPtr widget, int margin);
|
void layoutVertically(MyGUI::WidgetPtr widget, int margin);
|
||||||
|
|
Loading…
Reference in a new issue