mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-02 02:15:31 +00:00
Make DialogueWindow use the new WindowBase
This commit is contained in:
parent
180164b2f3
commit
d9d626cc95
2 changed files with 4 additions and 14 deletions
|
@ -17,15 +17,10 @@ using namespace MWGui;
|
||||||
using namespace Widgets;
|
using namespace Widgets;
|
||||||
|
|
||||||
DialogueWindow::DialogueWindow(MWWorld::Environment& environment)
|
DialogueWindow::DialogueWindow(MWWorld::Environment& environment)
|
||||||
: Layout("openmw_dialogue_window_layout.xml")
|
: WindowBase("openmw_dialogue_window_layout.xml", environment)
|
||||||
, environment(environment)
|
|
||||||
{
|
{
|
||||||
// Centre dialog
|
// Centre dialog
|
||||||
MyGUI::IntSize gameWindowSize = environment.mWindowManager->getGui()->getViewSize();
|
center();
|
||||||
MyGUI::IntCoord coord = mMainWidget->getCoord();
|
|
||||||
coord.left = (gameWindowSize.width - coord.width)/2;
|
|
||||||
coord.top = (gameWindowSize.height - coord.height)/2;
|
|
||||||
mMainWidget->setCoord(coord);
|
|
||||||
|
|
||||||
//WindowManager *wm = environment.mWindowManager;
|
//WindowManager *wm = environment.mWindowManager;
|
||||||
setText("NpcName", "Name of character");
|
setText("NpcName", "Name of character");
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
#ifndef MWGUI_DIALOGE_H
|
#ifndef MWGUI_DIALOGE_H
|
||||||
#define MWGUI_DIALOGE_H
|
#define MWGUI_DIALOGE_H
|
||||||
|
|
||||||
#include <components/esm_store/store.hpp>
|
#include "window_base.hpp"
|
||||||
|
|
||||||
#include <openengine/gui/layout.hpp>
|
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
|
|
||||||
namespace MWWorld
|
namespace MWWorld
|
||||||
|
@ -23,7 +20,7 @@ namespace MWGui
|
||||||
|
|
||||||
using namespace MyGUI;
|
using namespace MyGUI;
|
||||||
|
|
||||||
class DialogueWindow: public OEngine::GUI::Layout
|
class DialogueWindow: public WindowBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DialogueWindow(MWWorld::Environment& environment);
|
DialogueWindow(MWWorld::Environment& environment);
|
||||||
|
@ -46,8 +43,6 @@ namespace MWGui
|
||||||
private:
|
private:
|
||||||
void updateOptions();
|
void updateOptions();
|
||||||
|
|
||||||
MWWorld::Environment& environment;
|
|
||||||
|
|
||||||
DialogeHistory* history;
|
DialogeHistory* history;
|
||||||
MyGUI::ListPtr topicsList;
|
MyGUI::ListPtr topicsList;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue