From cd3e976b7ce5a79d9a47d6b734419632b78d435d Mon Sep 17 00:00:00 2001 From: Jan Borsodi Date: Tue, 21 Sep 2010 12:34:47 +0200 Subject: [PATCH] Added birthsign dialog and spell effect widget. --- apps/openmw/CMakeLists.txt | 2 + apps/openmw/engine.cpp | 1 + apps/openmw/mwgui/birth.cpp | 224 ++++++++++++++++++ apps/openmw/mwgui/birth.hpp | 70 ++++++ apps/openmw/mwgui/widgets.cpp | 154 +++++++++++- apps/openmw/mwgui/widgets.hpp | 39 +++ apps/openmw/mwgui/window_manager.cpp | 49 +++- apps/openmw/mwgui/window_manager.hpp | 8 +- components/esm/defs.hpp | 9 +- extern/mygui_3.0.1/CMakeLists.txt | 1 + .../openmw_chargen_birth_layout.xml | 25 ++ .../openmw_resources/openmw_text.skin.xml | 5 + 12 files changed, 583 insertions(+), 4 deletions(-) create mode 100644 apps/openmw/mwgui/birth.cpp create mode 100644 apps/openmw/mwgui/birth.hpp create mode 100644 extern/mygui_3.0.1/openmw_resources/openmw_chargen_birth_layout.xml diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index 89cd02d84..c7935cb77 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -39,6 +39,7 @@ set(GAMEGUI_HEADER mwgui/widgets.hpp mwgui/race.hpp mwgui/class.hpp + mwgui/birth.hpp mwgui/window_manager.hpp mwgui/console.hpp ) @@ -49,6 +50,7 @@ set(GAMEGUI mwgui/text_input.cpp mwgui/widgets.cpp mwgui/race.cpp + mwgui/birth.cpp mwgui/class.cpp ) source_group(apps\\openmw\\mwgui FILES ${GAMEGUI_HEADER} ${GAMEGUI}) diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index 6a2398c94..6cd3ded1e 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -243,6 +243,7 @@ void OMW::Engine::go() MyGUI::FactoryManager::getInstance().registerFactory("Widget"); MyGUI::FactoryManager::getInstance().registerFactory("Widget"); MyGUI::FactoryManager::getInstance().registerFactory("Widget"); + MyGUI::FactoryManager::getInstance().registerFactory("Widget"); // Create window manager - this manages all the MW-specific GUI windows MWScript::registerExtensions (mExtensions); diff --git a/apps/openmw/mwgui/birth.cpp b/apps/openmw/mwgui/birth.cpp new file mode 100644 index 000000000..da3e7f1b9 --- /dev/null +++ b/apps/openmw/mwgui/birth.cpp @@ -0,0 +1,224 @@ +#include "birth.hpp" +#include "../mwworld/environment.hpp" +#include "../mwworld/world.hpp" +#include "window_manager.hpp" +#include "widgets.hpp" +#include "components/esm_store/store.hpp" + +#include +#include + +using namespace MWGui; +using namespace Widgets; + +BirthDialog::BirthDialog(MWWorld::Environment& environment, MyGUI::IntSize gameWindowSize) + : Layout("openmw_chargen_birth_layout.xml") + , environment(environment) +{ + // Centre dialog + MyGUI::IntCoord coord = mMainWidget->getCoord(); + coord.left = (gameWindowSize.width - coord.width)/2; + coord.top = (gameWindowSize.height - coord.height)/2; + mMainWidget->setCoord(coord); + + WindowManager *wm = environment.mWindowManager; + + getWidget(spellArea, "SpellArea"); + + getWidget(birthImage, "BirthsignImage"); + + getWidget(birthList, "BirthsignList"); + birthList->setScrollVisible(true); + birthList->eventListSelectAccept = MyGUI::newDelegate(this, &BirthDialog::onSelectBirth); + birthList->eventListMouseItemActivate = MyGUI::newDelegate(this, &BirthDialog::onSelectBirth); + birthList->eventListChangePosition = MyGUI::newDelegate(this, &BirthDialog::onSelectBirth); + + // TODO: These buttons should be managed by a Dialog class + MyGUI::ButtonPtr backButton; + getWidget(backButton, "BackButton"); + backButton->eventMouseButtonClick = MyGUI::newDelegate(this, &BirthDialog::onBackClicked); + + MyGUI::ButtonPtr okButton; + getWidget(okButton, "OKButton"); + okButton->eventMouseButtonClick = MyGUI::newDelegate(this, &BirthDialog::onOkClicked); + + updateBirths(); + updateSpells(); +} + +void BirthDialog::setNextButtonShow(bool shown) +{ + MyGUI::ButtonPtr backButton; + getWidget(backButton, "BackButton"); + + MyGUI::ButtonPtr okButton; + getWidget(okButton, "OKButton"); + + // TODO: All hardcoded coords for buttons are temporary, will be replaced with a dynamic system. + if (shown) + { + okButton->setCaption("Next"); + + // Adjust back button when next is shown + backButton->setCoord(MyGUI::IntCoord(375 - 18, 340, 53, 23)); + okButton->setCoord(MyGUI::IntCoord(431 - 18, 340, 42 + 18, 23)); + } + else + { + okButton->setCaption("OK"); + backButton->setCoord(MyGUI::IntCoord(375, 340, 53, 23)); + okButton->setCoord(MyGUI::IntCoord(431, 340, 42, 23)); + } +} + +void BirthDialog::open() +{ + updateBirths(); + updateSpells(); + setVisible(true); +} + + +void BirthDialog::setBirthId(const std::string &birthId) +{ + currentBirthId = birthId; + birthList->setIndexSelected(MyGUI::ITEM_NONE); + size_t count = birthList->getItemCount(); + for (size_t i = 0; i < count; ++i) + { + if (boost::iequals(*birthList->getItemDataAt(i), birthId)) + { + birthList->setIndexSelected(i); + break; + } + } + + updateSpells(); +} + +// widget controls + +void BirthDialog::onOkClicked(MyGUI::Widget* _sender) +{ + eventDone(); +} + +void BirthDialog::onBackClicked(MyGUI::Widget* _sender) +{ + eventBack(); +} + +void BirthDialog::onSelectBirth(MyGUI::List* _sender, size_t _index) +{ + if (_index == MyGUI::ITEM_NONE) + return; + + const std::string *birthId = birthList->getItemDataAt(_index); + if (boost::iequals(currentBirthId, *birthId)) + return; + + currentBirthId = *birthId; + updateSpells(); +} + +// update widget content + +void BirthDialog::updateBirths() +{ + birthList->removeAllItems(); + + ESMS::ESMStore &store = environment.mWorld->getStore(); + + ESMS::RecListT::MapType::const_iterator it = store.birthSigns.list.begin(); + ESMS::RecListT::MapType::const_iterator end = store.birthSigns.list.end(); + int index = 0; + for (; it != end; ++it) + { + const ESM::BirthSign &birth = it->second; + birthList->addItem(birth.name, it->first); + if (boost::iequals(it->first, currentBirthId)) + birthList->setIndexSelected(index); + ++index; + } +} + +void BirthDialog::updateSpells() +{ + for (std::vector::iterator it = spellItems.begin(); it != spellItems.end(); ++it) + { + MyGUI::Gui::getInstance().destroyWidget(*it); + } + spellItems.clear(); + + if (currentBirthId.empty()) + return; + + MWSpellPtr spellWidget; + const int lineHeight = 18; + MyGUI::IntCoord coord(0, 0, spellArea->getWidth(), 18); + + ESMS::ESMStore &store = environment.mWorld->getStore(); + const ESM::BirthSign *birth = store.birthSigns.find(currentBirthId); + + std::string texturePath = std::string("textures\\") + birth->texture; + fixTexturePath(texturePath); + birthImage->setImageTexture(texturePath); + + std::vector abilities, powers, spells; + + std::vector::const_iterator it = birth->powers.list.begin(); + std::vector::const_iterator end = birth->powers.list.end(); + for (; it != end; ++it) + { + const std::string &spellId = *it; + const ESM::Spell *spell = store.spells.search(spellId); + if (!spell) + continue; // Skip spells which cannot be found + ESM::Spell::SpellType type = static_cast(spell->data.type); + if (type != ESM::Spell::ST_Spell && type != ESM::Spell::ST_Ability && type != ESM::Spell::ST_Power) + continue; // We only want spell, ability and powers. + + if (type == ESM::Spell::ST_Ability) + abilities.push_back(spellId); + else if (type == ESM::Spell::ST_Power) + powers.push_back(spellId); + else if (type == ESM::Spell::ST_Spell) + spells.push_back(spellId); + } + + int i = 0; + static struct{ const std::vector &spells; const char *label; } categories[3] = { + {abilities, "sBirthsignmenu1"}, + {powers, "sPowers"}, + {spells, "sBirthsignmenu2"} + }; + for (int category = 0; category < 3; ++category) + { + if (!categories[category].spells.empty()) + { + MyGUI::StaticTextPtr label = spellArea->createWidget("SandBrightText", coord, MyGUI::Align::Default, std::string("Label")); + label->setCaption(environment.mWindowManager->getGameSettingString(categories[category].label, "")); + spellItems.push_back(label); + coord.top += lineHeight; + + std::vector::const_iterator end = categories[category].spells.end(); + for (std::vector::const_iterator it = categories[category].spells.begin(); it != end; ++it) + { + const std::string &spellId = *it; + spellWidget = spellArea->createWidget("MW_StatName", coord, MyGUI::Align::Default, std::string("Spell") + boost::lexical_cast(i)); + spellWidget->setEnvironment(&environment); + spellWidget->setSpellId(spellId); + + spellItems.push_back(spellWidget); + coord.top += lineHeight; + + MyGUI::IntCoord spellCoord = coord; + spellCoord.height = 24; // TODO: This should be fetched from the skin somehow, or perhaps a widget in the layout as a template? + spellWidget->createEffectWidgets(spellItems, spellArea, spellCoord); + coord.top = spellCoord.top; + + ++i; + } + } + } +} diff --git a/apps/openmw/mwgui/birth.hpp b/apps/openmw/mwgui/birth.hpp new file mode 100644 index 000000000..ae9067b1a --- /dev/null +++ b/apps/openmw/mwgui/birth.hpp @@ -0,0 +1,70 @@ +#ifndef MWGUI_BIRTH_H +#define MWGUI_BIRTH_H + +#include + +namespace MWWorld +{ + class Environment; +} + +/* + This file contains the dialog for choosing a birth sign. + Layout is defined by resources/mygui/openmw_chargen_race_layout.xml. + */ + +namespace MWGui +{ + using namespace MyGUI; + + class BirthDialog : public OEngine::GUI::Layout + { + public: + BirthDialog(MWWorld::Environment& environment, MyGUI::IntSize gameWindowSize); + + enum Gender + { + GM_Male, + GM_Female + }; + + const std::string &getBirthId() const { return currentBirthId; } + void setBirthId(const std::string &raceId); + + void setNextButtonShow(bool shown); + void open(); + + // Events + typedef delegates::CDelegate0 EventHandle_Void; + + /** Event : Back button clicked.\n + signature : void method()\n + */ + EventHandle_Void eventBack; + + /** Event : Dialog finished, OK button clicked.\n + signature : void method()\n + */ + EventHandle_Void eventDone; + + protected: + void onSelectBirth(MyGUI::List* _sender, size_t _index); + + void onOkClicked(MyGUI::Widget* _sender); + void onBackClicked(MyGUI::Widget* _sender); + + private: + void updateBirths(); + void updateSpells(); + + MWWorld::Environment& environment; + + MyGUI::ListPtr birthList; + MyGUI::WidgetPtr spellArea; + MyGUI::StaticImagePtr birthImage; + std::vector spellItems; + + std::string currentBirthId; + }; +} +#endif diff --git a/apps/openmw/mwgui/widgets.cpp b/apps/openmw/mwgui/widgets.cpp index d6cea2428..e8b127591 100644 --- a/apps/openmw/mwgui/widgets.cpp +++ b/apps/openmw/mwgui/widgets.cpp @@ -4,12 +4,25 @@ #include "../mwworld/world.hpp" #include "components/esm_store/store.hpp" -//#include #include using namespace MWGui; using namespace MWGui::Widgets; +/* Helper functions */ + +/* + * Fixes the filename of a texture path to use the correct .dds extension. + * This is needed on some ESM entries which point to a .tga file instead. + */ +void MWGui::Widgets::fixTexturePath(std::string &path) +{ + int offset = path.rfind("."); + if (offset < 0) + return; + path.replace(offset, path.length() - offset, ".dds"); +} + /* MWSkill */ MWSkill::MWSkill() @@ -224,6 +237,24 @@ void MWSpell::setSpellId(const std::string &spellId) updateWidgets(); } +void MWSpell::createEffectWidgets(std::vector &effects, MyGUI::WidgetPtr creator, MyGUI::IntCoord &coord) +{ + ESMS::ESMStore &store = env->mWorld->getStore(); + const ESM::Spell *spell = store.spells.search(id); + MYGUI_ASSERT(spell, "spell with id '" << id << "' not found"); + + MWSpellEffectPtr effect = nullptr; + std::vector::const_iterator end = spell->effects.list.end(); + for (std::vector::const_iterator it = spell->effects.list.begin(); it != end; ++it) + { + effect = creator->createWidget("MW_EffectImage", coord, MyGUI::Align::Default); + effect->setEnvironment(env); + effect->setSpellEffect(*it); + effects.push_back(effect); + coord.top += effect->getHeight(); + } +} + void MWSpell::updateWidgets() { if (spellNameWidget && env) @@ -272,3 +303,124 @@ void MWSpell::initialiseWidgetSkin(ResourceSkin* _info) void MWSpell::shutdownWidgetSkin() { } + +/* MWSpellEffect */ + +MWSpellEffect::MWSpellEffect() + : env(nullptr) + , imageWidget(nullptr) + , textWidget(nullptr) +{ +} + +void MWSpellEffect::setSpellEffect(SpellEffectValue value) +{ + effect = value; + updateWidgets(); +} + +void MWSpellEffect::updateWidgets() +{ + if (!env) + return; + + ESMS::ESMStore &store = env->mWorld->getStore(); + WindowManager *wm = env->mWindowManager; + const ESM::MagicEffect *magicEffect = store.magicEffects.search(effect.effectID); + if (textWidget) + { + if (magicEffect) + { + // TODO: Get name of effect from GMST + std::string spellLine = ""; + if (effect.skill >= 0 && effect.skill < ESM::Skill::Length) + { + spellLine += " " + wm->getGameSettingString(ESM::Skill::sSkillNameIds[effect.skill], ""); + } + if (effect.attribute >= 0 && effect.attribute < 8) + { + static const char *attributes[8] = { + "sAttributeStrength", + "sAttributeIntelligence", + "sAttributeWillpower", + "sAttributeAgility", + "sAttributeSpeed", + "sAttributeEndurance", + "sAttributePersonality", + "sAttributeLuck" + }; + spellLine += " " + wm->getGameSettingString(attributes[effect.attribute], ""); + } + if (effect.magnMin >= 0 || effect.magnMax >= 0) + { + if (effect.magnMin == effect.magnMax) + spellLine += " " + boost::lexical_cast(effect.magnMin) + " pts"; + else + { + spellLine += " " + boost::lexical_cast(effect.magnMin) + " to " + boost::lexical_cast(effect.magnMin) + " pts"; + } + } + if (effect.duration >= 0) + { + spellLine += " for " + boost::lexical_cast(effect.duration) + " secs"; + } + if (effect.range == ESM::RT_Self) + spellLine += " on Self"; + else if (effect.range == ESM::RT_Touch) + spellLine += " on Touch"; + else if (effect.range == ESM::RT_Target) + spellLine += " on Target"; + textWidget->setCaption(spellLine); + } + else + textWidget->setCaption(""); + } + if (imageWidget) + { + std::string path = std::string("icons\\") + magicEffect->icon; + fixTexturePath(path); + imageWidget->setImageTexture(path); + } +} + +void MWSpellEffect::_initialise(WidgetStyle _style, const IntCoord& _coord, Align _align, ResourceSkin* _info, Widget* _parent, ICroppedRectangle * _croppedParent, IWidgetCreator * _creator, const std::string& _name) +{ + Base::_initialise(_style, _coord, _align, _info, _parent, _croppedParent, _creator, _name); + + initialiseWidgetSkin(_info); +} + +MWSpellEffect::~MWSpellEffect() +{ + shutdownWidgetSkin(); +} + +void MWSpellEffect::baseChangeWidgetSkin(ResourceSkin* _info) +{ + shutdownWidgetSkin(); + Base::baseChangeWidgetSkin(_info); + initialiseWidgetSkin(_info); +} + +void MWSpellEffect::initialiseWidgetSkin(ResourceSkin* _info) +{ + for (VectorWidgetPtr::iterator iter=mWidgetChildSkin.begin(); iter!=mWidgetChildSkin.end(); ++iter) + { + const std::string &name = *(*iter)->_getInternalData(); + if (name == "Text") + { + MYGUI_DEBUG_ASSERT( ! textWidget, "widget already assigned"); + textWidget = (*iter)->castType(); + } + else if (name == "Image") + { + MYGUI_DEBUG_ASSERT( ! imageWidget, "widget already assigned"); + imageWidget = (*iter)->castType(); + } + } +} + +void MWSpellEffect::shutdownWidgetSkin() +{ +} + diff --git a/apps/openmw/mwgui/widgets.hpp b/apps/openmw/mwgui/widgets.hpp index 7d115ec41..f53a82a8d 100644 --- a/apps/openmw/mwgui/widgets.hpp +++ b/apps/openmw/mwgui/widgets.hpp @@ -23,6 +23,8 @@ namespace MWGui namespace Widgets { + void fixTexturePath(std::string &path); + class MYGUI_EXPORT MWSkill : public Widget { MYGUI_RTTI_DERIVED( MWSkill ); @@ -98,6 +100,7 @@ namespace MWGui }; typedef MWAttribute* MWAttributePtr; + class MWSpellEffect; class MYGUI_EXPORT MWSpell : public Widget { MYGUI_RTTI_DERIVED( MWSpell ); @@ -108,6 +111,7 @@ namespace MWGui void setEnvironment(MWWorld::Environment *env_) { env = env_; } void setSpellId(const std::string &id); + void createEffectWidgets(std::vector &effects, MyGUI::WidgetPtr creator, MyGUI::IntCoord &coord); MWWorld::Environment *getEnvironment() const { return env; } const std::string &getSpellId() const { return id; } @@ -131,6 +135,41 @@ namespace MWGui MyGUI::StaticTextPtr spellNameWidget; }; typedef MWSpell* MWSpellPtr; + + class MYGUI_EXPORT MWSpellEffect : public Widget + { + MYGUI_RTTI_DERIVED( MWSpellEffect ); + public: + MWSpellEffect(); + + typedef ESM::ENAMstruct SpellEffectValue; + + void setEnvironment(MWWorld::Environment *env_) { env = env_; } + void setSpellEffect(SpellEffectValue value); + + MWWorld::Environment *getEnvironment() const { return env; } + const SpellEffectValue &getSpellEffect() const { return effect; } + + /*internal:*/ + virtual void _initialise(WidgetStyle _style, const IntCoord& _coord, Align _align, ResourceSkin* _info, Widget* _parent, ICroppedRectangle * _croppedParent, IWidgetCreator * _creator, const std::string& _name); + + protected: + virtual ~MWSpellEffect(); + + void baseChangeWidgetSkin(ResourceSkin* _info); + + private: + void initialiseWidgetSkin(ResourceSkin* _info); + void shutdownWidgetSkin(); + + void updateWidgets(); + + MWWorld::Environment *env; + SpellEffectValue effect; + MyGUI::StaticImagePtr imageWidget; + MyGUI::StaticTextPtr textWidget; + }; + typedef MWSpellEffect* MWSpellEffectPtr; } } diff --git a/apps/openmw/mwgui/window_manager.cpp b/apps/openmw/mwgui/window_manager.cpp index 05c6a229b..dfc568092 100644 --- a/apps/openmw/mwgui/window_manager.cpp +++ b/apps/openmw/mwgui/window_manager.cpp @@ -3,6 +3,7 @@ #include "text_input.hpp" #include "race.hpp" #include "class.hpp" +#include "birth.hpp" #include "../mwmechanics/mechanicsmanager.hpp" #include "../mwinput/inputmanager.hpp" @@ -21,10 +22,11 @@ WindowManager::WindowManager(MyGUI::Gui *_gui, MWWorld::Environment& environment , nameDialog(nullptr) , raceDialog(nullptr) , pickClassDialog(nullptr) + , birthSignDialog(nullptr) , nameChosen(false) , raceChosen(false) , classChosen(false) - , birthChosen(false) + , birthSignChosen(false) , reviewNext(false) , gui(_gui) , mode(GM_Game) @@ -66,6 +68,7 @@ WindowManager::~WindowManager() delete nameDialog; delete raceDialog; delete pickClassDialog; + delete birthSignDialog; } void WindowManager::updateVisible() @@ -136,6 +139,17 @@ void WindowManager::updateVisible() return; } + if (mode == GM_Birth) + { + if (!birthSignDialog) + birthSignDialog = new BirthDialog(environment, gui->getViewSize()); + birthSignDialog->setNextButtonShow(birthSignChosen); + birthSignDialog->eventDone = MyGUI::newDelegate(this, &WindowManager::onBirthSignDialogDone); + birthSignDialog->eventBack = MyGUI::newDelegate(this, &WindowManager::onBirthSignDialogBack); + birthSignDialog->open(); + return; + } + if(mode == GM_Inventory) { // Ah, inventory mode. First, compute the effective set of @@ -337,3 +351,36 @@ void WindowManager::onPickClassDialogBack() environment.mInputManager->setGuiMode(GM_Race); } + +void WindowManager::onBirthSignDialogDone() +{ + birthSignDialog->eventDone = MWGui::BirthDialog::EventHandle_Void(); + + bool goNext = birthSignChosen; // Go to next dialog if birth sign was previously chosen + birthSignChosen = true; + if (birthSignDialog) + { + birthSignDialog->setVisible(false); + environment.mMechanicsManager->setPlayerBirthsign(birthSignDialog->getBirthId()); + } + + updateCharacterGeneration(); + + if (reviewNext || goNext) + environment.mInputManager->setGuiMode(GM_Review); + else + environment.mInputManager->setGuiMode(GM_Game); +} + +void WindowManager::onBirthSignDialogBack() +{ + if (birthSignDialog) + { + birthSignDialog->setVisible(false); + environment.mMechanicsManager->setPlayerBirthsign(birthSignDialog->getBirthId()); + } + + updateCharacterGeneration(); + + environment.mInputManager->setGuiMode(GM_Class); +} diff --git a/apps/openmw/mwgui/window_manager.hpp b/apps/openmw/mwgui/window_manager.hpp index f9499c5e5..80c70f608 100644 --- a/apps/openmw/mwgui/window_manager.hpp +++ b/apps/openmw/mwgui/window_manager.hpp @@ -44,6 +44,7 @@ namespace MWGui class TextInputDialog; class RaceDialog; class PickClassDialog; + class BirthDialog; class WindowManager { @@ -61,12 +62,13 @@ namespace MWGui TextInputDialog *nameDialog; RaceDialog *raceDialog; PickClassDialog *pickClassDialog; + BirthDialog *birthSignDialog; // Which dialogs have been shown, controls back/next/ok buttons bool nameChosen; bool raceChosen; bool classChosen; - bool birthChosen; + bool birthSignChosen; bool reviewNext; ///< If true then any click on Next will cause the summary to be shown @@ -190,6 +192,10 @@ namespace MWGui // Character generation: Pick Class dialog void onPickClassDialogDone(); void onPickClassDialogBack(); + + // Character generation: Birth sign dialog + void onBirthSignDialogDone(); + void onBirthSignDialogBack(); }; } #endif diff --git a/components/esm/defs.hpp b/components/esm/defs.hpp index 52940f812..82e798620 100644 --- a/components/esm/defs.hpp +++ b/components/esm/defs.hpp @@ -27,6 +27,13 @@ enum Specialization SPC_Stealth = 2 }; +enum RangeType + { + RT_Self = 0, + RT_Touch = 1, + RT_Target = 2 + }; + /** A list of references to spells and spell effects. This is shared between the records BSGN, NPC and RACE. */ @@ -64,7 +71,7 @@ struct ENAMstruct char skill, attribute; // -1 if N/A // Other spell parameters - int range; // 0 - self, 1 - touch, 2 - target + int range; // 0 - self, 1 - touch, 2 - target (RangeType enum) int area, duration, magnMin, magnMax; // Struct size should be 24 bytes diff --git a/extern/mygui_3.0.1/CMakeLists.txt b/extern/mygui_3.0.1/CMakeLists.txt index ab4d6236b..f64c64327 100644 --- a/extern/mygui_3.0.1/CMakeLists.txt +++ b/extern/mygui_3.0.1/CMakeLists.txt @@ -44,6 +44,7 @@ configure_file("${SDIR}/openmw_hud_layout.xml" "${DDIR}/openmw_hud_layout.xml" C configure_file("${SDIR}/openmw_text_input_layout.xml" "${DDIR}/openmw_text_input_layout.xml" COPYONLY) configure_file("${SDIR}/openmw_chargen_race_layout.xml" "${DDIR}/openmw_chargen_race_layout.xml" COPYONLY) configure_file("${SDIR}/openmw_chargen_class_layout.xml" "${DDIR}/openmw_chargen_class_layout.xml" COPYONLY) +configure_file("${SDIR}/openmw_chargen_birth_layout.xml" "${DDIR}/openmw_chargen_birth_layout.xml" COPYONLY) configure_file("${SDIR}/openmw_inventory_window_layout.xml" "${DDIR}/openmw_inventory_window_layout.xml" COPYONLY) configure_file("${SDIR}/openmw_layers.xml" "${DDIR}/openmw_layers.xml" COPYONLY) configure_file("${SDIR}/openmw_mainmenu_layout.xml" "${DDIR}/openmw_mainmenu_layout.xml" COPYONLY) diff --git a/extern/mygui_3.0.1/openmw_resources/openmw_chargen_birth_layout.xml b/extern/mygui_3.0.1/openmw_resources/openmw_chargen_birth_layout.xml new file mode 100644 index 000000000..4b2604a34 --- /dev/null +++ b/extern/mygui_3.0.1/openmw_resources/openmw_chargen_birth_layout.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + 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 c615effc4..86487161a 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 @@ -61,4 +61,9 @@ + + + + +