From 64212c0ee6c4a7e51ff8d36c4b4e23d9e6506fb5 Mon Sep 17 00:00:00 2001 From: scrawl Date: Wed, 21 Mar 2012 14:54:02 +0100 Subject: [PATCH] replaced all the StaticImage and StaticText in code --- apps/openmw/mwgui/birth.cpp | 2 +- apps/openmw/mwgui/birth.hpp | 2 +- apps/openmw/mwgui/class.cpp | 2 +- apps/openmw/mwgui/class.hpp | 16 +++--- apps/openmw/mwgui/layouts.hpp | 18 +++--- apps/openmw/mwgui/review.cpp | 25 +++++---- apps/openmw/mwgui/review.hpp | 8 +-- apps/openmw/mwgui/stats_window.cpp | 24 ++++---- apps/openmw/mwgui/stats_window.hpp | 6 +- apps/openmw/mwgui/widgets.hpp | 10 ++-- extern/mygui_3.0.1/openmw_resources/core.skin | 2 +- .../openmw_chargen_class_layout.xml | 10 ++-- ...w_chargen_generate_class_result_layout.xml | 4 +- .../openmw_resources/openmw_hud_layout.xml | 14 ++--- .../openmw_infobox_layout.xml | 2 +- .../openmw_journal_layout.xml | 4 +- .../openmw_map_window_layout.xml | 4 +- .../openmw_stats_window_layout.xml | 56 +++++++++---------- .../openmw_resources/openmw_text.skin.xml | 22 ++++---- libs/openengine/gui/layout.hpp | 16 +++--- 20 files changed, 124 insertions(+), 123 deletions(-) diff --git a/apps/openmw/mwgui/birth.cpp b/apps/openmw/mwgui/birth.cpp index d5ea48397..9efa30e20 100644 --- a/apps/openmw/mwgui/birth.cpp +++ b/apps/openmw/mwgui/birth.cpp @@ -188,7 +188,7 @@ void BirthDialog::updateSpells() { if (!categories[category].spells.empty()) { - MyGUI::StaticTextPtr label = spellArea->createWidget("SandBrightText", coord, MyGUI::Align::Default, std::string("Label")); + MyGUI::TextBox* label = spellArea->createWidget("SandBrightText", coord, MyGUI::Align::Default, std::string("Label")); label->setCaption(mWindowManager.getGameSettingString(categories[category].label, "")); spellItems.push_back(label); coord.top += lineHeight; diff --git a/apps/openmw/mwgui/birth.hpp b/apps/openmw/mwgui/birth.hpp index bb4d727cc..0280d8fb3 100644 --- a/apps/openmw/mwgui/birth.hpp +++ b/apps/openmw/mwgui/birth.hpp @@ -51,7 +51,7 @@ namespace MWGui MyGUI::ListPtr birthList; MyGUI::WidgetPtr spellArea; - MyGUI::StaticImagePtr birthImage; + MyGUI::ImageBox* birthImage; std::vector spellItems; std::string currentBirthId; diff --git a/apps/openmw/mwgui/class.cpp b/apps/openmw/mwgui/class.cpp index 410a5c2e4..4d2f212fd 100644 --- a/apps/openmw/mwgui/class.cpp +++ b/apps/openmw/mwgui/class.cpp @@ -248,7 +248,7 @@ void PickClassDialog::updateStats() /* InfoBoxDialog */ -void InfoBoxDialog::fitToText(MyGUI::StaticTextPtr widget) +void InfoBoxDialog::fitToText(MyGUI::TextBox* widget) { MyGUI::IntCoord inner = widget->getTextRegion(); MyGUI::IntCoord outer = widget->getCoord(); diff --git a/apps/openmw/mwgui/class.hpp b/apps/openmw/mwgui/class.hpp index 0ee85967a..eb0a52db0 100644 --- a/apps/openmw/mwgui/class.hpp +++ b/apps/openmw/mwgui/class.hpp @@ -43,11 +43,11 @@ namespace MWGui private: - void fitToText(MyGUI::StaticTextPtr widget); + void fitToText(MyGUI::TextBox* widget); void layoutVertically(MyGUI::WidgetPtr widget, int margin); int currentButton; MyGUI::WidgetPtr textBox; - MyGUI::StaticTextPtr text; + MyGUI::TextBox* text; MyGUI::WidgetPtr buttonBar; std::vector buttons; }; @@ -90,8 +90,8 @@ namespace MWGui void onBackClicked(MyGUI::Widget* _sender); private: - MyGUI::StaticImagePtr classImage; - MyGUI::StaticTextPtr className; + MyGUI::ImageBox* classImage; + MyGUI::TextBox* className; std::string currentClassId; }; @@ -125,9 +125,9 @@ namespace MWGui void updateClasses(); void updateStats(); - MyGUI::StaticImagePtr classImage; + MyGUI::ImageBox* classImage; MyGUI::ListPtr classList; - MyGUI::StaticTextPtr specializationName; + MyGUI::TextBox* specializationName; Widgets::MWAttributePtr favoriteAttribute[2]; Widgets::MWSkillPtr majorSkill[5]; Widgets::MWSkillPtr minorSkill[5]; @@ -160,7 +160,7 @@ namespace MWGui void onCancelClicked(MyGUI::Widget* _sender); private: - MyGUI::StaticTextPtr specialization0, specialization1, specialization2; + MyGUI::TextBox *specialization0, *specialization1, *specialization2; ESM::Class::Specialization specializationId; }; @@ -287,7 +287,7 @@ namespace MWGui private: MyGUI::EditPtr editName; - MyGUI::StaticTextPtr specializationName; + MyGUI::TextBox* specializationName; Widgets::MWAttributePtr favoriteAttribute0, favoriteAttribute1; Widgets::MWSkillPtr majorSkill[5]; Widgets::MWSkillPtr minorSkill[5]; diff --git a/apps/openmw/mwgui/layouts.hpp b/apps/openmw/mwgui/layouts.hpp index ddefacfdb..71181e48d 100644 --- a/apps/openmw/mwgui/layouts.hpp +++ b/apps/openmw/mwgui/layouts.hpp @@ -45,18 +45,18 @@ namespace MWGui void setBatchCount(size_t count); MyGUI::ProgressPtr health, magicka, stamina; - MyGUI::StaticImagePtr weapImage, spellImage; + MyGUI::ImageBox *weapImage, *spellImage; MyGUI::ProgressPtr weapStatus, spellStatus; MyGUI::WidgetPtr effectBox; - MyGUI::StaticImagePtr effect1; - MyGUI::StaticImagePtr minimap; - MyGUI::StaticImagePtr compass; - MyGUI::StaticImagePtr crosshair; + MyGUI::ImageBox* effect1; + MyGUI::ImageBox* minimap; + MyGUI::ImageBox* compass; + MyGUI::ImageBox* crosshair; MyGUI::WidgetPtr fpsbox; - MyGUI::StaticTextPtr fpscounter; - MyGUI::StaticTextPtr trianglecounter; - MyGUI::StaticTextPtr batchcounter; + MyGUI::TextBox* fpscounter; + MyGUI::TextBox* trianglecounter; + MyGUI::TextBox* batchcounter; }; class MapWindow : public OEngine::GUI::Layout @@ -127,7 +127,7 @@ namespace MWGui getWidget(avatar, "Avatar"); // Adjust armor rating text to bottom of avatar widget - MyGUI::StaticTextPtr armor_rating; + MyGUI::TextBox* armor_rating; getWidget(armor_rating, "ArmorRating"); armor_rating->setCaption("Armor: 11"); MyGUI::IntCoord coord = armor_rating->getCoord(); diff --git a/apps/openmw/mwgui/review.cpp b/apps/openmw/mwgui/review.cpp index 315b41868..140f9537d 100644 --- a/apps/openmw/mwgui/review.cpp +++ b/apps/openmw/mwgui/review.cpp @@ -81,7 +81,7 @@ ReviewDialog::ReviewDialog(WindowManager& parWindowManager) for (int i = 0; i < ESM::Skill::Length; ++i) { skillValues.insert(std::make_pair(i, MWMechanics::Stat())); - skillWidgetMap.insert(std::make_pair(i, static_cast (0))); + skillWidgetMap.insert(std::make_pair(i, static_cast (0))); } static_cast(mMainWidget)->eventWindowChangeCoord += MyGUI::newDelegate(this, &ReviewDialog::onWindowResize); @@ -176,7 +176,7 @@ void ReviewDialog::setAttribute(ESM::Attribute::AttributeID attributeId, const M void ReviewDialog::setSkillValue(ESM::Skill::SkillEnum skillId, const MWMechanics::Stat& value) { skillValues[skillId] = value; - MyGUI::StaticTextPtr widget = skillWidgetMap[skillId]; + MyGUI::TextBox* widget = skillWidgetMap[skillId]; if (widget) { float modified = value.getModified(), base = value.getBase(); @@ -210,7 +210,7 @@ void ReviewDialog::configureSkills(const std::vector& major, const std::vec } } -void ReviewDialog::setStyledText(MyGUI::StaticTextPtr widget, ColorStyle style, const std::string &value) +void ReviewDialog::setStyledText(MyGUI::TextBox* widget, ColorStyle style, const std::string &value) { widget->setCaption(value); if (style == CS_Super) @@ -223,7 +223,7 @@ void ReviewDialog::setStyledText(MyGUI::StaticTextPtr widget, ColorStyle style, void ReviewDialog::addSeparator(MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2) { - MyGUI::StaticImagePtr separator = skillClientWidget->createWidget("MW_HLine", MyGUI::IntCoord(10, coord1.top, coord1.width + coord2.width - 4, 18), MyGUI::Align::Default); + MyGUI::ImageBox* separator = skillClientWidget->createWidget("MW_HLine", MyGUI::IntCoord(10, coord1.top, coord1.width + coord2.width - 4, 18), MyGUI::Align::Default); skillWidgets.push_back(separator); coord1.top += separator->getHeight(); @@ -232,7 +232,7 @@ void ReviewDialog::addSeparator(MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2 void ReviewDialog::addGroup(const std::string &label, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2) { - MyGUI::StaticTextPtr groupWidget = skillClientWidget->createWidget("SandBrightText", MyGUI::IntCoord(0, coord1.top, coord1.width + coord2.width, coord1.height), MyGUI::Align::Default); + MyGUI::TextBox* groupWidget = skillClientWidget->createWidget("SandBrightText", MyGUI::IntCoord(0, coord1.top, coord1.width + coord2.width, coord1.height), MyGUI::Align::Default); groupWidget->setCaption(label); skillWidgets.push_back(groupWidget); @@ -240,14 +240,15 @@ void ReviewDialog::addGroup(const std::string &label, MyGUI::IntCoord &coord1, M coord2.top += lineHeight; } -MyGUI::StaticTextPtr ReviewDialog::addValueItem(const std::string text, const std::string &value, ColorStyle style, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2) +MyGUI::TextBox* ReviewDialog::addValueItem(const std::string text, const std::string &value, ColorStyle style, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2) { - MyGUI::StaticTextPtr skillNameWidget, skillValueWidget; + MyGUI::TextBox* skillNameWidget; + MyGUI::TextBox* skillValueWidget; - skillNameWidget = skillClientWidget->createWidget("SandText", coord1, MyGUI::Align::Default); + skillNameWidget = skillClientWidget->createWidget("SandText", coord1, MyGUI::Align::Default); skillNameWidget->setCaption(text); - skillValueWidget = skillClientWidget->createWidget("SandTextRight", coord2, MyGUI::Align::Default); + skillValueWidget = skillClientWidget->createWidget("SandTextRight", coord2, MyGUI::Align::Default); setStyledText(skillValueWidget, style, value); skillWidgets.push_back(skillNameWidget); @@ -261,9 +262,9 @@ MyGUI::StaticTextPtr ReviewDialog::addValueItem(const std::string text, const st void ReviewDialog::addItem(const std::string text, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2) { - MyGUI::StaticTextPtr skillNameWidget; + MyGUI::TextBox* skillNameWidget; - skillNameWidget = skillClientWidget->createWidget("SandText", coord1 + MyGUI::IntSize(coord2.width, 0), MyGUI::Align::Default); + skillNameWidget = skillClientWidget->createWidget("SandText", coord1 + MyGUI::IntSize(coord2.width, 0), MyGUI::Align::Default); skillNameWidget->setCaption(text); skillWidgets.push_back(skillNameWidget); @@ -299,7 +300,7 @@ void ReviewDialog::addSkills(const SkillList &skills, const std::string &titleId style = CS_Super; else if (modified < base) style = CS_Sub; - MyGUI::StaticTextPtr widget = addValueItem(mWindowManager.getGameSettingString(skillNameId, skillNameId), boost::lexical_cast(static_cast(modified)), style, coord1, coord2); + MyGUI::TextBox* widget = addValueItem(mWindowManager.getGameSettingString(skillNameId, skillNameId), boost::lexical_cast(static_cast(modified)), style, coord1, coord2); skillWidgetMap[skillId] = widget; } } diff --git a/apps/openmw/mwgui/review.hpp b/apps/openmw/mwgui/review.hpp index 22b2bc49e..464fe3860 100644 --- a/apps/openmw/mwgui/review.hpp +++ b/apps/openmw/mwgui/review.hpp @@ -75,11 +75,11 @@ namespace MWGui CS_Normal, CS_Super }; - void setStyledText(MyGUI::StaticTextPtr widget, ColorStyle style, const std::string &value); + void setStyledText(MyGUI::TextBox* widget, ColorStyle style, const std::string &value); void addSkills(const SkillList &skills, const std::string &titleId, const std::string &titleDefault, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2); void addSeparator(MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2); void addGroup(const std::string &label, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2); - MyGUI::StaticTextPtr addValueItem(const std::string text, const std::string &value, ColorStyle style, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2); + MyGUI::TextBox* addValueItem(const std::string text, const std::string &value, ColorStyle style, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2); void addItem(const std::string text, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2); void updateScroller(); void updateSkillArea(); @@ -89,7 +89,7 @@ namespace MWGui static const int lineHeight; - MyGUI::StaticTextPtr nameWidget, raceWidget, classWidget, birthSignWidget; + MyGUI::TextBox *nameWidget, *raceWidget, *classWidget, *birthSignWidget; MyGUI::WidgetPtr skillAreaWidget, skillClientWidget; MyGUI::VScrollPtr skillScrollerWidget; int lastPos, clientHeight; @@ -100,7 +100,7 @@ namespace MWGui SkillList majorSkills, minorSkills, miscSkills; std::map > skillValues; - std::map skillWidgetMap; + std::map skillWidgetMap; std::string name, raceId, birthSignId; ESM::Class klass; std::vector skillWidgets; //< Skills and other information diff --git a/apps/openmw/mwgui/stats_window.cpp b/apps/openmw/mwgui/stats_window.cpp index 805624e6f..f8608ae92 100644 --- a/apps/openmw/mwgui/stats_window.cpp +++ b/apps/openmw/mwgui/stats_window.cpp @@ -54,7 +54,7 @@ StatsWindow::StatsWindow (WindowManager& parWindowManager) for (int i = 0; i < ESM::Skill::Length; ++i) { skillValues.insert(std::pair >(i, MWMechanics::Stat())); - skillWidgetMap.insert(std::pair(i, nullptr)); + skillWidgetMap.insert(std::pair(i, nullptr)); } MyGUI::WindowPtr t = static_cast(mMainWidget); @@ -98,7 +98,7 @@ void StatsWindow::setPlayerName(const std::string& playerName) static_cast(mMainWidget)->setCaption(playerName); } -void StatsWindow::setStyledText(MyGUI::StaticTextPtr widget, ColorStyle style, const std::string &value) +void StatsWindow::setStyledText(MyGUI::TextBox* widget, ColorStyle style, const std::string &value) { widget->setCaption(value); if (style == CS_Super) @@ -175,7 +175,7 @@ void StatsWindow::setValue (const std::string& id, int value) void StatsWindow::setValue(const ESM::Skill::SkillEnum parSkill, const MWMechanics::Stat& value) { skillValues[parSkill] = value; - MyGUI::StaticTextPtr widget = skillWidgetMap[(int)parSkill]; + MyGUI::TextBox* widget = skillWidgetMap[(int)parSkill]; if (widget) { float modified = value.getModified(), base = value.getBase(); @@ -221,7 +221,7 @@ void StatsWindow::setBirthSign (const std::string& signId) void StatsWindow::addSeparator(MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2) { - MyGUI::StaticImagePtr separator = skillClientWidget->createWidget("MW_HLine", MyGUI::IntCoord(10, coord1.top, coord1.width + coord2.width - 4, 18), MyGUI::Align::Default); + MyGUI::ImageBox* separator = skillClientWidget->createWidget("MW_HLine", MyGUI::IntCoord(10, coord1.top, coord1.width + coord2.width - 4, 18), MyGUI::Align::Default); skillWidgets.push_back(separator); coord1.top += separator->getHeight(); @@ -230,7 +230,7 @@ void StatsWindow::addSeparator(MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2) void StatsWindow::addGroup(const std::string &label, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2) { - MyGUI::StaticTextPtr groupWidget = skillClientWidget->createWidget("SandBrightText", MyGUI::IntCoord(0, coord1.top, coord1.width + coord2.width, coord1.height), MyGUI::Align::Default); + MyGUI::TextBox* groupWidget = skillClientWidget->createWidget("SandBrightText", MyGUI::IntCoord(0, coord1.top, coord1.width + coord2.width, coord1.height), MyGUI::Align::Default); groupWidget->setCaption(label); skillWidgets.push_back(groupWidget); @@ -238,14 +238,14 @@ void StatsWindow::addGroup(const std::string &label, MyGUI::IntCoord &coord1, My coord2.top += lineHeight; } -MyGUI::StaticTextPtr StatsWindow::addValueItem(const std::string text, const std::string &value, ColorStyle style, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2) +MyGUI::TextBox* StatsWindow::addValueItem(const std::string text, const std::string &value, ColorStyle style, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2) { - MyGUI::StaticTextPtr skillNameWidget, skillValueWidget; + MyGUI::TextBox *skillNameWidget, *skillValueWidget; - skillNameWidget = skillClientWidget->createWidget("SandText", coord1, MyGUI::Align::Default); + skillNameWidget = skillClientWidget->createWidget("SandText", coord1, MyGUI::Align::Default); skillNameWidget->setCaption(text); - skillValueWidget = skillClientWidget->createWidget("SandTextRight", coord2, MyGUI::Align::Default); + skillValueWidget = skillClientWidget->createWidget("SandTextRight", coord2, MyGUI::Align::Default); setStyledText(skillValueWidget, style, value); skillWidgets.push_back(skillNameWidget); @@ -259,9 +259,9 @@ MyGUI::StaticTextPtr StatsWindow::addValueItem(const std::string text, const std void StatsWindow::addItem(const std::string text, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2) { - MyGUI::StaticTextPtr skillNameWidget; + MyGUI::TextBox* skillNameWidget; - skillNameWidget = skillClientWidget->createWidget("SandText", coord1 + MyGUI::IntSize(coord2.width, 0), MyGUI::Align::Default); + skillNameWidget = skillClientWidget->createWidget("SandText", coord1 + MyGUI::IntSize(coord2.width, 0), MyGUI::Align::Default); skillNameWidget->setCaption(text); skillWidgets.push_back(skillNameWidget); @@ -297,7 +297,7 @@ void StatsWindow::addSkills(const SkillList &skills, const std::string &titleId, style = CS_Super; else if (modified < base) style = CS_Sub; - MyGUI::StaticTextPtr widget = addValueItem(mWindowManager.getGameSettingString(skillNameId, skillNameId), boost::lexical_cast(static_cast(modified)), style, coord1, coord2); + MyGUI::TextBox* widget = addValueItem(mWindowManager.getGameSettingString(skillNameId, skillNameId), boost::lexical_cast(static_cast(modified)), style, coord1, coord2); skillWidgetMap[skillId] = widget; } } diff --git a/apps/openmw/mwgui/stats_window.hpp b/apps/openmw/mwgui/stats_window.hpp index 9db5c240b..2c327f59c 100644 --- a/apps/openmw/mwgui/stats_window.hpp +++ b/apps/openmw/mwgui/stats_window.hpp @@ -49,11 +49,11 @@ namespace MWGui CS_Normal, CS_Super }; - void setStyledText(MyGUI::StaticTextPtr widget, ColorStyle style, const std::string &value); + void setStyledText(MyGUI::TextBox* widget, ColorStyle style, const std::string &value); void addSkills(const SkillList &skills, const std::string &titleId, const std::string &titleDefault, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2); void addSeparator(MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2); void addGroup(const std::string &label, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2); - MyGUI::StaticTextPtr addValueItem(const std::string text, const std::string &value, ColorStyle style, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2); + MyGUI::TextBox* addValueItem(const std::string text, const std::string &value, ColorStyle style, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2); void addItem(const std::string text, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2); void updateScroller(); @@ -68,7 +68,7 @@ namespace MWGui SkillList majorSkills, minorSkills, miscSkills; std::map > skillValues; - std::map skillWidgetMap; + std::map skillWidgetMap; std::map factionWidgetMap; FactionList factions; ///< Stores a list of factions and the current rank std::string birthSignId; diff --git a/apps/openmw/mwgui/widgets.hpp b/apps/openmw/mwgui/widgets.hpp index 9ed5fff5d..4d31ad521 100644 --- a/apps/openmw/mwgui/widgets.hpp +++ b/apps/openmw/mwgui/widgets.hpp @@ -130,7 +130,7 @@ namespace MWGui WindowManager* mWindowManager; std::string id; - MyGUI::StaticTextPtr spellNameWidget; + MyGUI::TextBox* spellNameWidget; }; typedef MWSpell* MWSpellPtr; @@ -158,8 +158,8 @@ namespace MWGui WindowManager* mWindowManager; SpellEffectValue effect; - MyGUI::StaticImagePtr imageWidget; - MyGUI::StaticTextPtr textWidget; + MyGUI::ImageBox* imageWidget; + MyGUI::TextBox* textWidget; }; typedef MWSpellEffect* MWSpellEffectPtr; @@ -183,9 +183,9 @@ namespace MWGui private: int value, max; - MyGUI::StaticTextPtr textWidget; + MyGUI::TextBox* textWidget; MyGUI::ProgressPtr barWidget; - MyGUI::StaticTextPtr barTextWidget; + MyGUI::TextBox* barTextWidget; }; typedef MWDynamicStat* MWDynamicStatPtr; diff --git a/extern/mygui_3.0.1/openmw_resources/core.skin b/extern/mygui_3.0.1/openmw_resources/core.skin index 9947486b5..123e63bff 100644 --- a/extern/mygui_3.0.1/openmw_resources/core.skin +++ b/extern/mygui_3.0.1/openmw_resources/core.skin @@ -1,7 +1,7 @@ - + diff --git a/extern/mygui_3.0.1/openmw_resources/openmw_chargen_class_layout.xml b/extern/mygui_3.0.1/openmw_resources/openmw_chargen_class_layout.xml index 532571ab9..253cbca6e 100644 --- a/extern/mygui_3.0.1/openmw_resources/openmw_chargen_class_layout.xml +++ b/extern/mygui_3.0.1/openmw_resources/openmw_chargen_class_layout.xml @@ -13,16 +13,16 @@ - + - + - + @@ -30,7 +30,7 @@ - + @@ -41,7 +41,7 @@ - + diff --git a/extern/mygui_3.0.1/openmw_resources/openmw_chargen_generate_class_result_layout.xml b/extern/mygui_3.0.1/openmw_resources/openmw_chargen_generate_class_result_layout.xml index 679ec8cfd..50ccd7ebc 100644 --- a/extern/mygui_3.0.1/openmw_resources/openmw_chargen_generate_class_result_layout.xml +++ b/extern/mygui_3.0.1/openmw_resources/openmw_chargen_generate_class_result_layout.xml @@ -8,11 +8,11 @@ - + - + diff --git a/extern/mygui_3.0.1/openmw_resources/openmw_hud_layout.xml b/extern/mygui_3.0.1/openmw_resources/openmw_hud_layout.xml index 2fc9d2b36..09f6fa41c 100644 --- a/extern/mygui_3.0.1/openmw_resources/openmw_hud_layout.xml +++ b/extern/mygui_3.0.1/openmw_resources/openmw_hud_layout.xml @@ -53,7 +53,7 @@ - + @@ -61,20 +61,20 @@ name="FPSBoxAdv"> - + - + - + - + - + - + diff --git a/extern/mygui_3.0.1/openmw_resources/openmw_infobox_layout.xml b/extern/mygui_3.0.1/openmw_resources/openmw_infobox_layout.xml index 63725a5c3..aa5c5ef0d 100644 --- a/extern/mygui_3.0.1/openmw_resources/openmw_infobox_layout.xml +++ b/extern/mygui_3.0.1/openmw_resources/openmw_infobox_layout.xml @@ -5,7 +5,7 @@ - + diff --git a/extern/mygui_3.0.1/openmw_resources/openmw_journal_layout.xml b/extern/mygui_3.0.1/openmw_resources/openmw_journal_layout.xml index 53a05ce90..4a88f4ad6 100644 --- a/extern/mygui_3.0.1/openmw_resources/openmw_journal_layout.xml +++ b/extern/mygui_3.0.1/openmw_resources/openmw_journal_layout.xml @@ -14,8 +14,8 @@ - - + + diff --git a/extern/mygui_3.0.1/openmw_resources/openmw_map_window_layout.xml b/extern/mygui_3.0.1/openmw_resources/openmw_map_window_layout.xml index f4ff50f72..011487de7 100644 --- a/extern/mygui_3.0.1/openmw_resources/openmw_map_window_layout.xml +++ b/extern/mygui_3.0.1/openmw_resources/openmw_map_window_layout.xml @@ -2,8 +2,8 @@ - - + + diff --git a/extern/mygui_3.0.1/openmw_resources/openmw_stats_window_layout.xml b/extern/mygui_3.0.1/openmw_resources/openmw_stats_window_layout.xml index 14b282ce4..fc9baacf4 100644 --- a/extern/mygui_3.0.1/openmw_resources/openmw_stats_window_layout.xml +++ b/extern/mygui_3.0.1/openmw_resources/openmw_stats_window_layout.xml @@ -5,51 +5,51 @@ - - - + + + - - - + + + - - - - - - + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff --git a/extern/mygui_3.0.1/openmw_resources/openmw_text.skin.xml b/extern/mygui_3.0.1/openmw_resources/openmw_text.skin.xml index c5815da8c..d97aedb83 100644 --- a/extern/mygui_3.0.1/openmw_resources/openmw_text.skin.xml +++ b/extern/mygui_3.0.1/openmw_resources/openmw_text.skin.xml @@ -70,16 +70,16 @@ - + - + - - + + @@ -97,24 +97,24 @@ - + - + - + - + - + - + - + diff --git a/libs/openengine/gui/layout.hpp b/libs/openengine/gui/layout.hpp index 36ba12273..3c03423c3 100644 --- a/libs/openengine/gui/layout.hpp +++ b/libs/openengine/gui/layout.hpp @@ -13,7 +13,7 @@ namespace GUI class Layout { public: - Layout(const std::string & _layout, MyGUI::WidgetPtr _parent = nullptr) + Layout(const std::string & _layout, MyGUI::Widget* _parent = nullptr) : mMainWidget(nullptr) { initialise(_layout, _parent); } virtual ~Layout() { shutdown(); } @@ -25,7 +25,7 @@ namespace GUI for (MyGUI::VectorWidgetPtr::iterator iter=mListWindowRoot.begin(); iter!=mListWindowRoot.end(); ++iter) { - MyGUI::WidgetPtr find = (*iter)->findWidget(mPrefix + _name); + MyGUI::Widget* find = (*iter)->findWidget(mPrefix + _name); if (nullptr != find) { T * cast = find->castType(false); @@ -44,7 +44,7 @@ namespace GUI } void initialise(const std::string & _layout, - MyGUI::WidgetPtr _parent = nullptr) + MyGUI::Widget* _parent = nullptr) { const std::string MAIN_WINDOW = "_Main"; mLayoutName = _layout; @@ -87,30 +87,30 @@ namespace GUI void setText(const std::string& name, const std::string& caption) { - MyGUI::WidgetPtr pt; + MyGUI::Widget* pt; getWidget(pt, name); static_cast(pt)->setCaption(caption); } void setTextColor(const std::string& name, float r, float g, float b) { - MyGUI::WidgetPtr pt; + MyGUI::Widget* pt; getWidget(pt, name); - MyGUI::StaticText *st = dynamic_cast(pt); + MyGUI::TextBox *st = dynamic_cast(pt); if(st != NULL) st->setTextColour(MyGUI::Colour(b,g,r)); } void setImage(const std::string& name, const std::string& imgName) { - MyGUI::StaticImagePtr pt; + MyGUI::ImageBox* pt; getWidget(pt, name); pt->setImageTexture(imgName); } protected: - MyGUI::WidgetPtr mMainWidget; + MyGUI::Widget* mMainWidget; std::string mPrefix; std::string mLayoutName; MyGUI::VectorWidgetPtr mListWindowRoot;