mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-30 12:32:36 +00:00
Fix headers including whole MyGUI.h, forward declare where appropriate, and fix some deprecated types (WidgetPtr)
This commit is contained in:
parent
3961fb36d4
commit
9a84f6744f
@ -237,7 +237,7 @@ namespace MWGui
|
|||||||
Widgets::SpellEffectList _list = Widgets::MWEffectList::effectListFromESM(&list);
|
Widgets::SpellEffectList _list = Widgets::MWEffectList::effectListFromESM(&list);
|
||||||
effectsWidget->setEffectList(_list);
|
effectsWidget->setEffectList(_list);
|
||||||
|
|
||||||
std::vector<MyGUI::WidgetPtr> effectItems;
|
std::vector<MyGUI::Widget*> effectItems;
|
||||||
effectsWidget->createEffectWidgets(effectItems, mEffectsBox, coord, false, 0);
|
effectsWidget->createEffectWidgets(effectItems, mEffectsBox, coord, false, 0);
|
||||||
effectsWidget->setCoord(coord);
|
effectsWidget->setCoord(coord);
|
||||||
}
|
}
|
||||||
|
@ -40,11 +40,11 @@ BirthDialog::BirthDialog(MWBase::WindowManager& parWindowManager)
|
|||||||
mBirthList->eventListMouseItemActivate += MyGUI::newDelegate(this, &BirthDialog::onSelectBirth);
|
mBirthList->eventListMouseItemActivate += MyGUI::newDelegate(this, &BirthDialog::onSelectBirth);
|
||||||
mBirthList->eventListChangePosition += MyGUI::newDelegate(this, &BirthDialog::onSelectBirth);
|
mBirthList->eventListChangePosition += MyGUI::newDelegate(this, &BirthDialog::onSelectBirth);
|
||||||
|
|
||||||
MyGUI::ButtonPtr backButton;
|
MyGUI::Button* backButton;
|
||||||
getWidget(backButton, "BackButton");
|
getWidget(backButton, "BackButton");
|
||||||
backButton->eventMouseButtonClick += MyGUI::newDelegate(this, &BirthDialog::onBackClicked);
|
backButton->eventMouseButtonClick += MyGUI::newDelegate(this, &BirthDialog::onBackClicked);
|
||||||
|
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::Button* okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
|
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
|
||||||
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &BirthDialog::onOkClicked);
|
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &BirthDialog::onOkClicked);
|
||||||
@ -55,7 +55,7 @@ BirthDialog::BirthDialog(MWBase::WindowManager& parWindowManager)
|
|||||||
|
|
||||||
void BirthDialog::setNextButtonShow(bool shown)
|
void BirthDialog::setNextButtonShow(bool shown)
|
||||||
{
|
{
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::Button* okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
|
|
||||||
if (shown)
|
if (shown)
|
||||||
@ -82,7 +82,7 @@ void BirthDialog::setBirthId(const std::string &birthId)
|
|||||||
if (boost::iequals(*mBirthList->getItemDataAt<std::string>(i), birthId))
|
if (boost::iequals(*mBirthList->getItemDataAt<std::string>(i), birthId))
|
||||||
{
|
{
|
||||||
mBirthList->setIndexSelected(i);
|
mBirthList->setIndexSelected(i);
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::Button* okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -110,7 +110,7 @@ void BirthDialog::onSelectBirth(MyGUI::ListBox* _sender, size_t _index)
|
|||||||
if (_index == MyGUI::ITEM_NONE)
|
if (_index == MyGUI::ITEM_NONE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::Button* okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
|
|
||||||
const std::string *birthId = mBirthList->getItemDataAt<std::string>(_index);
|
const std::string *birthId = mBirthList->getItemDataAt<std::string>(_index);
|
||||||
@ -159,7 +159,7 @@ void BirthDialog::updateBirths()
|
|||||||
|
|
||||||
void BirthDialog::updateSpells()
|
void BirthDialog::updateSpells()
|
||||||
{
|
{
|
||||||
for (std::vector<MyGUI::WidgetPtr>::iterator it = mSpellItems.begin(); it != mSpellItems.end(); ++it)
|
for (std::vector<MyGUI::Widget*>::iterator it = mSpellItems.begin(); it != mSpellItems.end(); ++it)
|
||||||
{
|
{
|
||||||
MyGUI::Gui::getInstance().destroyWidget(*it);
|
MyGUI::Gui::getInstance().destroyWidget(*it);
|
||||||
}
|
}
|
||||||
|
@ -46,9 +46,9 @@ namespace MWGui
|
|||||||
void updateSpells();
|
void updateSpells();
|
||||||
|
|
||||||
MyGUI::ListBox* mBirthList;
|
MyGUI::ListBox* mBirthList;
|
||||||
MyGUI::WidgetPtr mSpellArea;
|
MyGUI::Widget* mSpellArea;
|
||||||
MyGUI::ImageBox* mBirthImage;
|
MyGUI::ImageBox* mBirthImage;
|
||||||
std::vector<MyGUI::WidgetPtr> mSpellItems;
|
std::vector<MyGUI::Widget*> mSpellItems;
|
||||||
|
|
||||||
std::string mCurrentBirthId;
|
std::string mCurrentBirthId;
|
||||||
};
|
};
|
||||||
|
@ -31,11 +31,11 @@ GenerateClassResultDialog::GenerateClassResultDialog(MWBase::WindowManager& parW
|
|||||||
getWidget(mClassImage, "ClassImage");
|
getWidget(mClassImage, "ClassImage");
|
||||||
getWidget(mClassName, "ClassName");
|
getWidget(mClassName, "ClassName");
|
||||||
|
|
||||||
MyGUI::ButtonPtr backButton;
|
MyGUI::Button* backButton;
|
||||||
getWidget(backButton, "BackButton");
|
getWidget(backButton, "BackButton");
|
||||||
backButton->eventMouseButtonClick += MyGUI::newDelegate(this, &GenerateClassResultDialog::onBackClicked);
|
backButton->eventMouseButtonClick += MyGUI::newDelegate(this, &GenerateClassResultDialog::onBackClicked);
|
||||||
|
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::Button* okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
|
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
|
||||||
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &GenerateClassResultDialog::onOkClicked);
|
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &GenerateClassResultDialog::onOkClicked);
|
||||||
@ -97,11 +97,11 @@ PickClassDialog::PickClassDialog(MWBase::WindowManager& parWindowManager)
|
|||||||
|
|
||||||
getWidget(mClassImage, "ClassImage");
|
getWidget(mClassImage, "ClassImage");
|
||||||
|
|
||||||
MyGUI::ButtonPtr backButton;
|
MyGUI::Button* backButton;
|
||||||
getWidget(backButton, "BackButton");
|
getWidget(backButton, "BackButton");
|
||||||
backButton->eventMouseButtonClick += MyGUI::newDelegate(this, &PickClassDialog::onBackClicked);
|
backButton->eventMouseButtonClick += MyGUI::newDelegate(this, &PickClassDialog::onBackClicked);
|
||||||
|
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::Button* okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &PickClassDialog::onOkClicked);
|
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &PickClassDialog::onOkClicked);
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ PickClassDialog::PickClassDialog(MWBase::WindowManager& parWindowManager)
|
|||||||
|
|
||||||
void PickClassDialog::setNextButtonShow(bool shown)
|
void PickClassDialog::setNextButtonShow(bool shown)
|
||||||
{
|
{
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::Button* okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
|
|
||||||
if (shown)
|
if (shown)
|
||||||
@ -138,7 +138,7 @@ void PickClassDialog::setClassId(const std::string &classId)
|
|||||||
if (boost::iequals(*mClassList->getItemDataAt<std::string>(i), classId))
|
if (boost::iequals(*mClassList->getItemDataAt<std::string>(i), classId))
|
||||||
{
|
{
|
||||||
mClassList->setIndexSelected(i);
|
mClassList->setIndexSelected(i);
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::Button* okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -166,7 +166,7 @@ void PickClassDialog::onSelectClass(MyGUI::ListBox* _sender, size_t _index)
|
|||||||
if (_index == MyGUI::ITEM_NONE)
|
if (_index == MyGUI::ITEM_NONE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::Button* okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
|
|
||||||
const std::string *classId = mClassList->getItemDataAt<std::string>(_index);
|
const std::string *classId = mClassList->getItemDataAt<std::string>(_index);
|
||||||
@ -256,7 +256,7 @@ void InfoBoxDialog::fitToText(MyGUI::TextBox* widget)
|
|||||||
widget->setSize(size);
|
widget->setSize(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InfoBoxDialog::layoutVertically(MyGUI::WidgetPtr widget, int margin)
|
void InfoBoxDialog::layoutVertically(MyGUI::Widget* widget, int margin)
|
||||||
{
|
{
|
||||||
size_t count = widget->getChildCount();
|
size_t count = widget->getChildCount();
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
@ -264,7 +264,7 @@ void InfoBoxDialog::layoutVertically(MyGUI::WidgetPtr widget, int margin)
|
|||||||
int width = 0;
|
int width = 0;
|
||||||
for (unsigned i = 0; i < count; ++i)
|
for (unsigned i = 0; i < count; ++i)
|
||||||
{
|
{
|
||||||
MyGUI::WidgetPtr child = widget->getChildAt(i);
|
MyGUI::Widget* child = widget->getChildAt(i);
|
||||||
if (!child->getVisible())
|
if (!child->getVisible())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -302,7 +302,7 @@ std::string InfoBoxDialog::getText() const
|
|||||||
|
|
||||||
void InfoBoxDialog::setButtons(ButtonList &buttons)
|
void InfoBoxDialog::setButtons(ButtonList &buttons)
|
||||||
{
|
{
|
||||||
for (std::vector<MyGUI::ButtonPtr>::iterator it = this->mButtons.begin(); it != this->mButtons.end(); ++it)
|
for (std::vector<MyGUI::Button*>::iterator it = this->mButtons.begin(); it != this->mButtons.end(); ++it)
|
||||||
{
|
{
|
||||||
MyGUI::Gui::getInstance().destroyWidget(*it);
|
MyGUI::Gui::getInstance().destroyWidget(*it);
|
||||||
}
|
}
|
||||||
@ -310,7 +310,7 @@ void InfoBoxDialog::setButtons(ButtonList &buttons)
|
|||||||
mCurrentButton = -1;
|
mCurrentButton = -1;
|
||||||
|
|
||||||
// TODO: The buttons should be generated from a template in the layout file, ie. cloning an existing widget
|
// TODO: The buttons should be generated from a template in the layout file, ie. cloning an existing widget
|
||||||
MyGUI::ButtonPtr button;
|
MyGUI::Button* button;
|
||||||
MyGUI::IntCoord coord = MyGUI::IntCoord(0, 0, mButtonBar->getWidth(), 10);
|
MyGUI::IntCoord coord = MyGUI::IntCoord(0, 0, mButtonBar->getWidth(), 10);
|
||||||
ButtonList::const_iterator end = buttons.end();
|
ButtonList::const_iterator end = buttons.end();
|
||||||
for (ButtonList::const_iterator it = buttons.begin(); it != end; ++it)
|
for (ButtonList::const_iterator it = buttons.begin(); it != end; ++it)
|
||||||
@ -342,11 +342,11 @@ int InfoBoxDialog::getChosenButton() const
|
|||||||
return mCurrentButton;
|
return mCurrentButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InfoBoxDialog::onButtonClicked(MyGUI::WidgetPtr _sender)
|
void InfoBoxDialog::onButtonClicked(MyGUI::Widget* _sender)
|
||||||
{
|
{
|
||||||
std::vector<MyGUI::ButtonPtr>::const_iterator end = mButtons.end();
|
std::vector<MyGUI::Button*>::const_iterator end = mButtons.end();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (std::vector<MyGUI::ButtonPtr>::const_iterator it = mButtons.begin(); it != end; ++it)
|
for (std::vector<MyGUI::Button*>::const_iterator it = mButtons.begin(); it != end; ++it)
|
||||||
{
|
{
|
||||||
if (*it == _sender)
|
if (*it == _sender)
|
||||||
{
|
{
|
||||||
@ -376,10 +376,10 @@ ClassChoiceDialog::ClassChoiceDialog(MWBase::WindowManager& parWindowManager)
|
|||||||
|
|
||||||
CreateClassDialog::CreateClassDialog(MWBase::WindowManager& parWindowManager)
|
CreateClassDialog::CreateClassDialog(MWBase::WindowManager& parWindowManager)
|
||||||
: WindowModal("openmw_chargen_create_class.layout", parWindowManager)
|
: WindowModal("openmw_chargen_create_class.layout", parWindowManager)
|
||||||
, mSpecDialog(nullptr)
|
, mSpecDialog(NULL)
|
||||||
, mAttribDialog(nullptr)
|
, mAttribDialog(NULL)
|
||||||
, mSkillDialog(nullptr)
|
, mSkillDialog(NULL)
|
||||||
, mDescDialog(nullptr)
|
, mDescDialog(NULL)
|
||||||
{
|
{
|
||||||
// Centre dialog
|
// Centre dialog
|
||||||
center();
|
center();
|
||||||
@ -420,15 +420,15 @@ CreateClassDialog::CreateClassDialog(MWBase::WindowManager& parWindowManager)
|
|||||||
// Make sure the edit box has focus
|
// Make sure the edit box has focus
|
||||||
MyGUI::InputManager::getInstance().setKeyFocusWidget(mEditName);
|
MyGUI::InputManager::getInstance().setKeyFocusWidget(mEditName);
|
||||||
|
|
||||||
MyGUI::ButtonPtr descriptionButton;
|
MyGUI::Button* descriptionButton;
|
||||||
getWidget(descriptionButton, "DescriptionButton");
|
getWidget(descriptionButton, "DescriptionButton");
|
||||||
descriptionButton->eventMouseButtonClick += MyGUI::newDelegate(this, &CreateClassDialog::onDescriptionClicked);
|
descriptionButton->eventMouseButtonClick += MyGUI::newDelegate(this, &CreateClassDialog::onDescriptionClicked);
|
||||||
|
|
||||||
MyGUI::ButtonPtr backButton;
|
MyGUI::Button* backButton;
|
||||||
getWidget(backButton, "BackButton");
|
getWidget(backButton, "BackButton");
|
||||||
backButton->eventMouseButtonClick += MyGUI::newDelegate(this, &CreateClassDialog::onBackClicked);
|
backButton->eventMouseButtonClick += MyGUI::newDelegate(this, &CreateClassDialog::onBackClicked);
|
||||||
|
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::Button* okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &CreateClassDialog::onOkClicked);
|
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &CreateClassDialog::onOkClicked);
|
||||||
|
|
||||||
@ -518,7 +518,7 @@ std::vector<ESM::Skill::SkillEnum> CreateClassDialog::getMinorSkills() const
|
|||||||
|
|
||||||
void CreateClassDialog::setNextButtonShow(bool shown)
|
void CreateClassDialog::setNextButtonShow(bool shown)
|
||||||
{
|
{
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::Button* okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
|
|
||||||
if (shown)
|
if (shown)
|
||||||
@ -544,7 +544,7 @@ void CreateClassDialog::onDialogCancel()
|
|||||||
mDescDialog = 0;
|
mDescDialog = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateClassDialog::onSpecializationClicked(MyGUI::WidgetPtr _sender)
|
void CreateClassDialog::onSpecializationClicked(MyGUI::Widget* _sender)
|
||||||
{
|
{
|
||||||
delete mSpecDialog;
|
delete mSpecDialog;
|
||||||
mSpecDialog = new SelectSpecializationDialog(mWindowManager);
|
mSpecDialog = new SelectSpecializationDialog(mWindowManager);
|
||||||
@ -694,7 +694,7 @@ SelectSpecializationDialog::SelectSpecializationDialog(MWBase::WindowManager& pa
|
|||||||
ToolTips::createSpecializationToolTip(mSpecialization1, magic, ESM::Class::Magic);
|
ToolTips::createSpecializationToolTip(mSpecialization1, magic, ESM::Class::Magic);
|
||||||
ToolTips::createSpecializationToolTip(mSpecialization2, stealth, ESM::Class::Stealth);
|
ToolTips::createSpecializationToolTip(mSpecialization2, stealth, ESM::Class::Stealth);
|
||||||
|
|
||||||
MyGUI::ButtonPtr cancelButton;
|
MyGUI::Button* cancelButton;
|
||||||
getWidget(cancelButton, "CancelButton");
|
getWidget(cancelButton, "CancelButton");
|
||||||
cancelButton->setCaption(mWindowManager.getGameSettingString("sCancel", ""));
|
cancelButton->setCaption(mWindowManager.getGameSettingString("sCancel", ""));
|
||||||
cancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SelectSpecializationDialog::onCancelClicked);
|
cancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SelectSpecializationDialog::onCancelClicked);
|
||||||
@ -706,7 +706,7 @@ SelectSpecializationDialog::~SelectSpecializationDialog()
|
|||||||
|
|
||||||
// widget controls
|
// widget controls
|
||||||
|
|
||||||
void SelectSpecializationDialog::onSpecializationClicked(MyGUI::WidgetPtr _sender)
|
void SelectSpecializationDialog::onSpecializationClicked(MyGUI::Widget* _sender)
|
||||||
{
|
{
|
||||||
if (_sender == mSpecialization0)
|
if (_sender == mSpecialization0)
|
||||||
mSpecializationId = ESM::Class::Combat;
|
mSpecializationId = ESM::Class::Combat;
|
||||||
@ -747,7 +747,7 @@ SelectAttributeDialog::SelectAttributeDialog(MWBase::WindowManager& parWindowMan
|
|||||||
ToolTips::createAttributeToolTip(attribute, attribute->getAttributeId());
|
ToolTips::createAttributeToolTip(attribute, attribute->getAttributeId());
|
||||||
}
|
}
|
||||||
|
|
||||||
MyGUI::ButtonPtr cancelButton;
|
MyGUI::Button* cancelButton;
|
||||||
getWidget(cancelButton, "CancelButton");
|
getWidget(cancelButton, "CancelButton");
|
||||||
cancelButton->setCaption(mWindowManager.getGameSettingString("sCancel", ""));
|
cancelButton->setCaption(mWindowManager.getGameSettingString("sCancel", ""));
|
||||||
cancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SelectAttributeDialog::onCancelClicked);
|
cancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SelectAttributeDialog::onCancelClicked);
|
||||||
@ -840,7 +840,7 @@ SelectSkillDialog::SelectSkillDialog(MWBase::WindowManager& parWindowManager)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MyGUI::ButtonPtr cancelButton;
|
MyGUI::Button* cancelButton;
|
||||||
getWidget(cancelButton, "CancelButton");
|
getWidget(cancelButton, "CancelButton");
|
||||||
cancelButton->setCaption(mWindowManager.getGameSettingString("sCancel", ""));
|
cancelButton->setCaption(mWindowManager.getGameSettingString("sCancel", ""));
|
||||||
cancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SelectSkillDialog::onCancelClicked);
|
cancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SelectSkillDialog::onCancelClicked);
|
||||||
@ -873,7 +873,7 @@ DescriptionDialog::DescriptionDialog(MWBase::WindowManager& parWindowManager)
|
|||||||
|
|
||||||
getWidget(mTextEdit, "TextEdit");
|
getWidget(mTextEdit, "TextEdit");
|
||||||
|
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::Button* okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &DescriptionDialog::onOkClicked);
|
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &DescriptionDialog::onOkClicked);
|
||||||
okButton->setCaption(mWindowManager.getGameSettingString("sInputMenu1", ""));
|
okButton->setCaption(mWindowManager.getGameSettingString("sInputMenu1", ""));
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef MWGUI_CLASS_H
|
#ifndef MWGUI_CLASS_H
|
||||||
#define MWGUI_CLASS_H
|
#define MWGUI_CLASS_H
|
||||||
|
|
||||||
#include <MyGUI.h>
|
|
||||||
#include "widgets.hpp"
|
#include "widgets.hpp"
|
||||||
#include "window_base.hpp"
|
#include "window_base.hpp"
|
||||||
|
|
||||||
@ -35,17 +35,17 @@ namespace MWGui
|
|||||||
EventHandle_Int eventButtonSelected;
|
EventHandle_Int eventButtonSelected;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void onButtonClicked(MyGUI::WidgetPtr _sender);
|
void onButtonClicked(MyGUI::Widget* _sender);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void fitToText(MyGUI::TextBox* widget);
|
void fitToText(MyGUI::TextBox* widget);
|
||||||
void layoutVertically(MyGUI::WidgetPtr widget, int margin);
|
void layoutVertically(MyGUI::Widget* widget, int margin);
|
||||||
int mCurrentButton;
|
int mCurrentButton;
|
||||||
MyGUI::WidgetPtr mTextBox;
|
MyGUI::Widget* mTextBox;
|
||||||
MyGUI::TextBox* mText;
|
MyGUI::TextBox* mText;
|
||||||
MyGUI::WidgetPtr mButtonBar;
|
MyGUI::Widget* mButtonBar;
|
||||||
std::vector<MyGUI::ButtonPtr> mButtons;
|
std::vector<MyGUI::Button*> mButtons;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Lets the player choose between 3 ways of creating a class
|
// Lets the player choose between 3 ways of creating a class
|
||||||
@ -235,7 +235,7 @@ namespace MWGui
|
|||||||
void onOkClicked(MyGUI::Widget* _sender);
|
void onOkClicked(MyGUI::Widget* _sender);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MyGUI::EditPtr mTextEdit;
|
MyGUI::EditBox* mTextEdit;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CreateClassDialog : public WindowModal
|
class CreateClassDialog : public WindowModal
|
||||||
@ -265,7 +265,7 @@ namespace MWGui
|
|||||||
void onOkClicked(MyGUI::Widget* _sender);
|
void onOkClicked(MyGUI::Widget* _sender);
|
||||||
void onBackClicked(MyGUI::Widget* _sender);
|
void onBackClicked(MyGUI::Widget* _sender);
|
||||||
|
|
||||||
void onSpecializationClicked(MyGUI::WidgetPtr _sender);
|
void onSpecializationClicked(MyGUI::Widget* _sender);
|
||||||
void onSpecializationSelected();
|
void onSpecializationSelected();
|
||||||
void onAttributeClicked(Widgets::MWAttributePtr _sender);
|
void onAttributeClicked(Widgets::MWAttributePtr _sender);
|
||||||
void onAttributeSelected();
|
void onAttributeSelected();
|
||||||
@ -280,7 +280,7 @@ namespace MWGui
|
|||||||
void update();
|
void update();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MyGUI::EditPtr mEditName;
|
MyGUI::EditBox* mEditName;
|
||||||
MyGUI::TextBox* mSpecializationName;
|
MyGUI::TextBox* mSpecializationName;
|
||||||
Widgets::MWAttributePtr mFavoriteAttribute0, mFavoriteAttribute1;
|
Widgets::MWAttributePtr mFavoriteAttribute0, mFavoriteAttribute1;
|
||||||
Widgets::MWSkillPtr mMajorSkill[5];
|
Widgets::MWSkillPtr mMajorSkill[5];
|
||||||
|
@ -216,7 +216,7 @@ namespace MWGui
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Console::keyPress(MyGUI::WidgetPtr _sender,
|
void Console::keyPress(MyGUI::Widget* _sender,
|
||||||
MyGUI::KeyCode key,
|
MyGUI::KeyCode key,
|
||||||
MyGUI::Char _char)
|
MyGUI::Char _char)
|
||||||
{
|
{
|
||||||
@ -266,7 +266,7 @@ namespace MWGui
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Console::acceptCommand(MyGUI::EditPtr _sender)
|
void Console::acceptCommand(MyGUI::EditBox* _sender)
|
||||||
{
|
{
|
||||||
const std::string &cm = command->getCaption();
|
const std::string &cm = command->getCaption();
|
||||||
if(cm.empty()) return;
|
if(cm.empty()) return;
|
||||||
|
@ -55,8 +55,8 @@ namespace MWGui
|
|||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MyGUI::EditPtr command;
|
MyGUI::EditBox* command;
|
||||||
MyGUI::EditPtr history;
|
MyGUI::EditBox* history;
|
||||||
|
|
||||||
typedef std::list<std::string> StringList;
|
typedef std::list<std::string> StringList;
|
||||||
|
|
||||||
@ -95,11 +95,11 @@ namespace MWGui
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void keyPress(MyGUI::WidgetPtr _sender,
|
void keyPress(MyGUI::Widget* _sender,
|
||||||
MyGUI::KeyCode key,
|
MyGUI::KeyCode key,
|
||||||
MyGUI::Char _char);
|
MyGUI::Char _char);
|
||||||
|
|
||||||
void acceptCommand(MyGUI::EditPtr _sender);
|
void acceptCommand(MyGUI::EditBox* _sender);
|
||||||
|
|
||||||
std::string complete( std::string input, std::vector<std::string> &matches );
|
std::string complete( std::string input, std::vector<std::string> &matches );
|
||||||
};
|
};
|
||||||
|
@ -14,7 +14,7 @@ namespace MWGui
|
|||||||
|
|
||||||
|
|
||||||
ResourceImageSetPointerFix::ResourceImageSetPointerFix() :
|
ResourceImageSetPointerFix::ResourceImageSetPointerFix() :
|
||||||
mImageSet(nullptr)
|
mImageSet(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ namespace MWGui
|
|||||||
|
|
||||||
void ResourceImageSetPointerFix::setImage(MyGUI::ImageBox* _image)
|
void ResourceImageSetPointerFix::setImage(MyGUI::ImageBox* _image)
|
||||||
{
|
{
|
||||||
if (mImageSet != nullptr)
|
if (mImageSet != NULL)
|
||||||
_image->setItemResourceInfo(mImageSet->getIndexInfo(0, 0));
|
_image->setItemResourceInfo(mImageSet->getIndexInfo(0, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ DialogueWindow::DialogueWindow(MWBase::WindowManager& parWindowManager)
|
|||||||
getWidget(mTopicsList, "TopicsList");
|
getWidget(mTopicsList, "TopicsList");
|
||||||
mTopicsList->eventItemSelected += MyGUI::newDelegate(this, &DialogueWindow::onSelectTopic);
|
mTopicsList->eventItemSelected += MyGUI::newDelegate(this, &DialogueWindow::onSelectTopic);
|
||||||
|
|
||||||
MyGUI::ButtonPtr byeButton;
|
MyGUI::Button* byeButton;
|
||||||
getWidget(byeButton, "ByeButton");
|
getWidget(byeButton, "ByeButton");
|
||||||
byeButton->eventMouseButtonClick += MyGUI::newDelegate(this, &DialogueWindow::onByeClicked);
|
byeButton->eventMouseButtonClick += MyGUI::newDelegate(this, &DialogueWindow::onByeClicked);
|
||||||
|
|
||||||
@ -164,7 +164,7 @@ DialogueWindow::DialogueWindow(MWBase::WindowManager& parWindowManager)
|
|||||||
void DialogueWindow::onHistoryClicked(MyGUI::Widget* _sender)
|
void DialogueWindow::onHistoryClicked(MyGUI::Widget* _sender)
|
||||||
{
|
{
|
||||||
MyGUI::ISubWidgetText* t = mHistory->getClient()->getSubWidgetText();
|
MyGUI::ISubWidgetText* t = mHistory->getClient()->getSubWidgetText();
|
||||||
if(t == nullptr)
|
if(t == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const MyGUI::IntPoint& lastPressed = MyGUI::InputManager::getInstance().getLastPressedPosition(MyGUI::MouseButton::Left);
|
const MyGUI::IntPoint& lastPressed = MyGUI::InputManager::getInstance().getLastPressedPosition(MyGUI::MouseButton::Left);
|
||||||
@ -381,7 +381,7 @@ std::string DialogueWindow::parseText(const std::string& text)
|
|||||||
std::vector<MWDialogue::HyperTextToken> hypertext = MWDialogue::ParseHyperText(text);
|
std::vector<MWDialogue::HyperTextToken> hypertext = MWDialogue::ParseHyperText(text);
|
||||||
|
|
||||||
size_t historySize = 0;
|
size_t historySize = 0;
|
||||||
if(mHistory->getClient()->getSubWidgetText() != nullptr)
|
if(mHistory->getClient()->getSubWidgetText() != NULL)
|
||||||
{
|
{
|
||||||
historySize = mHistory->getOnlyText().size();
|
historySize = mHistory->getOnlyText().size();
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ namespace MWGui
|
|||||||
DialogueHistory* mHistory;
|
DialogueHistory* mHistory;
|
||||||
Widgets::MWList* mTopicsList;
|
Widgets::MWList* mTopicsList;
|
||||||
MyGUI::ProgressPtr mDispositionBar;
|
MyGUI::ProgressPtr mDispositionBar;
|
||||||
MyGUI::EditPtr mDispositionText;
|
MyGUI::EditBox* mDispositionText;
|
||||||
|
|
||||||
PersuasionDialog mPersuasionDialog;
|
PersuasionDialog mPersuasionDialog;
|
||||||
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
#include "exposedwindow.hpp"
|
#include "exposedwindow.hpp"
|
||||||
|
|
||||||
#include "MyGUI_Window.h"
|
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
MyGUI::VectorWidgetPtr ExposedWindow::getSkinWidgetsByName (const std::string &name)
|
MyGUI::VectorWidgetPtr ExposedWindow::getSkinWidgetsByName (const std::string &name)
|
||||||
@ -16,7 +14,7 @@ namespace MWGui
|
|||||||
if (widgets.empty())
|
if (widgets.empty())
|
||||||
{
|
{
|
||||||
MYGUI_ASSERT( ! _throw, "widget name '" << _name << "' not found in skin of layout '" << getName() << "'");
|
MYGUI_ASSERT( ! _throw, "widget name '" << _name << "' not found in skin of layout '" << getName() << "'");
|
||||||
return nullptr;
|
return NULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef MWGUI_EXPOSEDWINDOW_H
|
#ifndef MWGUI_EXPOSEDWINDOW_H
|
||||||
#define MWGUI_EXPOSEDWINDOW_H
|
#define MWGUI_EXPOSEDWINDOW_H
|
||||||
|
|
||||||
#include "MyGUI_Window.h"
|
#include <MyGUI_Window.h>
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
#include <MyGUI.h>
|
#include <MyGUI_Widget.h>
|
||||||
|
#include <MyGUI_RenderManager.h>
|
||||||
|
#include <MyGUI_PointerManager.h>
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
#include <boost/lexical_cast.hpp>
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ namespace MWGui
|
|||||||
|
|
||||||
MyGUI::Widget* mDummy;
|
MyGUI::Widget* mDummy;
|
||||||
|
|
||||||
MyGUI::WidgetPtr mFpsBox;
|
MyGUI::Widget* mFpsBox;
|
||||||
MyGUI::TextBox* mFpsCounter;
|
MyGUI::TextBox* mFpsCounter;
|
||||||
MyGUI::TextBox* mTriangleCounter;
|
MyGUI::TextBox* mTriangleCounter;
|
||||||
MyGUI::TextBox* mBatchCounter;
|
MyGUI::TextBox* mBatchCounter;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef MWGUI_IMAGEBUTTON_H
|
#ifndef MWGUI_IMAGEBUTTON_H
|
||||||
#define MWGUI_IMAGEBUTTON_H
|
#define MWGUI_IMAGEBUTTON_H
|
||||||
|
|
||||||
#include "MyGUI_ImageBox.h"
|
#include <MyGUI_ImageBox.h>
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
@ -29,8 +29,8 @@ namespace MWGui
|
|||||||
void notifyNextPage(MyGUI::Widget* _sender);
|
void notifyNextPage(MyGUI::Widget* _sender);
|
||||||
void notifyPrevPage(MyGUI::Widget* _sender);
|
void notifyPrevPage(MyGUI::Widget* _sender);
|
||||||
|
|
||||||
MyGUI::EditPtr mLeftTextWidget;
|
MyGUI::EditBox* mLeftTextWidget;
|
||||||
MyGUI::EditPtr mRightTextWidget;
|
MyGUI::EditBox* mRightTextWidget;
|
||||||
MWGui::ImageButton* mPrevBtn;
|
MWGui::ImageButton* mPrevBtn;
|
||||||
MWGui::ImageButton* mNextBtn;
|
MWGui::ImageButton* mNextBtn;
|
||||||
std::vector<std::string> mLeftPages;
|
std::vector<std::string> mLeftPages;
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
#include "list.hpp"
|
#include "list.hpp"
|
||||||
|
|
||||||
#include <MyGUI.h>
|
#include <MyGUI_ScrollView.h>
|
||||||
|
#include <MyGUI_Gui.h>
|
||||||
|
#include <MyGUI_Button.h>
|
||||||
|
#include <MyGUI_ImageBox.h>
|
||||||
|
|
||||||
using namespace MWGui;
|
using namespace MWGui;
|
||||||
using namespace MWGui::Widgets;
|
using namespace MWGui::Widgets;
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
#ifndef MWGUI_LIST_HPP
|
#ifndef MWGUI_LIST_HPP
|
||||||
#define MWGUI_LIST_HPP
|
#define MWGUI_LIST_HPP
|
||||||
|
|
||||||
#include <MyGUI.h>
|
#include <MyGUI_Widget.h>
|
||||||
|
|
||||||
|
namespace MyGUI
|
||||||
|
{
|
||||||
|
class ScrollView;
|
||||||
|
}
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
@ -247,7 +247,7 @@ InteractiveMessageBox::InteractiveMessageBox(MessageBoxManager& parMessageBoxMan
|
|||||||
std::vector<std::string>::const_iterator it;
|
std::vector<std::string>::const_iterator it;
|
||||||
for(it = buttons.begin(); it != buttons.end(); ++it)
|
for(it = buttons.begin(); it != buttons.end(); ++it)
|
||||||
{
|
{
|
||||||
MyGUI::ButtonPtr button = mButtonsWidget->createWidget<MyGUI::Button>(
|
MyGUI::Button* button = mButtonsWidget->createWidget<MyGUI::Button>(
|
||||||
MyGUI::WidgetStyle::Child,
|
MyGUI::WidgetStyle::Child,
|
||||||
std::string("MW_Button"),
|
std::string("MW_Button"),
|
||||||
dummyCoord,
|
dummyCoord,
|
||||||
@ -301,7 +301,7 @@ InteractiveMessageBox::InteractiveMessageBox(MessageBoxManager& parMessageBoxMan
|
|||||||
MyGUI::IntSize buttonSize(0, buttonHeight);
|
MyGUI::IntSize buttonSize(0, buttonHeight);
|
||||||
int left = (mainWidgetSize.width - buttonsWidth)/2 + buttonPadding;
|
int left = (mainWidgetSize.width - buttonsWidth)/2 + buttonPadding;
|
||||||
|
|
||||||
std::vector<MyGUI::ButtonPtr>::const_iterator button;
|
std::vector<MyGUI::Button*>::const_iterator button;
|
||||||
for(button = mButtons.begin(); button != mButtons.end(); ++button)
|
for(button = mButtons.begin(); button != mButtons.end(); ++button)
|
||||||
{
|
{
|
||||||
buttonCord.left = left;
|
buttonCord.left = left;
|
||||||
@ -349,7 +349,7 @@ InteractiveMessageBox::InteractiveMessageBox(MessageBoxManager& parMessageBoxMan
|
|||||||
|
|
||||||
int top = textButtonPadding + buttonTopPadding + textSize.height;
|
int top = textButtonPadding + buttonTopPadding + textSize.height;
|
||||||
|
|
||||||
std::vector<MyGUI::ButtonPtr>::const_iterator button;
|
std::vector<MyGUI::Button*>::const_iterator button;
|
||||||
for(button = mButtons.begin(); button != mButtons.end(); ++button)
|
for(button = mButtons.begin(); button != mButtons.end(); ++button)
|
||||||
{
|
{
|
||||||
buttonSize.width = (*button)->getTextSize().width + buttonPadding*2;
|
buttonSize.width = (*button)->getTextSize().width + buttonPadding*2;
|
||||||
@ -371,7 +371,7 @@ void InteractiveMessageBox::enterPressed()
|
|||||||
{
|
{
|
||||||
|
|
||||||
std::string ok = Misc::StringUtils::lowerCase(MyGUI::LanguageManager::getInstance().replaceTags("#{sOK}"));
|
std::string ok = Misc::StringUtils::lowerCase(MyGUI::LanguageManager::getInstance().replaceTags("#{sOK}"));
|
||||||
std::vector<MyGUI::ButtonPtr>::const_iterator button;
|
std::vector<MyGUI::Button*>::const_iterator button;
|
||||||
for(button = mButtons.begin(); button != mButtons.end(); ++button)
|
for(button = mButtons.begin(); button != mButtons.end(); ++button)
|
||||||
{
|
{
|
||||||
if(Misc::StringUtils::lowerCase((*button)->getCaption()) == ok)
|
if(Misc::StringUtils::lowerCase((*button)->getCaption()) == ok)
|
||||||
@ -393,7 +393,7 @@ void InteractiveMessageBox::buttonActivated (MyGUI::Widget* pressed)
|
|||||||
{
|
{
|
||||||
mMarkedToDelete = true;
|
mMarkedToDelete = true;
|
||||||
int index = 0;
|
int index = 0;
|
||||||
std::vector<MyGUI::ButtonPtr>::const_iterator button;
|
std::vector<MyGUI::Button*>::const_iterator button;
|
||||||
for(button = mButtons.begin(); button != mButtons.end(); ++button)
|
for(button = mButtons.begin(); button != mButtons.end(); ++button)
|
||||||
{
|
{
|
||||||
if(*button == pressed)
|
if(*button == pressed)
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
#define MWGUI_MESSAGE_BOX_H
|
#define MWGUI_MESSAGE_BOX_H
|
||||||
|
|
||||||
#include <openengine/gui/layout.hpp>
|
#include <openengine/gui/layout.hpp>
|
||||||
#include <MyGUI.h>
|
|
||||||
|
|
||||||
#include "window_base.hpp"
|
#include "window_base.hpp"
|
||||||
|
|
||||||
@ -10,6 +9,13 @@
|
|||||||
|
|
||||||
#undef MessageBox
|
#undef MessageBox
|
||||||
|
|
||||||
|
namespace MyGUI
|
||||||
|
{
|
||||||
|
class Widget;
|
||||||
|
class Button;
|
||||||
|
class EditBox;
|
||||||
|
}
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
class InteractiveMessageBox;
|
class InteractiveMessageBox;
|
||||||
@ -61,7 +67,7 @@ namespace MWGui
|
|||||||
MessageBoxManager& mMessageBoxManager;
|
MessageBoxManager& mMessageBoxManager;
|
||||||
int mHeight;
|
int mHeight;
|
||||||
const std::string& mMessage;
|
const std::string& mMessage;
|
||||||
MyGUI::EditPtr mMessageWidget;
|
MyGUI::EditBox* mMessageWidget;
|
||||||
int mFixedWidth;
|
int mFixedWidth;
|
||||||
int mBottomPadding;
|
int mBottomPadding;
|
||||||
int mNextBoxPadding;
|
int mNextBoxPadding;
|
||||||
@ -81,9 +87,9 @@ namespace MWGui
|
|||||||
void buttonActivated (MyGUI::Widget* _widget);
|
void buttonActivated (MyGUI::Widget* _widget);
|
||||||
|
|
||||||
MessageBoxManager& mMessageBoxManager;
|
MessageBoxManager& mMessageBoxManager;
|
||||||
MyGUI::EditPtr mMessageWidget;
|
MyGUI::EditBox* mMessageWidget;
|
||||||
MyGUI::WidgetPtr mButtonsWidget;
|
MyGUI::Widget* mButtonsWidget;
|
||||||
std::vector<MyGUI::ButtonPtr> mButtons;
|
std::vector<MyGUI::Button*> mButtons;
|
||||||
|
|
||||||
int mTextButtonPadding;
|
int mTextButtonPadding;
|
||||||
int mButtonPressed;
|
int mButtonPressed;
|
||||||
|
@ -41,7 +41,7 @@ RaceDialog::RaceDialog(MWBase::WindowManager& parWindowManager)
|
|||||||
mHeadRotate->eventScrollChangePosition += MyGUI::newDelegate(this, &RaceDialog::onHeadRotate);
|
mHeadRotate->eventScrollChangePosition += MyGUI::newDelegate(this, &RaceDialog::onHeadRotate);
|
||||||
|
|
||||||
// Set up next/previous buttons
|
// Set up next/previous buttons
|
||||||
MyGUI::ButtonPtr prevButton, nextButton;
|
MyGUI::Button *prevButton, *nextButton;
|
||||||
|
|
||||||
setText("GenderChoiceT", mWindowManager.getGameSettingString("sRaceMenu2", "Change Sex"));
|
setText("GenderChoiceT", mWindowManager.getGameSettingString("sRaceMenu2", "Change Sex"));
|
||||||
getWidget(prevButton, "PrevGenderButton");
|
getWidget(prevButton, "PrevGenderButton");
|
||||||
@ -73,11 +73,11 @@ RaceDialog::RaceDialog(MWBase::WindowManager& parWindowManager)
|
|||||||
setText("SpellPowerT", mWindowManager.getGameSettingString("sRaceMenu7", "Specials"));
|
setText("SpellPowerT", mWindowManager.getGameSettingString("sRaceMenu7", "Specials"));
|
||||||
getWidget(mSpellPowerList, "SpellPowerList");
|
getWidget(mSpellPowerList, "SpellPowerList");
|
||||||
|
|
||||||
MyGUI::ButtonPtr backButton;
|
MyGUI::Button* backButton;
|
||||||
getWidget(backButton, "BackButton");
|
getWidget(backButton, "BackButton");
|
||||||
backButton->eventMouseButtonClick += MyGUI::newDelegate(this, &RaceDialog::onBackClicked);
|
backButton->eventMouseButtonClick += MyGUI::newDelegate(this, &RaceDialog::onBackClicked);
|
||||||
|
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::Button* okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
|
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
|
||||||
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &RaceDialog::onOkClicked);
|
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &RaceDialog::onOkClicked);
|
||||||
@ -89,7 +89,7 @@ RaceDialog::RaceDialog(MWBase::WindowManager& parWindowManager)
|
|||||||
|
|
||||||
void RaceDialog::setNextButtonShow(bool shown)
|
void RaceDialog::setNextButtonShow(bool shown)
|
||||||
{
|
{
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::Button* okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
|
|
||||||
if (shown)
|
if (shown)
|
||||||
@ -134,7 +134,7 @@ void RaceDialog::setRaceId(const std::string &raceId)
|
|||||||
if (boost::iequals(*mRaceList->getItemDataAt<std::string>(i), raceId))
|
if (boost::iequals(*mRaceList->getItemDataAt<std::string>(i), raceId))
|
||||||
{
|
{
|
||||||
mRaceList->setIndexSelected(i);
|
mRaceList->setIndexSelected(i);
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::Button* okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -256,7 +256,7 @@ void RaceDialog::onSelectRace(MyGUI::ListBox* _sender, size_t _index)
|
|||||||
if (_index == MyGUI::ITEM_NONE)
|
if (_index == MyGUI::ITEM_NONE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::Button* okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
const std::string *raceId = mRaceList->getItemDataAt<std::string>(_index);
|
const std::string *raceId = mRaceList->getItemDataAt<std::string>(_index);
|
||||||
if (boost::iequals(mCurrentRaceId, *raceId))
|
if (boost::iequals(mCurrentRaceId, *raceId))
|
||||||
@ -331,7 +331,7 @@ void RaceDialog::updateRaces()
|
|||||||
|
|
||||||
void RaceDialog::updateSkills()
|
void RaceDialog::updateSkills()
|
||||||
{
|
{
|
||||||
for (std::vector<MyGUI::WidgetPtr>::iterator it = mSkillItems.begin(); it != mSkillItems.end(); ++it)
|
for (std::vector<MyGUI::Widget*>::iterator it = mSkillItems.begin(); it != mSkillItems.end(); ++it)
|
||||||
{
|
{
|
||||||
MyGUI::Gui::getInstance().destroyWidget(*it);
|
MyGUI::Gui::getInstance().destroyWidget(*it);
|
||||||
}
|
}
|
||||||
@ -369,7 +369,7 @@ void RaceDialog::updateSkills()
|
|||||||
|
|
||||||
void RaceDialog::updateSpellPowers()
|
void RaceDialog::updateSpellPowers()
|
||||||
{
|
{
|
||||||
for (std::vector<MyGUI::WidgetPtr>::iterator it = mSpellPowerItems.begin(); it != mSpellPowerItems.end(); ++it)
|
for (std::vector<MyGUI::Widget*>::iterator it = mSpellPowerItems.begin(); it != mSpellPowerItems.end(); ++it)
|
||||||
{
|
{
|
||||||
MyGUI::Gui::getInstance().destroyWidget(*it);
|
MyGUI::Gui::getInstance().destroyWidget(*it);
|
||||||
}
|
}
|
||||||
|
@ -85,11 +85,11 @@ namespace MWGui
|
|||||||
MyGUI::ListBox* mRaceList;
|
MyGUI::ListBox* mRaceList;
|
||||||
MyGUI::ScrollBar* mHeadRotate;
|
MyGUI::ScrollBar* mHeadRotate;
|
||||||
|
|
||||||
MyGUI::WidgetPtr mSkillList;
|
MyGUI::Widget* mSkillList;
|
||||||
std::vector<MyGUI::WidgetPtr> mSkillItems;
|
std::vector<MyGUI::Widget*> mSkillItems;
|
||||||
|
|
||||||
MyGUI::WidgetPtr mSpellPowerList;
|
MyGUI::Widget* mSpellPowerList;
|
||||||
std::vector<MyGUI::WidgetPtr> mSpellPowerItems;
|
std::vector<MyGUI::Widget*> mSpellPowerItems;
|
||||||
|
|
||||||
int mGenderIndex, mFaceIndex, mHairIndex;
|
int mGenderIndex, mFaceIndex, mHairIndex;
|
||||||
int mFaceCount, mHairCount;
|
int mFaceCount, mHairCount;
|
||||||
|
@ -86,11 +86,11 @@ ReviewDialog::ReviewDialog(MWBase::WindowManager& parWindowManager)
|
|||||||
mSkillWidgetMap.insert(std::make_pair(i, static_cast<MyGUI::TextBox*> (0)));
|
mSkillWidgetMap.insert(std::make_pair(i, static_cast<MyGUI::TextBox*> (0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
MyGUI::ButtonPtr backButton;
|
MyGUI::Button* backButton;
|
||||||
getWidget(backButton, "BackButton");
|
getWidget(backButton, "BackButton");
|
||||||
backButton->eventMouseButtonClick += MyGUI::newDelegate(this, &ReviewDialog::onBackClicked);
|
backButton->eventMouseButtonClick += MyGUI::newDelegate(this, &ReviewDialog::onBackClicked);
|
||||||
|
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::Button* okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &ReviewDialog::onOkClicked);
|
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &ReviewDialog::onOkClicked);
|
||||||
}
|
}
|
||||||
@ -309,7 +309,7 @@ void ReviewDialog::addSkills(const SkillList &skills, const std::string &titleId
|
|||||||
|
|
||||||
void ReviewDialog::updateSkillArea()
|
void ReviewDialog::updateSkillArea()
|
||||||
{
|
{
|
||||||
for (std::vector<MyGUI::WidgetPtr>::iterator it = mSkillWidgets.begin(); it != mSkillWidgets.end(); ++it)
|
for (std::vector<MyGUI::Widget*>::iterator it = mSkillWidgets.begin(); it != mSkillWidgets.end(); ++it)
|
||||||
{
|
{
|
||||||
MyGUI::Gui::getInstance().destroyWidget(*it);
|
MyGUI::Gui::getInstance().destroyWidget(*it);
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ namespace MWGui
|
|||||||
std::map<int, MyGUI::TextBox*> mSkillWidgetMap;
|
std::map<int, MyGUI::TextBox*> mSkillWidgetMap;
|
||||||
std::string mName, mRaceId, mBirthSignId;
|
std::string mName, mRaceId, mBirthSignId;
|
||||||
ESM::Class mKlass;
|
ESM::Class mKlass;
|
||||||
std::vector<MyGUI::WidgetPtr> mSkillWidgets; //< Skills and other information
|
std::vector<MyGUI::Widget*> mSkillWidgets; //< Skills and other information
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -67,7 +67,7 @@ StatsWindow::StatsWindow (MWBase::WindowManager& parWindowManager)
|
|||||||
for (int i = 0; i < ESM::Skill::Length; ++i)
|
for (int i = 0; i < ESM::Skill::Length; ++i)
|
||||||
{
|
{
|
||||||
mSkillValues.insert(std::pair<int, MWMechanics::Stat<float> >(i, MWMechanics::Stat<float>()));
|
mSkillValues.insert(std::pair<int, MWMechanics::Stat<float> >(i, MWMechanics::Stat<float>()));
|
||||||
mSkillWidgetMap.insert(std::pair<int, MyGUI::TextBox*>(i, (MyGUI::TextBox*)nullptr));
|
mSkillWidgetMap.insert(std::pair<int, MyGUI::TextBox*>(i, (MyGUI::TextBox*)NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
MyGUI::WindowPtr t = static_cast<MyGUI::WindowPtr>(mMainWidget);
|
MyGUI::WindowPtr t = static_cast<MyGUI::WindowPtr>(mMainWidget);
|
||||||
@ -419,7 +419,7 @@ void StatsWindow::updateSkillArea()
|
|||||||
{
|
{
|
||||||
mChanged = false;
|
mChanged = false;
|
||||||
|
|
||||||
for (std::vector<MyGUI::WidgetPtr>::iterator it = mSkillWidgets.begin(); it != mSkillWidgets.end(); ++it)
|
for (std::vector<MyGUI::Widget*>::iterator it = mSkillWidgets.begin(); it != mSkillWidgets.end(); ++it)
|
||||||
{
|
{
|
||||||
MyGUI::Gui::getInstance().destroyWidget(*it);
|
MyGUI::Gui::getInstance().destroyWidget(*it);
|
||||||
}
|
}
|
||||||
|
@ -67,11 +67,11 @@ namespace MWGui
|
|||||||
SkillList mMajorSkills, mMinorSkills, mMiscSkills;
|
SkillList mMajorSkills, mMinorSkills, mMiscSkills;
|
||||||
std::map<int, MWMechanics::Stat<float> > mSkillValues;
|
std::map<int, MWMechanics::Stat<float> > mSkillValues;
|
||||||
std::map<int, MyGUI::TextBox*> mSkillWidgetMap;
|
std::map<int, MyGUI::TextBox*> mSkillWidgetMap;
|
||||||
std::map<std::string, MyGUI::WidgetPtr> mFactionWidgetMap;
|
std::map<std::string, MyGUI::Widget*> mFactionWidgetMap;
|
||||||
FactionList mFactions; ///< Stores a list of factions and the current rank
|
FactionList mFactions; ///< Stores a list of factions and the current rank
|
||||||
std::string mBirthSignId;
|
std::string mBirthSignId;
|
||||||
int mReputation, mBounty;
|
int mReputation, mBounty;
|
||||||
std::vector<MyGUI::WidgetPtr> mSkillWidgets; //< Skills and other information
|
std::vector<MyGUI::Widget*> mSkillWidgets; //< Skills and other information
|
||||||
std::set<std::string> mExpelled;
|
std::set<std::string> mExpelled;
|
||||||
|
|
||||||
bool mChanged;
|
bool mChanged;
|
||||||
|
@ -13,7 +13,7 @@ TextInputDialog::TextInputDialog(MWBase::WindowManager& parWindowManager)
|
|||||||
getWidget(mTextEdit, "TextEdit");
|
getWidget(mTextEdit, "TextEdit");
|
||||||
mTextEdit->eventEditSelectAccept += newDelegate(this, &TextInputDialog::onTextAccepted);
|
mTextEdit->eventEditSelectAccept += newDelegate(this, &TextInputDialog::onTextAccepted);
|
||||||
|
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::Button* okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &TextInputDialog::onOkClicked);
|
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &TextInputDialog::onOkClicked);
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ TextInputDialog::TextInputDialog(MWBase::WindowManager& parWindowManager)
|
|||||||
|
|
||||||
void TextInputDialog::setNextButtonShow(bool shown)
|
void TextInputDialog::setNextButtonShow(bool shown)
|
||||||
{
|
{
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::Button* okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
|
|
||||||
if (shown)
|
if (shown)
|
||||||
|
@ -30,7 +30,7 @@ namespace MWGui
|
|||||||
void onTextAccepted(MyGUI::Edit* _sender);
|
void onTextAccepted(MyGUI::Edit* _sender);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MyGUI::EditPtr mTextEdit;
|
MyGUI::EditBox* mTextEdit;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -439,7 +439,7 @@ IntSize ToolTips::createToolTip(const MWGui::ToolTipInfo& info)
|
|||||||
effectsWidget->setWindowManager(mWindowManager);
|
effectsWidget->setWindowManager(mWindowManager);
|
||||||
effectsWidget->setEffectList(info.effects);
|
effectsWidget->setEffectList(info.effects);
|
||||||
|
|
||||||
std::vector<MyGUI::WidgetPtr> effectItems;
|
std::vector<MyGUI::Widget*> effectItems;
|
||||||
effectsWidget->createEffectWidgets(effectItems, effectArea, coord, true, info.isPotion ? Widgets::MWEffectList::EF_NoTarget : 0);
|
effectsWidget->createEffectWidgets(effectItems, effectArea, coord, true, info.isPotion ? Widgets::MWEffectList::EF_NoTarget : 0);
|
||||||
totalSize.height += coord.top-6;
|
totalSize.height += coord.top-6;
|
||||||
totalSize.width = std::max(totalSize.width, coord.width);
|
totalSize.width = std::max(totalSize.width, coord.width);
|
||||||
@ -459,7 +459,7 @@ IntSize ToolTips::createToolTip(const MWGui::ToolTipInfo& info)
|
|||||||
enchantWidget->setWindowManager(mWindowManager);
|
enchantWidget->setWindowManager(mWindowManager);
|
||||||
enchantWidget->setEffectList(Widgets::MWEffectList::effectListFromESM(&enchant->mEffects));
|
enchantWidget->setEffectList(Widgets::MWEffectList::effectListFromESM(&enchant->mEffects));
|
||||||
|
|
||||||
std::vector<MyGUI::WidgetPtr> enchantEffectItems;
|
std::vector<MyGUI::Widget*> enchantEffectItems;
|
||||||
int flag = (enchant->mData.mType == ESM::Enchantment::ConstantEffect) ? Widgets::MWEffectList::EF_Constant : 0;
|
int flag = (enchant->mData.mType == ESM::Enchantment::ConstantEffect) ? Widgets::MWEffectList::EF_Constant : 0;
|
||||||
enchantWidget->createEffectWidgets(enchantEffectItems, enchantArea, coord, true, flag);
|
enchantWidget->createEffectWidgets(enchantEffectItems, enchantArea, coord, true, flag);
|
||||||
totalSize.height += coord.top-6;
|
totalSize.height += coord.top-6;
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
#include <boost/lexical_cast.hpp>
|
||||||
|
|
||||||
|
#include <MyGUI_ProgressBar.h>
|
||||||
|
#include <MyGUI_ImageBox.h>
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
@ -31,10 +34,10 @@ void MWGui::Widgets::fixTexturePath(std::string &path)
|
|||||||
/* MWSkill */
|
/* MWSkill */
|
||||||
|
|
||||||
MWSkill::MWSkill()
|
MWSkill::MWSkill()
|
||||||
: mManager(nullptr)
|
: mManager(NULL)
|
||||||
, mSkillId(ESM::Skill::Length)
|
, mSkillId(ESM::Skill::Length)
|
||||||
, mSkillNameWidget(nullptr)
|
, mSkillNameWidget(NULL)
|
||||||
, mSkillValueWidget(nullptr)
|
, mSkillValueWidget(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,7 +106,7 @@ void MWSkill::initialiseOverride()
|
|||||||
assignWidget(mSkillNameWidget, "StatName");
|
assignWidget(mSkillNameWidget, "StatName");
|
||||||
assignWidget(mSkillValueWidget, "StatValue");
|
assignWidget(mSkillValueWidget, "StatValue");
|
||||||
|
|
||||||
MyGUI::ButtonPtr button;
|
MyGUI::Button* button;
|
||||||
assignWidget(button, "StatNameButton");
|
assignWidget(button, "StatNameButton");
|
||||||
if (button)
|
if (button)
|
||||||
{
|
{
|
||||||
@ -123,10 +126,10 @@ void MWSkill::initialiseOverride()
|
|||||||
/* MWAttribute */
|
/* MWAttribute */
|
||||||
|
|
||||||
MWAttribute::MWAttribute()
|
MWAttribute::MWAttribute()
|
||||||
: mManager(nullptr)
|
: mManager(NULL)
|
||||||
, mId(-1)
|
, mId(-1)
|
||||||
, mAttributeNameWidget(nullptr)
|
, mAttributeNameWidget(NULL)
|
||||||
, mAttributeValueWidget(nullptr)
|
, mAttributeValueWidget(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,7 +198,7 @@ void MWAttribute::initialiseOverride()
|
|||||||
assignWidget(mAttributeNameWidget, "StatName");
|
assignWidget(mAttributeNameWidget, "StatName");
|
||||||
assignWidget(mAttributeValueWidget, "StatValue");
|
assignWidget(mAttributeValueWidget, "StatValue");
|
||||||
|
|
||||||
MyGUI::ButtonPtr button;
|
MyGUI::Button* button;
|
||||||
assignWidget(button, "StatNameButton");
|
assignWidget(button, "StatNameButton");
|
||||||
if (button)
|
if (button)
|
||||||
{
|
{
|
||||||
@ -215,8 +218,8 @@ void MWAttribute::initialiseOverride()
|
|||||||
/* MWSpell */
|
/* MWSpell */
|
||||||
|
|
||||||
MWSpell::MWSpell()
|
MWSpell::MWSpell()
|
||||||
: mWindowManager(nullptr)
|
: mWindowManager(NULL)
|
||||||
, mSpellNameWidget(nullptr)
|
, mSpellNameWidget(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,7 +229,7 @@ void MWSpell::setSpellId(const std::string &spellId)
|
|||||||
updateWidgets();
|
updateWidgets();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MWSpell::createEffectWidgets(std::vector<MyGUI::WidgetPtr> &effects, MyGUI::WidgetPtr creator, MyGUI::IntCoord &coord, int flags)
|
void MWSpell::createEffectWidgets(std::vector<MyGUI::Widget*> &effects, MyGUI::Widget* creator, MyGUI::IntCoord &coord, int flags)
|
||||||
{
|
{
|
||||||
const MWWorld::ESMStore &store =
|
const MWWorld::ESMStore &store =
|
||||||
MWBase::Environment::get().getWorld()->getStore();
|
MWBase::Environment::get().getWorld()->getStore();
|
||||||
@ -234,7 +237,7 @@ void MWSpell::createEffectWidgets(std::vector<MyGUI::WidgetPtr> &effects, MyGUI:
|
|||||||
const ESM::Spell *spell = store.get<ESM::Spell>().search(mId);
|
const ESM::Spell *spell = store.get<ESM::Spell>().search(mId);
|
||||||
MYGUI_ASSERT(spell, "spell with id '" << mId << "' not found");
|
MYGUI_ASSERT(spell, "spell with id '" << mId << "' not found");
|
||||||
|
|
||||||
MWSpellEffectPtr effect = nullptr;
|
MWSpellEffectPtr effect = NULL;
|
||||||
std::vector<ESM::ENAMstruct>::const_iterator end = spell->mEffects.mList.end();
|
std::vector<ESM::ENAMstruct>::const_iterator end = spell->mEffects.mList.end();
|
||||||
for (std::vector<ESM::ENAMstruct>::const_iterator it = spell->mEffects.mList.begin(); it != end; ++it)
|
for (std::vector<ESM::ENAMstruct>::const_iterator it = spell->mEffects.mList.begin(); it != end; ++it)
|
||||||
{
|
{
|
||||||
@ -286,7 +289,7 @@ MWSpell::~MWSpell()
|
|||||||
/* MWEffectList */
|
/* MWEffectList */
|
||||||
|
|
||||||
MWEffectList::MWEffectList()
|
MWEffectList::MWEffectList()
|
||||||
: mWindowManager(nullptr)
|
: mWindowManager(NULL)
|
||||||
, mEffectList(0)
|
, mEffectList(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -297,11 +300,11 @@ void MWEffectList::setEffectList(const SpellEffectList& list)
|
|||||||
updateWidgets();
|
updateWidgets();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MWEffectList::createEffectWidgets(std::vector<MyGUI::WidgetPtr> &effects, MyGUI::WidgetPtr creator, MyGUI::IntCoord &coord, bool center, int flags)
|
void MWEffectList::createEffectWidgets(std::vector<MyGUI::Widget*> &effects, MyGUI::Widget* creator, MyGUI::IntCoord &coord, bool center, int flags)
|
||||||
{
|
{
|
||||||
// We don't know the width of all the elements beforehand, so we do it in
|
// We don't know the width of all the elements beforehand, so we do it in
|
||||||
// 2 steps: first, create all widgets and check their width....
|
// 2 steps: first, create all widgets and check their width....
|
||||||
MWSpellEffectPtr effect = nullptr;
|
MWSpellEffectPtr effect = NULL;
|
||||||
int maxwidth = coord.width;
|
int maxwidth = coord.width;
|
||||||
|
|
||||||
for (SpellEffectList::iterator it=mEffectList.begin();
|
for (SpellEffectList::iterator it=mEffectList.begin();
|
||||||
@ -320,7 +323,7 @@ void MWEffectList::createEffectWidgets(std::vector<MyGUI::WidgetPtr> &effects, M
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ... then adjust the size for all widgets
|
// ... then adjust the size for all widgets
|
||||||
for (std::vector<MyGUI::WidgetPtr>::iterator it = effects.begin(); it != effects.end(); ++it)
|
for (std::vector<MyGUI::Widget*>::iterator it = effects.begin(); it != effects.end(); ++it)
|
||||||
{
|
{
|
||||||
effect = static_cast<MWSpellEffectPtr>(*it);
|
effect = static_cast<MWSpellEffectPtr>(*it);
|
||||||
bool needcenter = center && (maxwidth > effect->getRequestedWidth());
|
bool needcenter = center && (maxwidth > effect->getRequestedWidth());
|
||||||
@ -375,9 +378,9 @@ SpellEffectList MWEffectList::effectListFromESM(const ESM::EffectList* effects)
|
|||||||
/* MWSpellEffect */
|
/* MWSpellEffect */
|
||||||
|
|
||||||
MWSpellEffect::MWSpellEffect()
|
MWSpellEffect::MWSpellEffect()
|
||||||
: mWindowManager(nullptr)
|
: mWindowManager(NULL)
|
||||||
, mImageWidget(nullptr)
|
, mImageWidget(NULL)
|
||||||
, mTextWidget(nullptr)
|
, mTextWidget(NULL)
|
||||||
, mRequestedWidth(0)
|
, mRequestedWidth(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -495,9 +498,9 @@ void MWSpellEffect::initialiseOverride()
|
|||||||
MWDynamicStat::MWDynamicStat()
|
MWDynamicStat::MWDynamicStat()
|
||||||
: mValue(0)
|
: mValue(0)
|
||||||
, mMax(1)
|
, mMax(1)
|
||||||
, mTextWidget(nullptr)
|
, mTextWidget(NULL)
|
||||||
, mBarWidget(nullptr)
|
, mBarWidget(NULL)
|
||||||
, mBarTextWidget(nullptr)
|
, mBarTextWidget(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,11 +2,17 @@
|
|||||||
#define MWGUI_WIDGETS_H
|
#define MWGUI_WIDGETS_H
|
||||||
|
|
||||||
#include "../mwworld/esmstore.hpp"
|
#include "../mwworld/esmstore.hpp"
|
||||||
|
|
||||||
#include <MyGUI.h>
|
|
||||||
|
|
||||||
#include "../mwmechanics/stat.hpp"
|
#include "../mwmechanics/stat.hpp"
|
||||||
|
|
||||||
|
#include <MyGUI_Widget.h>
|
||||||
|
#include <MyGUI_TextBox.h>
|
||||||
|
#include <MyGUI_Button.h>
|
||||||
|
|
||||||
|
namespace MyGUI
|
||||||
|
{
|
||||||
|
class ImageBox;
|
||||||
|
}
|
||||||
|
|
||||||
namespace MWBase
|
namespace MWBase
|
||||||
{
|
{
|
||||||
class WindowManager;
|
class WindowManager;
|
||||||
@ -118,7 +124,8 @@ namespace MWGui
|
|||||||
MWBase::WindowManager *mManager;
|
MWBase::WindowManager *mManager;
|
||||||
ESM::Skill::SkillEnum mSkillId;
|
ESM::Skill::SkillEnum mSkillId;
|
||||||
SkillValue mValue;
|
SkillValue mValue;
|
||||||
MyGUI::WidgetPtr mSkillNameWidget, mSkillValueWidget;
|
MyGUI::Widget* mSkillNameWidget;
|
||||||
|
MyGUI::Widget* mSkillValueWidget;
|
||||||
};
|
};
|
||||||
typedef MWSkill* MWSkillPtr;
|
typedef MWSkill* MWSkillPtr;
|
||||||
|
|
||||||
@ -160,7 +167,8 @@ namespace MWGui
|
|||||||
MWBase::WindowManager *mManager;
|
MWBase::WindowManager *mManager;
|
||||||
int mId;
|
int mId;
|
||||||
AttributeValue mValue;
|
AttributeValue mValue;
|
||||||
MyGUI::WidgetPtr mAttributeNameWidget, mAttributeValueWidget;
|
MyGUI::Widget* mAttributeNameWidget;
|
||||||
|
MyGUI::Widget* mAttributeValueWidget;
|
||||||
};
|
};
|
||||||
typedef MWAttribute* MWAttributePtr;
|
typedef MWAttribute* MWAttributePtr;
|
||||||
|
|
||||||
@ -186,7 +194,7 @@ namespace MWGui
|
|||||||
* @param spell category, if this is 0, this means the spell effects are permanent and won't display e.g. duration
|
* @param spell category, if this is 0, this means the spell effects are permanent and won't display e.g. duration
|
||||||
* @param various flags, see MWEffectList::EffectFlags
|
* @param various flags, see MWEffectList::EffectFlags
|
||||||
*/
|
*/
|
||||||
void createEffectWidgets(std::vector<MyGUI::WidgetPtr> &effects, MyGUI::WidgetPtr creator, MyGUI::IntCoord &coord, int flags);
|
void createEffectWidgets(std::vector<MyGUI::Widget*> &effects, MyGUI::Widget* creator, MyGUI::IntCoord &coord, int flags);
|
||||||
|
|
||||||
const std::string &getSpellId() const { return mId; }
|
const std::string &getSpellId() const { return mId; }
|
||||||
|
|
||||||
@ -230,7 +238,7 @@ namespace MWGui
|
|||||||
* @param center the effect widgets horizontally
|
* @param center the effect widgets horizontally
|
||||||
* @param various flags, see MWEffectList::EffectFlags
|
* @param various flags, see MWEffectList::EffectFlags
|
||||||
*/
|
*/
|
||||||
void createEffectWidgets(std::vector<MyGUI::WidgetPtr> &effects, MyGUI::WidgetPtr creator, MyGUI::IntCoord &coord, bool center, int flags);
|
void createEffectWidgets(std::vector<MyGUI::Widget*> &effects, MyGUI::Widget* creator, MyGUI::IntCoord &coord, bool center, int flags);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~MWEffectList();
|
virtual ~MWEffectList();
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
#include "MyGUI_UString.h"
|
#include <MyGUI_UString.h>
|
||||||
|
|
||||||
#include <openengine/ogre/renderer.hpp>
|
#include <openengine/ogre/renderer.hpp>
|
||||||
#include <openengine/gui/manager.hpp>
|
#include <openengine/gui/manager.hpp>
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
#include <MyGUI.h>
|
|
||||||
#include <MyGUI_OgrePlatform.h>
|
|
||||||
#include <cassert>
|
|
||||||
|
|
||||||
#include "manager.hpp"
|
#include "manager.hpp"
|
||||||
|
|
||||||
|
#include <MyGUI_Gui.h>
|
||||||
|
#include <MyGUI_OgrePlatform.h>
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
using namespace OEngine::GUI;
|
using namespace OEngine::GUI;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#ifndef OENGINE_MYGUI_MANAGER_H
|
#ifndef OENGINE_MYGUI_MANAGER_H
|
||||||
#define OENGINE_MYGUI_MANAGER_H
|
#define OENGINE_MYGUI_MANAGER_H
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
namespace MyGUI
|
namespace MyGUI
|
||||||
{
|
{
|
||||||
class Gui;
|
class Gui;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user