diff --git a/apps/openmw/mwgui/hud.cpp b/apps/openmw/mwgui/hud.cpp index 4c448f5b2..9abd91a85 100644 --- a/apps/openmw/mwgui/hud.cpp +++ b/apps/openmw/mwgui/hud.cpp @@ -223,7 +223,7 @@ namespace MWGui int modified = static_cast(value.getModified()); MyGUI::Widget* w; - std::string valStr = MyGUI::utility::toString(current) + "/" + MyGUI::utility::toString(modified); + std::string valStr = MyGUI::utility::toString(current) + " / " + MyGUI::utility::toString(modified); if (id == "HBar") { mHealth->setProgressRange(modified); diff --git a/apps/openmw/mwgui/review.cpp b/apps/openmw/mwgui/review.cpp index 11d79e307..1a680b801 100644 --- a/apps/openmw/mwgui/review.cpp +++ b/apps/openmw/mwgui/review.cpp @@ -164,7 +164,7 @@ namespace MWGui int modified = static_cast(value.getModified()); mHealth->setValue(current, modified); - std::string valStr = MyGUI::utility::toString(current) + "/" + MyGUI::utility::toString(modified); + std::string valStr = MyGUI::utility::toString(current) + " / " + MyGUI::utility::toString(modified); mHealth->setUserString("Caption_HealthDescription", "#{sHealthDesc}\n" + valStr); } @@ -174,7 +174,7 @@ namespace MWGui int modified = static_cast(value.getModified()); mMagicka->setValue(current, modified); - std::string valStr = MyGUI::utility::toString(current) + "/" + MyGUI::utility::toString(modified); + std::string valStr = MyGUI::utility::toString(current) + " / " + MyGUI::utility::toString(modified); mMagicka->setUserString("Caption_HealthDescription", "#{sMagDesc}\n" + valStr); } @@ -184,7 +184,7 @@ namespace MWGui int modified = static_cast(value.getModified()); mFatigue->setValue(current, modified); - std::string valStr = MyGUI::utility::toString(current) + "/" + MyGUI::utility::toString(modified); + std::string valStr = MyGUI::utility::toString(current) + " / " + MyGUI::utility::toString(modified); mFatigue->setUserString("Caption_HealthDescription", "#{sFatDesc}\n" + valStr); } diff --git a/apps/openmw/mwgui/statswindow.cpp b/apps/openmw/mwgui/statswindow.cpp index 780e4905e..22140b8b2 100644 --- a/apps/openmw/mwgui/statswindow.cpp +++ b/apps/openmw/mwgui/statswindow.cpp @@ -154,7 +154,7 @@ namespace MWGui // health, magicka, fatigue tooltip MyGUI::Widget* w; - std::string valStr = MyGUI::utility::toString(current) + "/" + MyGUI::utility::toString(modified); + std::string valStr = MyGUI::utility::toString(current) + " / " + MyGUI::utility::toString(modified); if (id == "HBar") { getWidget(w, "Health"); @@ -618,13 +618,13 @@ namespace MWGui if (rankData.mSkill1 > 0) text += "\n#{sNeedOneSkill} " + MyGUI::utility::toString(rankData.mSkill1); if (rankData.mSkill2 > 0) - text += "\n#{sNeedTwoSkills} " + MyGUI::utility::toString(rankData.mSkill2); + text += " #{sand} #{sNeedTwoSkills} " + MyGUI::utility::toString(rankData.mSkill2); } } w->setUserString("ToolTipType", "Layout"); - w->setUserString("ToolTipLayout", "TextToolTip"); - w->setUserString("Caption_Text", text); + w->setUserString("ToolTipLayout", "FactionToolTip"); + w->setUserString("Caption_FactionText", text); } } diff --git a/apps/openmw/mwgui/tooltips.cpp b/apps/openmw/mwgui/tooltips.cpp index 712caea39..fad78d9a6 100644 --- a/apps/openmw/mwgui/tooltips.cpp +++ b/apps/openmw/mwgui/tooltips.cpp @@ -709,20 +709,28 @@ namespace MWGui void ToolTips::createSpecializationToolTip(MyGUI::Widget* widget, const std::string& name, int specId) { - widget->setUserString("Caption_CenteredCaption", name); + widget->setUserString("Caption_Caption", name); std::string specText; // get all skills of this specialisation const MWWorld::Store &skills = MWBase::Environment::get().getWorld()->getStore().get(); + bool isFirst = true; MWWorld::Store::iterator it = skills.begin(); for (; it != skills.end(); ++it) { if (it->second.mData.mSpecialization == specId) - specText += std::string("\n#{") + ESM::Skill::sSkillNameIds[it->first] + "}"; + { + if (isFirst) + isFirst = false; + else + specText += "\n"; + + specText += std::string("#{") + ESM::Skill::sSkillNameIds[it->first] + "}"; + } } - widget->setUserString("Caption_CenteredCaptionText", specText); - widget->setUserString("ToolTipLayout", "TextWithCenteredCaptionToolTip"); + widget->setUserString("Caption_ColumnText", specText); + widget->setUserString("ToolTipLayout", "SpecializationToolTip"); widget->setUserString("ToolTipType", "Layout"); } @@ -777,7 +785,7 @@ namespace MWGui { if (it == categories[category].spells.begin()) { - text += std::string("\n#{fontcolourhtml=header}") + std::string("#{") + categories[category].label + "}"; + text += std::string("\n\n#{fontcolourhtml=header}") + std::string("#{") + categories[category].label + "}"; } const std::string &spellId = *it; @@ -795,7 +803,7 @@ namespace MWGui widget->setUserString("Caption_CenteredCaption", playerRace->mName); widget->setUserString("Caption_CenteredCaptionText", playerRace->mDescription); widget->setUserString("ToolTipType", "Layout"); - widget->setUserString("ToolTipLayout", "TextWithCenteredCaptionToolTip"); + widget->setUserString("ToolTipLayout", "RaceToolTip"); } void ToolTips::createClassToolTip(MyGUI::Widget* widget, const ESM::Class& playerClass) diff --git a/apps/openmw/mwmechanics/enchanting.cpp b/apps/openmw/mwmechanics/enchanting.cpp index 714b5a09c..a658c379a 100644 --- a/apps/openmw/mwmechanics/enchanting.cpp +++ b/apps/openmw/mwmechanics/enchanting.cpp @@ -172,14 +172,14 @@ namespace MWMechanics const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore(); std::vector mEffects = mEffectList.mList; - float enchantmentCost = 0; - int effectsLeftCnt = mEffects.size(); + int enchantmentCost = 0; + float cost = 0; for (std::vector::const_iterator it = mEffects.begin(); it != mEffects.end(); ++it) { float baseCost = (store.get().find(it->mEffectID))->mData.mBaseCost; - int magMin = (it->mMagnMin == 0) ? 1 : it->mMagnMin; - int magMax = (it->mMagnMax == 0) ? 1 : it->mMagnMax; - int area = (it->mArea == 0) ? 1 : it->mArea; + int magMin = std::max(1, it->mMagnMin); + int magMax = std::max(1, it->mMagnMax); + int area = std::max(1, it->mArea); float magnitudeCost = (magMin + magMax) * baseCost * 0.05f; if (mCastStyle == ESM::Enchantment::ConstantEffect) @@ -195,16 +195,17 @@ namespace MWMechanics const float fEffectCostMult = store.get().find("fEffectCostMult")->getFloat(); - float cost = (magnitudeCost + areaCost) * fEffectCostMult; + cost += (magnitudeCost + areaCost) * fEffectCostMult; + + cost = std::max(1.f, cost); + if (it->mRange == ESM::RT_Target) cost *= 1.5; - enchantmentCost += cost * effectsLeftCnt; - enchantmentCost = std::max(1.f, enchantmentCost); - --effectsLeftCnt; + enchantmentCost += static_cast(cost); } - return static_cast(enchantmentCost); + return enchantmentCost; } diff --git a/components/resource/bulletshapemanager.cpp b/components/resource/bulletshapemanager.cpp index ef35b31ef..010917572 100644 --- a/components/resource/bulletshapemanager.cpp +++ b/components/resource/bulletshapemanager.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include @@ -42,7 +43,11 @@ struct GetTriangleFunctor return btVector3(vec.x(), vec.y(), vec.z()); } +#if OSG_MIN_VERSION_REQUIRED(3,5,6) + void inline operator()( const osg::Vec3 v1, const osg::Vec3 v2, const osg::Vec3 v3 ) +#else void inline operator()( const osg::Vec3 v1, const osg::Vec3 v2, const osg::Vec3 v3, bool _temp ) +#endif { if (mTriMesh) mTriMesh->addTriangle( toBullet(mMatrix.preMult(v1)), toBullet(mMatrix.preMult(v2)), toBullet(mMatrix.preMult(v3))); diff --git a/files/mygui/openmw_stats_window.layout b/files/mygui/openmw_stats_window.layout index d9860ae20..098b3c2d8 100644 --- a/files/mygui/openmw_stats_window.layout +++ b/files/mygui/openmw_stats_window.layout @@ -87,12 +87,12 @@ - + - + diff --git a/files/mygui/openmw_tooltips.layout b/files/mygui/openmw_tooltips.layout index 6d4421702..a7eeabfa5 100644 --- a/files/mygui/openmw_tooltips.layout +++ b/files/mygui/openmw_tooltips.layout @@ -18,27 +18,56 @@ - + - + - + - - + + - + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + @@ -46,15 +75,16 @@ - + - + + - + @@ -68,7 +98,7 @@ - + @@ -84,9 +114,9 @@ - + - + @@ -97,7 +127,7 @@ - + @@ -105,20 +135,21 @@ - + - + + - + - + @@ -126,9 +157,9 @@ - + - + @@ -136,30 +167,35 @@ - + - + - + + + + - + + + - + @@ -173,9 +209,9 @@ - + - + @@ -184,35 +220,41 @@ - + - + - + + + + - - + + + + + - - - + + + @@ -233,9 +275,9 @@ - + - + @@ -244,13 +286,13 @@ - + - + @@ -258,7 +300,7 @@ - +