1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-01 19:45:35 +00:00

Make DialogueWindow use the new WindowBase

This commit is contained in:
Jan-Peter Nilsson 2010-11-06 11:47:46 +01:00
parent 180164b2f3
commit d9d626cc95
2 changed files with 4 additions and 14 deletions

View file

@ -17,15 +17,10 @@ using namespace MWGui;
using namespace Widgets;
DialogueWindow::DialogueWindow(MWWorld::Environment& environment)
: Layout("openmw_dialogue_window_layout.xml")
, environment(environment)
: WindowBase("openmw_dialogue_window_layout.xml", environment)
{
// 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);
center();
//WindowManager *wm = environment.mWindowManager;
setText("NpcName", "Name of character");

View file

@ -1,10 +1,7 @@
#ifndef MWGUI_DIALOGE_H
#define MWGUI_DIALOGE_H
#include <components/esm_store/store.hpp>
#include <openengine/gui/layout.hpp>
#include "window_base.hpp"
#include <boost/array.hpp>
namespace MWWorld
@ -23,7 +20,7 @@ namespace MWGui
using namespace MyGUI;
class DialogueWindow: public OEngine::GUI::Layout
class DialogueWindow: public WindowBase
{
public:
DialogueWindow(MWWorld::Environment& environment);
@ -46,8 +43,6 @@ namespace MWGui
private:
void updateOptions();
MWWorld::Environment& environment;
DialogeHistory* history;
MyGUI::ListPtr topicsList;
};