mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-10-31 20:56:42 +00:00 
			
		
		
		
	Merge remote-tracking branch 'scrawl/includes'
This commit is contained in:
		
						commit
						3e97943e06
					
				
					 34 changed files with 166 additions and 138 deletions
				
			
		|  | @ -237,7 +237,7 @@ namespace MWGui | |||
|         Widgets::SpellEffectList _list = Widgets::MWEffectList::effectListFromESM(&list); | ||||
|         effectsWidget->setEffectList(_list); | ||||
| 
 | ||||
|         std::vector<MyGUI::WidgetPtr> effectItems; | ||||
|         std::vector<MyGUI::Widget*> effectItems; | ||||
|         effectsWidget->createEffectWidgets(effectItems, mEffectsBox, coord, false, 0); | ||||
|         effectsWidget->setCoord(coord); | ||||
|     } | ||||
|  |  | |||
|  | @ -40,11 +40,11 @@ BirthDialog::BirthDialog(MWBase::WindowManager& parWindowManager) | |||
|     mBirthList->eventListMouseItemActivate += MyGUI::newDelegate(this, &BirthDialog::onSelectBirth); | ||||
|     mBirthList->eventListChangePosition += MyGUI::newDelegate(this, &BirthDialog::onSelectBirth); | ||||
| 
 | ||||
|     MyGUI::ButtonPtr backButton; | ||||
|     MyGUI::Button* backButton; | ||||
|     getWidget(backButton, "BackButton"); | ||||
|     backButton->eventMouseButtonClick += MyGUI::newDelegate(this, &BirthDialog::onBackClicked); | ||||
| 
 | ||||
|     MyGUI::ButtonPtr okButton; | ||||
|     MyGUI::Button* okButton; | ||||
|     getWidget(okButton, "OKButton"); | ||||
|     okButton->setCaption(mWindowManager.getGameSettingString("sOK", "")); | ||||
|     okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &BirthDialog::onOkClicked); | ||||
|  | @ -55,7 +55,7 @@ BirthDialog::BirthDialog(MWBase::WindowManager& parWindowManager) | |||
| 
 | ||||
| void BirthDialog::setNextButtonShow(bool shown) | ||||
| { | ||||
|     MyGUI::ButtonPtr okButton; | ||||
|     MyGUI::Button* okButton; | ||||
|     getWidget(okButton, "OKButton"); | ||||
| 
 | ||||
|     if (shown) | ||||
|  | @ -82,7 +82,7 @@ void BirthDialog::setBirthId(const std::string &birthId) | |||
|         if (boost::iequals(*mBirthList->getItemDataAt<std::string>(i), birthId)) | ||||
|         { | ||||
|             mBirthList->setIndexSelected(i); | ||||
|             MyGUI::ButtonPtr okButton; | ||||
|             MyGUI::Button* okButton; | ||||
|             getWidget(okButton, "OKButton"); | ||||
|             break; | ||||
|         } | ||||
|  | @ -110,7 +110,7 @@ void BirthDialog::onSelectBirth(MyGUI::ListBox* _sender, size_t _index) | |||
|     if (_index == MyGUI::ITEM_NONE) | ||||
|         return; | ||||
| 
 | ||||
|     MyGUI::ButtonPtr okButton; | ||||
|     MyGUI::Button* okButton; | ||||
|     getWidget(okButton, "OKButton"); | ||||
| 
 | ||||
|     const std::string *birthId = mBirthList->getItemDataAt<std::string>(_index); | ||||
|  | @ -159,7 +159,7 @@ void BirthDialog::updateBirths() | |||
| 
 | ||||
| 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); | ||||
|     } | ||||
|  |  | |||
|  | @ -46,9 +46,9 @@ namespace MWGui | |||
|         void updateSpells(); | ||||
| 
 | ||||
|         MyGUI::ListBox* mBirthList; | ||||
|         MyGUI::WidgetPtr  mSpellArea; | ||||
|         MyGUI::Widget*  mSpellArea; | ||||
|         MyGUI::ImageBox* mBirthImage; | ||||
|         std::vector<MyGUI::WidgetPtr> mSpellItems; | ||||
|         std::vector<MyGUI::Widget*> mSpellItems; | ||||
| 
 | ||||
|         std::string mCurrentBirthId; | ||||
|     }; | ||||
|  |  | |||
|  | @ -31,11 +31,11 @@ GenerateClassResultDialog::GenerateClassResultDialog(MWBase::WindowManager& parW | |||
|     getWidget(mClassImage, "ClassImage"); | ||||
|     getWidget(mClassName, "ClassName"); | ||||
| 
 | ||||
|     MyGUI::ButtonPtr backButton; | ||||
|     MyGUI::Button* backButton; | ||||
|     getWidget(backButton, "BackButton"); | ||||
|     backButton->eventMouseButtonClick += MyGUI::newDelegate(this, &GenerateClassResultDialog::onBackClicked); | ||||
| 
 | ||||
|     MyGUI::ButtonPtr okButton; | ||||
|     MyGUI::Button* okButton; | ||||
|     getWidget(okButton, "OKButton"); | ||||
|     okButton->setCaption(mWindowManager.getGameSettingString("sOK", "")); | ||||
|     okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &GenerateClassResultDialog::onOkClicked); | ||||
|  | @ -97,11 +97,11 @@ PickClassDialog::PickClassDialog(MWBase::WindowManager& parWindowManager) | |||
| 
 | ||||
|     getWidget(mClassImage, "ClassImage"); | ||||
| 
 | ||||
|     MyGUI::ButtonPtr backButton; | ||||
|     MyGUI::Button* backButton; | ||||
|     getWidget(backButton, "BackButton"); | ||||
|     backButton->eventMouseButtonClick += MyGUI::newDelegate(this, &PickClassDialog::onBackClicked); | ||||
| 
 | ||||
|     MyGUI::ButtonPtr okButton; | ||||
|     MyGUI::Button* okButton; | ||||
|     getWidget(okButton, "OKButton"); | ||||
|     okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &PickClassDialog::onOkClicked); | ||||
| 
 | ||||
|  | @ -111,7 +111,7 @@ PickClassDialog::PickClassDialog(MWBase::WindowManager& parWindowManager) | |||
| 
 | ||||
| void PickClassDialog::setNextButtonShow(bool shown) | ||||
| { | ||||
|     MyGUI::ButtonPtr okButton; | ||||
|     MyGUI::Button* okButton; | ||||
|     getWidget(okButton, "OKButton"); | ||||
| 
 | ||||
|     if (shown) | ||||
|  | @ -138,7 +138,7 @@ void PickClassDialog::setClassId(const std::string &classId) | |||
|         if (boost::iequals(*mClassList->getItemDataAt<std::string>(i), classId)) | ||||
|         { | ||||
|             mClassList->setIndexSelected(i); | ||||
|             MyGUI::ButtonPtr okButton; | ||||
|             MyGUI::Button* okButton; | ||||
|             getWidget(okButton, "OKButton"); | ||||
|             break; | ||||
|         } | ||||
|  | @ -166,7 +166,7 @@ void PickClassDialog::onSelectClass(MyGUI::ListBox* _sender, size_t _index) | |||
|     if (_index == MyGUI::ITEM_NONE) | ||||
|         return; | ||||
| 
 | ||||
|     MyGUI::ButtonPtr okButton; | ||||
|     MyGUI::Button* okButton; | ||||
|     getWidget(okButton, "OKButton"); | ||||
| 
 | ||||
|     const std::string *classId = mClassList->getItemDataAt<std::string>(_index); | ||||
|  | @ -256,7 +256,7 @@ void InfoBoxDialog::fitToText(MyGUI::TextBox* widget) | |||
|     widget->setSize(size); | ||||
| } | ||||
| 
 | ||||
| void InfoBoxDialog::layoutVertically(MyGUI::WidgetPtr widget, int margin) | ||||
| void InfoBoxDialog::layoutVertically(MyGUI::Widget* widget, int margin) | ||||
| { | ||||
|     size_t count = widget->getChildCount(); | ||||
|     int pos = 0; | ||||
|  | @ -264,7 +264,7 @@ void InfoBoxDialog::layoutVertically(MyGUI::WidgetPtr widget, int margin) | |||
|     int width = 0; | ||||
|     for (unsigned i = 0; i < count; ++i) | ||||
|     { | ||||
|         MyGUI::WidgetPtr child = widget->getChildAt(i); | ||||
|         MyGUI::Widget* child = widget->getChildAt(i); | ||||
|         if (!child->getVisible()) | ||||
|             continue; | ||||
| 
 | ||||
|  | @ -302,7 +302,7 @@ std::string InfoBoxDialog::getText() const | |||
| 
 | ||||
| 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); | ||||
|     } | ||||
|  | @ -310,7 +310,7 @@ void InfoBoxDialog::setButtons(ButtonList &buttons) | |||
|     mCurrentButton = -1; | ||||
| 
 | ||||
|     // 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); | ||||
|     ButtonList::const_iterator end = buttons.end(); | ||||
|     for (ButtonList::const_iterator it = buttons.begin(); it != end; ++it) | ||||
|  | @ -342,11 +342,11 @@ int InfoBoxDialog::getChosenButton() const | |||
|     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; | ||||
|     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) | ||||
|         { | ||||
|  | @ -376,10 +376,10 @@ ClassChoiceDialog::ClassChoiceDialog(MWBase::WindowManager& parWindowManager) | |||
| 
 | ||||
| CreateClassDialog::CreateClassDialog(MWBase::WindowManager& parWindowManager) | ||||
|   : WindowModal("openmw_chargen_create_class.layout", parWindowManager) | ||||
|   , mSpecDialog(nullptr) | ||||
|   , mAttribDialog(nullptr) | ||||
|   , mSkillDialog(nullptr) | ||||
|   , mDescDialog(nullptr) | ||||
|   , mSpecDialog(NULL) | ||||
|   , mAttribDialog(NULL) | ||||
|   , mSkillDialog(NULL) | ||||
|   , mDescDialog(NULL) | ||||
| { | ||||
|     // Centre dialog
 | ||||
|     center(); | ||||
|  | @ -420,15 +420,15 @@ CreateClassDialog::CreateClassDialog(MWBase::WindowManager& parWindowManager) | |||
|     // Make sure the edit box has focus
 | ||||
|     MyGUI::InputManager::getInstance().setKeyFocusWidget(mEditName); | ||||
| 
 | ||||
|     MyGUI::ButtonPtr descriptionButton; | ||||
|     MyGUI::Button* descriptionButton; | ||||
|     getWidget(descriptionButton, "DescriptionButton"); | ||||
|     descriptionButton->eventMouseButtonClick += MyGUI::newDelegate(this, &CreateClassDialog::onDescriptionClicked); | ||||
| 
 | ||||
|     MyGUI::ButtonPtr backButton; | ||||
|     MyGUI::Button* backButton; | ||||
|     getWidget(backButton, "BackButton"); | ||||
|     backButton->eventMouseButtonClick += MyGUI::newDelegate(this, &CreateClassDialog::onBackClicked); | ||||
| 
 | ||||
|     MyGUI::ButtonPtr okButton; | ||||
|     MyGUI::Button* okButton; | ||||
|     getWidget(okButton, "OKButton"); | ||||
|     okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &CreateClassDialog::onOkClicked); | ||||
| 
 | ||||
|  | @ -518,7 +518,7 @@ std::vector<ESM::Skill::SkillEnum> CreateClassDialog::getMinorSkills() const | |||
| 
 | ||||
| void CreateClassDialog::setNextButtonShow(bool shown) | ||||
| { | ||||
|     MyGUI::ButtonPtr okButton; | ||||
|     MyGUI::Button* okButton; | ||||
|     getWidget(okButton, "OKButton"); | ||||
| 
 | ||||
|     if (shown) | ||||
|  | @ -544,7 +544,7 @@ void CreateClassDialog::onDialogCancel() | |||
|     mDescDialog = 0; | ||||
| } | ||||
| 
 | ||||
| void CreateClassDialog::onSpecializationClicked(MyGUI::WidgetPtr _sender) | ||||
| void CreateClassDialog::onSpecializationClicked(MyGUI::Widget* _sender) | ||||
| { | ||||
|     delete mSpecDialog; | ||||
|     mSpecDialog = new SelectSpecializationDialog(mWindowManager); | ||||
|  | @ -694,7 +694,7 @@ SelectSpecializationDialog::SelectSpecializationDialog(MWBase::WindowManager& pa | |||
|     ToolTips::createSpecializationToolTip(mSpecialization1, magic, ESM::Class::Magic); | ||||
|     ToolTips::createSpecializationToolTip(mSpecialization2, stealth, ESM::Class::Stealth); | ||||
| 
 | ||||
|     MyGUI::ButtonPtr cancelButton; | ||||
|     MyGUI::Button* cancelButton; | ||||
|     getWidget(cancelButton, "CancelButton"); | ||||
|     cancelButton->setCaption(mWindowManager.getGameSettingString("sCancel", "")); | ||||
|     cancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SelectSpecializationDialog::onCancelClicked); | ||||
|  | @ -706,7 +706,7 @@ SelectSpecializationDialog::~SelectSpecializationDialog() | |||
| 
 | ||||
| // widget controls
 | ||||
| 
 | ||||
| void SelectSpecializationDialog::onSpecializationClicked(MyGUI::WidgetPtr _sender) | ||||
| void SelectSpecializationDialog::onSpecializationClicked(MyGUI::Widget* _sender) | ||||
| { | ||||
|     if (_sender == mSpecialization0) | ||||
|         mSpecializationId = ESM::Class::Combat; | ||||
|  | @ -747,7 +747,7 @@ SelectAttributeDialog::SelectAttributeDialog(MWBase::WindowManager& parWindowMan | |||
|         ToolTips::createAttributeToolTip(attribute, attribute->getAttributeId()); | ||||
|     } | ||||
| 
 | ||||
|     MyGUI::ButtonPtr cancelButton; | ||||
|     MyGUI::Button* cancelButton; | ||||
|     getWidget(cancelButton, "CancelButton"); | ||||
|     cancelButton->setCaption(mWindowManager.getGameSettingString("sCancel", "")); | ||||
|     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"); | ||||
|     cancelButton->setCaption(mWindowManager.getGameSettingString("sCancel", "")); | ||||
|     cancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SelectSkillDialog::onCancelClicked); | ||||
|  | @ -873,7 +873,7 @@ DescriptionDialog::DescriptionDialog(MWBase::WindowManager& parWindowManager) | |||
| 
 | ||||
|     getWidget(mTextEdit, "TextEdit"); | ||||
| 
 | ||||
|     MyGUI::ButtonPtr okButton; | ||||
|     MyGUI::Button* okButton; | ||||
|     getWidget(okButton, "OKButton"); | ||||
|     okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &DescriptionDialog::onOkClicked); | ||||
|     okButton->setCaption(mWindowManager.getGameSettingString("sInputMenu1", "")); | ||||
|  |  | |||
|  | @ -1,7 +1,7 @@ | |||
| #ifndef MWGUI_CLASS_H | ||||
| #define MWGUI_CLASS_H | ||||
| 
 | ||||
| #include <MyGUI.h> | ||||
| 
 | ||||
| #include "widgets.hpp" | ||||
| #include "window_base.hpp" | ||||
| 
 | ||||
|  | @ -35,17 +35,17 @@ namespace MWGui | |||
|         EventHandle_Int eventButtonSelected; | ||||
| 
 | ||||
|     protected: | ||||
|         void onButtonClicked(MyGUI::WidgetPtr _sender); | ||||
|         void onButtonClicked(MyGUI::Widget* _sender); | ||||
| 
 | ||||
|     private: | ||||
| 
 | ||||
|         void fitToText(MyGUI::TextBox* widget); | ||||
|         void layoutVertically(MyGUI::WidgetPtr widget, int margin); | ||||
|         void layoutVertically(MyGUI::Widget* widget, int margin); | ||||
|         int mCurrentButton; | ||||
|         MyGUI::WidgetPtr mTextBox; | ||||
|         MyGUI::Widget* mTextBox; | ||||
|         MyGUI::TextBox* mText; | ||||
|         MyGUI::WidgetPtr mButtonBar; | ||||
|         std::vector<MyGUI::ButtonPtr> mButtons; | ||||
|         MyGUI::Widget* mButtonBar; | ||||
|         std::vector<MyGUI::Button*> mButtons; | ||||
|     }; | ||||
| 
 | ||||
|     // Lets the player choose between 3 ways of creating a class
 | ||||
|  | @ -235,7 +235,7 @@ namespace MWGui | |||
|         void onOkClicked(MyGUI::Widget* _sender); | ||||
| 
 | ||||
|     private: | ||||
|         MyGUI::EditPtr mTextEdit; | ||||
|         MyGUI::EditBox* mTextEdit; | ||||
|     }; | ||||
| 
 | ||||
|     class CreateClassDialog : public WindowModal | ||||
|  | @ -265,7 +265,7 @@ namespace MWGui | |||
|         void onOkClicked(MyGUI::Widget* _sender); | ||||
|         void onBackClicked(MyGUI::Widget* _sender); | ||||
| 
 | ||||
|         void onSpecializationClicked(MyGUI::WidgetPtr _sender); | ||||
|         void onSpecializationClicked(MyGUI::Widget* _sender); | ||||
|         void onSpecializationSelected(); | ||||
|         void onAttributeClicked(Widgets::MWAttributePtr _sender); | ||||
|         void onAttributeSelected(); | ||||
|  | @ -280,7 +280,7 @@ namespace MWGui | |||
|         void update(); | ||||
| 
 | ||||
|     private: | ||||
|         MyGUI::EditPtr                   mEditName; | ||||
|         MyGUI::EditBox*                   mEditName; | ||||
|         MyGUI::TextBox*                  mSpecializationName; | ||||
|         Widgets::MWAttributePtr          mFavoriteAttribute0, mFavoriteAttribute1; | ||||
|         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::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(); | ||||
|         if(cm.empty()) return; | ||||
|  |  | |||
|  | @ -55,8 +55,8 @@ namespace MWGui | |||
| 
 | ||||
| 
 | ||||
|     public: | ||||
|     MyGUI::EditPtr command; | ||||
|     MyGUI::EditPtr history; | ||||
|     MyGUI::EditBox* command; | ||||
|     MyGUI::EditBox* history; | ||||
| 
 | ||||
|     typedef std::list<std::string> StringList; | ||||
| 
 | ||||
|  | @ -95,11 +95,11 @@ namespace MWGui | |||
| 
 | ||||
|   private: | ||||
| 
 | ||||
|     void keyPress(MyGUI::WidgetPtr _sender, | ||||
|     void keyPress(MyGUI::Widget* _sender, | ||||
|                   MyGUI::KeyCode key, | ||||
|                   MyGUI::Char _char); | ||||
| 
 | ||||
|     void acceptCommand(MyGUI::EditPtr _sender); | ||||
|     void acceptCommand(MyGUI::EditBox* _sender); | ||||
| 
 | ||||
|     std::string complete( std::string input, std::vector<std::string> &matches ); | ||||
|   }; | ||||
|  |  | |||
|  | @ -14,7 +14,7 @@ namespace MWGui | |||
| 
 | ||||
| 
 | ||||
|     ResourceImageSetPointerFix::ResourceImageSetPointerFix() : | ||||
|         mImageSet(nullptr) | ||||
|         mImageSet(NULL) | ||||
|     { | ||||
|     } | ||||
| 
 | ||||
|  | @ -50,7 +50,7 @@ namespace MWGui | |||
| 
 | ||||
|     void ResourceImageSetPointerFix::setImage(MyGUI::ImageBox* _image) | ||||
|     { | ||||
|         if (mImageSet != nullptr) | ||||
|         if (mImageSet != NULL) | ||||
|             _image->setItemResourceInfo(mImageSet->getIndexInfo(0, 0)); | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
|  | @ -151,7 +151,7 @@ DialogueWindow::DialogueWindow(MWBase::WindowManager& parWindowManager) | |||
|     getWidget(mTopicsList, "TopicsList"); | ||||
|     mTopicsList->eventItemSelected += MyGUI::newDelegate(this, &DialogueWindow::onSelectTopic); | ||||
| 
 | ||||
|     MyGUI::ButtonPtr byeButton; | ||||
|     MyGUI::Button* byeButton; | ||||
|     getWidget(byeButton, "ByeButton"); | ||||
|     byeButton->eventMouseButtonClick += MyGUI::newDelegate(this, &DialogueWindow::onByeClicked); | ||||
| 
 | ||||
|  | @ -164,7 +164,7 @@ DialogueWindow::DialogueWindow(MWBase::WindowManager& parWindowManager) | |||
| void DialogueWindow::onHistoryClicked(MyGUI::Widget* _sender) | ||||
| { | ||||
|     MyGUI::ISubWidgetText* t = mHistory->getClient()->getSubWidgetText(); | ||||
|     if(t == nullptr) | ||||
|     if(t == NULL) | ||||
|         return; | ||||
| 
 | ||||
|     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); | ||||
| 
 | ||||
|     size_t historySize = 0; | ||||
|     if(mHistory->getClient()->getSubWidgetText() != nullptr) | ||||
|     if(mHistory->getClient()->getSubWidgetText() != NULL) | ||||
|     { | ||||
|         historySize = mHistory->getOnlyText().size(); | ||||
|     } | ||||
|  |  | |||
|  | @ -113,7 +113,7 @@ namespace MWGui | |||
|         DialogueHistory*   mHistory; | ||||
|         Widgets::MWList*   mTopicsList; | ||||
|         MyGUI::ProgressPtr mDispositionBar; | ||||
|         MyGUI::EditPtr     mDispositionText; | ||||
|         MyGUI::EditBox*     mDispositionText; | ||||
| 
 | ||||
|         PersuasionDialog mPersuasionDialog; | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,7 +1,5 @@ | |||
| #include "exposedwindow.hpp" | ||||
| 
 | ||||
| #include "MyGUI_Window.h" | ||||
| 
 | ||||
| namespace MWGui | ||||
| { | ||||
|     MyGUI::VectorWidgetPtr ExposedWindow::getSkinWidgetsByName (const std::string &name) | ||||
|  | @ -16,7 +14,7 @@ namespace MWGui | |||
|         if (widgets.empty()) | ||||
|         { | ||||
|             MYGUI_ASSERT( ! _throw, "widget name '" << _name << "' not found in skin of layout '" << getName() << "'"); | ||||
|             return nullptr; | ||||
|             return NULL; | ||||
|         } | ||||
|         else | ||||
|         { | ||||
|  |  | |||
|  | @ -1,7 +1,7 @@ | |||
| #ifndef MWGUI_EXPOSEDWINDOW_H | ||||
| #define MWGUI_EXPOSEDWINDOW_H | ||||
| 
 | ||||
| #include "MyGUI_Window.h" | ||||
| #include <MyGUI_Window.h> | ||||
| 
 | ||||
| namespace MWGui | ||||
| { | ||||
|  |  | |||
|  | @ -2,7 +2,9 @@ | |||
| 
 | ||||
| #include <cmath> | ||||
| 
 | ||||
| #include <MyGUI.h> | ||||
| #include <MyGUI_Widget.h> | ||||
| #include <MyGUI_RenderManager.h> | ||||
| #include <MyGUI_PointerManager.h> | ||||
| 
 | ||||
| #include <boost/lexical_cast.hpp> | ||||
| 
 | ||||
|  |  | |||
|  | @ -64,7 +64,7 @@ namespace MWGui | |||
| 
 | ||||
|         MyGUI::Widget* mDummy; | ||||
| 
 | ||||
|         MyGUI::WidgetPtr mFpsBox; | ||||
|         MyGUI::Widget* mFpsBox; | ||||
|         MyGUI::TextBox* mFpsCounter; | ||||
|         MyGUI::TextBox* mTriangleCounter; | ||||
|         MyGUI::TextBox* mBatchCounter; | ||||
|  |  | |||
|  | @ -1,7 +1,7 @@ | |||
| #ifndef MWGUI_IMAGEBUTTON_H | ||||
| #define MWGUI_IMAGEBUTTON_H | ||||
| 
 | ||||
| #include "MyGUI_ImageBox.h" | ||||
| #include <MyGUI_ImageBox.h> | ||||
| 
 | ||||
| namespace MWGui | ||||
| { | ||||
|  |  | |||
|  | @ -29,8 +29,8 @@ namespace MWGui | |||
|             void notifyNextPage(MyGUI::Widget* _sender); | ||||
|             void notifyPrevPage(MyGUI::Widget* _sender); | ||||
| 
 | ||||
|             MyGUI::EditPtr mLeftTextWidget; | ||||
|             MyGUI::EditPtr mRightTextWidget; | ||||
|             MyGUI::EditBox* mLeftTextWidget; | ||||
|             MyGUI::EditBox* mRightTextWidget; | ||||
|             MWGui::ImageButton* mPrevBtn; | ||||
|             MWGui::ImageButton* mNextBtn; | ||||
|             std::vector<std::string> mLeftPages; | ||||
|  |  | |||
|  | @ -1,6 +1,9 @@ | |||
| #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::Widgets; | ||||
|  |  | |||
|  | @ -1,7 +1,12 @@ | |||
| #ifndef MWGUI_LIST_HPP | ||||
| #define MWGUI_LIST_HPP | ||||
| 
 | ||||
| #include <MyGUI.h> | ||||
| #include <MyGUI_Widget.h> | ||||
| 
 | ||||
| namespace MyGUI | ||||
| { | ||||
|     class ScrollView; | ||||
| } | ||||
| 
 | ||||
| namespace MWGui | ||||
| { | ||||
|  |  | |||
|  | @ -247,7 +247,7 @@ InteractiveMessageBox::InteractiveMessageBox(MessageBoxManager& parMessageBoxMan | |||
|     std::vector<std::string>::const_iterator 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, | ||||
|             std::string("MW_Button"), | ||||
|             dummyCoord, | ||||
|  | @ -301,7 +301,7 @@ InteractiveMessageBox::InteractiveMessageBox(MessageBoxManager& parMessageBoxMan | |||
|         MyGUI::IntSize buttonSize(0, buttonHeight); | ||||
|         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) | ||||
|         { | ||||
|             buttonCord.left = left; | ||||
|  | @ -349,7 +349,7 @@ InteractiveMessageBox::InteractiveMessageBox(MessageBoxManager& parMessageBoxMan | |||
| 
 | ||||
|         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) | ||||
|         { | ||||
|             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::vector<MyGUI::ButtonPtr>::const_iterator button; | ||||
|     std::vector<MyGUI::Button*>::const_iterator button; | ||||
|     for(button = mButtons.begin(); button != mButtons.end(); ++button) | ||||
|     { | ||||
|         if(Misc::StringUtils::lowerCase((*button)->getCaption()) == ok) | ||||
|  | @ -393,7 +393,7 @@ void InteractiveMessageBox::buttonActivated (MyGUI::Widget* pressed) | |||
| { | ||||
|     mMarkedToDelete = true; | ||||
|     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) | ||||
|     { | ||||
|         if(*button == pressed) | ||||
|  |  | |||
|  | @ -2,7 +2,6 @@ | |||
| #define MWGUI_MESSAGE_BOX_H | ||||
| 
 | ||||
| #include <openengine/gui/layout.hpp> | ||||
| #include <MyGUI.h> | ||||
| 
 | ||||
| #include "window_base.hpp" | ||||
| 
 | ||||
|  | @ -10,6 +9,13 @@ | |||
| 
 | ||||
| #undef MessageBox | ||||
| 
 | ||||
| namespace MyGUI | ||||
| { | ||||
|     class Widget; | ||||
|     class Button; | ||||
|     class EditBox; | ||||
| } | ||||
| 
 | ||||
| namespace MWGui | ||||
| { | ||||
|     class InteractiveMessageBox; | ||||
|  | @ -61,7 +67,7 @@ namespace MWGui | |||
|             MessageBoxManager& mMessageBoxManager; | ||||
|             int mHeight; | ||||
|             const std::string& mMessage; | ||||
|             MyGUI::EditPtr mMessageWidget; | ||||
|             MyGUI::EditBox* mMessageWidget; | ||||
|             int mFixedWidth; | ||||
|             int mBottomPadding; | ||||
|             int mNextBoxPadding; | ||||
|  | @ -81,9 +87,9 @@ namespace MWGui | |||
|             void buttonActivated (MyGUI::Widget* _widget); | ||||
|              | ||||
|             MessageBoxManager& mMessageBoxManager; | ||||
|             MyGUI::EditPtr mMessageWidget; | ||||
|             MyGUI::WidgetPtr mButtonsWidget; | ||||
|             std::vector<MyGUI::ButtonPtr> mButtons; | ||||
|             MyGUI::EditBox* mMessageWidget; | ||||
|             MyGUI::Widget* mButtonsWidget; | ||||
|             std::vector<MyGUI::Button*> mButtons; | ||||
| 
 | ||||
|             int mTextButtonPadding; | ||||
|             int mButtonPressed; | ||||
|  |  | |||
|  | @ -41,7 +41,7 @@ RaceDialog::RaceDialog(MWBase::WindowManager& parWindowManager) | |||
|     mHeadRotate->eventScrollChangePosition += MyGUI::newDelegate(this, &RaceDialog::onHeadRotate); | ||||
| 
 | ||||
|     // Set up next/previous buttons
 | ||||
|     MyGUI::ButtonPtr prevButton, nextButton; | ||||
|     MyGUI::Button *prevButton, *nextButton; | ||||
| 
 | ||||
|     setText("GenderChoiceT", mWindowManager.getGameSettingString("sRaceMenu2", "Change Sex")); | ||||
|     getWidget(prevButton, "PrevGenderButton"); | ||||
|  | @ -73,11 +73,11 @@ RaceDialog::RaceDialog(MWBase::WindowManager& parWindowManager) | |||
|     setText("SpellPowerT", mWindowManager.getGameSettingString("sRaceMenu7", "Specials")); | ||||
|     getWidget(mSpellPowerList, "SpellPowerList"); | ||||
| 
 | ||||
|     MyGUI::ButtonPtr backButton; | ||||
|     MyGUI::Button* backButton; | ||||
|     getWidget(backButton, "BackButton"); | ||||
|     backButton->eventMouseButtonClick += MyGUI::newDelegate(this, &RaceDialog::onBackClicked); | ||||
| 
 | ||||
|     MyGUI::ButtonPtr okButton; | ||||
|     MyGUI::Button* okButton; | ||||
|     getWidget(okButton, "OKButton"); | ||||
|     okButton->setCaption(mWindowManager.getGameSettingString("sOK", "")); | ||||
|     okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &RaceDialog::onOkClicked); | ||||
|  | @ -89,7 +89,7 @@ RaceDialog::RaceDialog(MWBase::WindowManager& parWindowManager) | |||
| 
 | ||||
| void RaceDialog::setNextButtonShow(bool shown) | ||||
| { | ||||
|     MyGUI::ButtonPtr okButton; | ||||
|     MyGUI::Button* okButton; | ||||
|     getWidget(okButton, "OKButton"); | ||||
| 
 | ||||
|     if (shown) | ||||
|  | @ -134,7 +134,7 @@ void RaceDialog::setRaceId(const std::string &raceId) | |||
|         if (boost::iequals(*mRaceList->getItemDataAt<std::string>(i), raceId)) | ||||
|         { | ||||
|             mRaceList->setIndexSelected(i); | ||||
|             MyGUI::ButtonPtr okButton; | ||||
|             MyGUI::Button* okButton; | ||||
|             getWidget(okButton, "OKButton"); | ||||
|             break; | ||||
|         } | ||||
|  | @ -256,7 +256,7 @@ void RaceDialog::onSelectRace(MyGUI::ListBox* _sender, size_t _index) | |||
|     if (_index == MyGUI::ITEM_NONE) | ||||
|         return; | ||||
| 
 | ||||
|     MyGUI::ButtonPtr okButton; | ||||
|     MyGUI::Button* okButton; | ||||
|     getWidget(okButton, "OKButton"); | ||||
|     const std::string *raceId = mRaceList->getItemDataAt<std::string>(_index); | ||||
|     if (boost::iequals(mCurrentRaceId, *raceId)) | ||||
|  | @ -331,7 +331,7 @@ void RaceDialog::updateRaces() | |||
| 
 | ||||
| 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); | ||||
|     } | ||||
|  | @ -369,7 +369,7 @@ void RaceDialog::updateSkills() | |||
| 
 | ||||
| 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); | ||||
|     } | ||||
|  |  | |||
|  | @ -85,11 +85,11 @@ namespace MWGui | |||
|         MyGUI::ListBox*   mRaceList; | ||||
|         MyGUI::ScrollBar* mHeadRotate; | ||||
| 
 | ||||
|         MyGUI::WidgetPtr mSkillList; | ||||
|         std::vector<MyGUI::WidgetPtr> mSkillItems; | ||||
|         MyGUI::Widget* mSkillList; | ||||
|         std::vector<MyGUI::Widget*> mSkillItems; | ||||
| 
 | ||||
|         MyGUI::WidgetPtr mSpellPowerList; | ||||
|         std::vector<MyGUI::WidgetPtr> mSpellPowerItems; | ||||
|         MyGUI::Widget* mSpellPowerList; | ||||
|         std::vector<MyGUI::Widget*> mSpellPowerItems; | ||||
| 
 | ||||
|         int mGenderIndex, mFaceIndex, mHairIndex; | ||||
|         int mFaceCount, mHairCount; | ||||
|  |  | |||
|  | @ -86,11 +86,11 @@ ReviewDialog::ReviewDialog(MWBase::WindowManager& parWindowManager) | |||
|         mSkillWidgetMap.insert(std::make_pair(i, static_cast<MyGUI::TextBox*> (0))); | ||||
|     } | ||||
| 
 | ||||
|     MyGUI::ButtonPtr backButton; | ||||
|     MyGUI::Button* backButton; | ||||
|     getWidget(backButton, "BackButton"); | ||||
|     backButton->eventMouseButtonClick += MyGUI::newDelegate(this, &ReviewDialog::onBackClicked); | ||||
| 
 | ||||
|     MyGUI::ButtonPtr okButton; | ||||
|     MyGUI::Button* okButton; | ||||
|     getWidget(okButton, "OKButton"); | ||||
|     okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &ReviewDialog::onOkClicked); | ||||
| } | ||||
|  | @ -309,7 +309,7 @@ void ReviewDialog::addSkills(const SkillList &skills, const std::string &titleId | |||
| 
 | ||||
| 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); | ||||
|     } | ||||
|  |  | |||
|  | @ -91,7 +91,7 @@ namespace MWGui | |||
|         std::map<int, MyGUI::TextBox*> mSkillWidgetMap; | ||||
|         std::string mName, mRaceId, mBirthSignId; | ||||
|         ESM::Class mKlass; | ||||
|         std::vector<MyGUI::WidgetPtr> mSkillWidgets; //< Skills and other information
 | ||||
|         std::vector<MyGUI::Widget*> mSkillWidgets; //< Skills and other information
 | ||||
|     }; | ||||
| } | ||||
| #endif | ||||
|  |  | |||
|  | @ -67,7 +67,7 @@ StatsWindow::StatsWindow (MWBase::WindowManager& parWindowManager) | |||
|     for (int i = 0; i < ESM::Skill::Length; ++i) | ||||
|     { | ||||
|         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); | ||||
|  | @ -419,7 +419,7 @@ void StatsWindow::updateSkillArea() | |||
| { | ||||
|     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); | ||||
|     } | ||||
|  |  | |||
|  | @ -67,11 +67,11 @@ namespace MWGui | |||
|             SkillList mMajorSkills, mMinorSkills, mMiscSkills; | ||||
|             std::map<int, MWMechanics::Stat<float> > mSkillValues; | ||||
|             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
 | ||||
|             std::string mBirthSignId; | ||||
|             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; | ||||
| 
 | ||||
|             bool mChanged; | ||||
|  |  | |||
|  | @ -13,7 +13,7 @@ TextInputDialog::TextInputDialog(MWBase::WindowManager& parWindowManager) | |||
|     getWidget(mTextEdit, "TextEdit"); | ||||
|     mTextEdit->eventEditSelectAccept += newDelegate(this, &TextInputDialog::onTextAccepted); | ||||
| 
 | ||||
|     MyGUI::ButtonPtr okButton; | ||||
|     MyGUI::Button* okButton; | ||||
|     getWidget(okButton, "OKButton"); | ||||
|     okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &TextInputDialog::onOkClicked); | ||||
| 
 | ||||
|  | @ -23,7 +23,7 @@ TextInputDialog::TextInputDialog(MWBase::WindowManager& parWindowManager) | |||
| 
 | ||||
| void TextInputDialog::setNextButtonShow(bool shown) | ||||
| { | ||||
|     MyGUI::ButtonPtr okButton; | ||||
|     MyGUI::Button* okButton; | ||||
|     getWidget(okButton, "OKButton"); | ||||
| 
 | ||||
|     if (shown) | ||||
|  |  | |||
|  | @ -30,7 +30,7 @@ namespace MWGui | |||
|         void onTextAccepted(MyGUI::Edit* _sender); | ||||
| 
 | ||||
|     private: | ||||
|         MyGUI::EditPtr mTextEdit; | ||||
|         MyGUI::EditBox* mTextEdit; | ||||
|     }; | ||||
| } | ||||
| #endif | ||||
|  |  | |||
|  | @ -441,7 +441,7 @@ IntSize ToolTips::createToolTip(const MWGui::ToolTipInfo& info) | |||
|         effectsWidget->setWindowManager(mWindowManager); | ||||
|         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); | ||||
|         totalSize.height += coord.top-6; | ||||
|         totalSize.width = std::max(totalSize.width, coord.width); | ||||
|  | @ -461,7 +461,7 @@ IntSize ToolTips::createToolTip(const MWGui::ToolTipInfo& info) | |||
|         enchantWidget->setWindowManager(mWindowManager); | ||||
|         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; | ||||
|         enchantWidget->createEffectWidgets(enchantEffectItems, enchantArea, coord, true, flag); | ||||
|         totalSize.height += coord.top-6; | ||||
|  |  | |||
|  | @ -2,6 +2,9 @@ | |||
| 
 | ||||
| #include <boost/lexical_cast.hpp> | ||||
| 
 | ||||
| #include <MyGUI_ProgressBar.h> | ||||
| #include <MyGUI_ImageBox.h> | ||||
| 
 | ||||
| #include "../mwbase/environment.hpp" | ||||
| #include "../mwbase/world.hpp" | ||||
| #include "../mwbase/windowmanager.hpp" | ||||
|  | @ -31,10 +34,10 @@ void MWGui::Widgets::fixTexturePath(std::string &path) | |||
| /* MWSkill */ | ||||
| 
 | ||||
| MWSkill::MWSkill() | ||||
|     : mManager(nullptr) | ||||
|     : mManager(NULL) | ||||
|     , mSkillId(ESM::Skill::Length) | ||||
|     , mSkillNameWidget(nullptr) | ||||
|     , mSkillValueWidget(nullptr) | ||||
|     , mSkillNameWidget(NULL) | ||||
|     , mSkillValueWidget(NULL) | ||||
| { | ||||
| } | ||||
| 
 | ||||
|  | @ -103,7 +106,7 @@ void MWSkill::initialiseOverride() | |||
|     assignWidget(mSkillNameWidget, "StatName"); | ||||
|     assignWidget(mSkillValueWidget, "StatValue"); | ||||
| 
 | ||||
|     MyGUI::ButtonPtr button; | ||||
|     MyGUI::Button* button; | ||||
|     assignWidget(button, "StatNameButton"); | ||||
|     if (button) | ||||
|     { | ||||
|  | @ -123,10 +126,10 @@ void MWSkill::initialiseOverride() | |||
| /* MWAttribute */ | ||||
| 
 | ||||
| MWAttribute::MWAttribute() | ||||
|     : mManager(nullptr) | ||||
|     : mManager(NULL) | ||||
|     , mId(-1) | ||||
|     , mAttributeNameWidget(nullptr) | ||||
|     , mAttributeValueWidget(nullptr) | ||||
|     , mAttributeNameWidget(NULL) | ||||
|     , mAttributeValueWidget(NULL) | ||||
| { | ||||
| } | ||||
| 
 | ||||
|  | @ -195,7 +198,7 @@ void MWAttribute::initialiseOverride() | |||
|     assignWidget(mAttributeNameWidget, "StatName"); | ||||
|     assignWidget(mAttributeValueWidget, "StatValue"); | ||||
| 
 | ||||
|     MyGUI::ButtonPtr button; | ||||
|     MyGUI::Button* button; | ||||
|     assignWidget(button, "StatNameButton"); | ||||
|     if (button) | ||||
|     { | ||||
|  | @ -215,8 +218,8 @@ void MWAttribute::initialiseOverride() | |||
| /* MWSpell */ | ||||
| 
 | ||||
| MWSpell::MWSpell() | ||||
|     : mWindowManager(nullptr) | ||||
|     , mSpellNameWidget(nullptr) | ||||
|     : mWindowManager(NULL) | ||||
|     , mSpellNameWidget(NULL) | ||||
| { | ||||
| } | ||||
| 
 | ||||
|  | @ -226,7 +229,7 @@ void MWSpell::setSpellId(const std::string &spellId) | |||
|     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 = | ||||
|         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); | ||||
|     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(); | ||||
|     for (std::vector<ESM::ENAMstruct>::const_iterator it = spell->mEffects.mList.begin(); it != end; ++it) | ||||
|     { | ||||
|  | @ -286,7 +289,7 @@ MWSpell::~MWSpell() | |||
| /* MWEffectList */ | ||||
| 
 | ||||
| MWEffectList::MWEffectList() | ||||
|     : mWindowManager(nullptr) | ||||
|     : mWindowManager(NULL) | ||||
|     , mEffectList(0) | ||||
| { | ||||
| } | ||||
|  | @ -297,11 +300,11 @@ void MWEffectList::setEffectList(const SpellEffectList& list) | |||
|     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
 | ||||
|     // 2 steps: first, create all widgets and check their width....
 | ||||
|     MWSpellEffectPtr effect = nullptr; | ||||
|     MWSpellEffectPtr effect = NULL; | ||||
|     int maxwidth = coord.width; | ||||
| 
 | ||||
|     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
 | ||||
|     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); | ||||
|         bool needcenter = center && (maxwidth > effect->getRequestedWidth()); | ||||
|  | @ -375,9 +378,9 @@ SpellEffectList MWEffectList::effectListFromESM(const ESM::EffectList* effects) | |||
| /* MWSpellEffect */ | ||||
| 
 | ||||
| MWSpellEffect::MWSpellEffect() | ||||
|     : mWindowManager(nullptr) | ||||
|     , mImageWidget(nullptr) | ||||
|     , mTextWidget(nullptr) | ||||
|     : mWindowManager(NULL) | ||||
|     , mImageWidget(NULL) | ||||
|     , mTextWidget(NULL) | ||||
|     , mRequestedWidth(0) | ||||
| { | ||||
| } | ||||
|  | @ -485,9 +488,9 @@ void MWSpellEffect::initialiseOverride() | |||
| MWDynamicStat::MWDynamicStat() | ||||
| : mValue(0) | ||||
| , mMax(1) | ||||
| , mTextWidget(nullptr) | ||||
| , mBarWidget(nullptr) | ||||
| , mBarTextWidget(nullptr) | ||||
| , mTextWidget(NULL) | ||||
| , mBarWidget(NULL) | ||||
| , mBarTextWidget(NULL) | ||||
| { | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -2,11 +2,17 @@ | |||
| #define MWGUI_WIDGETS_H | ||||
| 
 | ||||
| #include "../mwworld/esmstore.hpp" | ||||
| 
 | ||||
| #include <MyGUI.h> | ||||
| 
 | ||||
| #include "../mwmechanics/stat.hpp" | ||||
| 
 | ||||
| #include <MyGUI_Widget.h> | ||||
| #include <MyGUI_TextBox.h> | ||||
| #include <MyGUI_Button.h> | ||||
| 
 | ||||
| namespace MyGUI | ||||
| { | ||||
|     class ImageBox; | ||||
| } | ||||
| 
 | ||||
| namespace MWBase | ||||
| { | ||||
|     class WindowManager; | ||||
|  | @ -118,7 +124,8 @@ namespace MWGui | |||
|             MWBase::WindowManager *mManager; | ||||
|             ESM::Skill::SkillEnum mSkillId; | ||||
|             SkillValue mValue; | ||||
|             MyGUI::WidgetPtr mSkillNameWidget, mSkillValueWidget; | ||||
|             MyGUI::Widget* mSkillNameWidget; | ||||
|             MyGUI::Widget* mSkillValueWidget; | ||||
|         }; | ||||
|         typedef MWSkill* MWSkillPtr; | ||||
| 
 | ||||
|  | @ -160,7 +167,8 @@ namespace MWGui | |||
|             MWBase::WindowManager *mManager; | ||||
|             int mId; | ||||
|             AttributeValue mValue; | ||||
|             MyGUI::WidgetPtr mAttributeNameWidget, mAttributeValueWidget; | ||||
|             MyGUI::Widget* mAttributeNameWidget; | ||||
|             MyGUI::Widget* mAttributeValueWidget; | ||||
|         }; | ||||
|         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 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; } | ||||
| 
 | ||||
|  | @ -230,7 +238,7 @@ namespace MWGui | |||
|              * @param center the effect widgets horizontally | ||||
|              * @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: | ||||
|             virtual ~MWEffectList(); | ||||
|  |  | |||
|  | @ -3,7 +3,7 @@ | |||
| #include <cassert> | ||||
| #include <iterator> | ||||
| 
 | ||||
| #include "MyGUI_UString.h" | ||||
| #include <MyGUI_UString.h> | ||||
| 
 | ||||
| #include <openengine/ogre/renderer.hpp> | ||||
| #include <openengine/gui/manager.hpp> | ||||
|  |  | |||
|  | @ -1,9 +1,10 @@ | |||
| #include <MyGUI.h> | ||||
| #include <MyGUI_OgrePlatform.h> | ||||
| #include <cassert> | ||||
| 
 | ||||
| #include "manager.hpp" | ||||
| 
 | ||||
| #include <MyGUI_Gui.h> | ||||
| #include <MyGUI_OgrePlatform.h> | ||||
| 
 | ||||
| #include <cassert> | ||||
| 
 | ||||
| using namespace OEngine::GUI; | ||||
| 
 | ||||
| /*
 | ||||
|  |  | |||
|  | @ -1,6 +1,8 @@ | |||
| #ifndef OENGINE_MYGUI_MANAGER_H | ||||
| #define OENGINE_MYGUI_MANAGER_H | ||||
| 
 | ||||
| #include <string> | ||||
| 
 | ||||
| namespace MyGUI | ||||
| { | ||||
|   class Gui; | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue