From 90d90b6d8196cf4a09ae9efc46c1bae3fae230ff Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Thu, 20 Apr 2017 17:24:34 +0400 Subject: [PATCH 1/3] Fixed dynamic stats tooltips in review menu --- apps/openmw/mwgui/review.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/apps/openmw/mwgui/review.cpp b/apps/openmw/mwgui/review.cpp index d2971a093..11d79e307 100644 --- a/apps/openmw/mwgui/review.cpp +++ b/apps/openmw/mwgui/review.cpp @@ -160,22 +160,31 @@ namespace MWGui void ReviewDialog::setHealth(const MWMechanics::DynamicStat& value) { - mHealth->setValue(static_cast(value.getCurrent()), static_cast(value.getModified())); - std::string valStr = MyGUI::utility::toString(value.getCurrent()) + "/" + MyGUI::utility::toString(value.getModified()); + int current = std::max(0, static_cast(value.getCurrent())); + int modified = static_cast(value.getModified()); + + mHealth->setValue(current, modified); + std::string valStr = MyGUI::utility::toString(current) + "/" + MyGUI::utility::toString(modified); mHealth->setUserString("Caption_HealthDescription", "#{sHealthDesc}\n" + valStr); } void ReviewDialog::setMagicka(const MWMechanics::DynamicStat& value) { - mMagicka->setValue(static_cast(value.getCurrent()), static_cast(value.getModified())); - std::string valStr = MyGUI::utility::toString(value.getCurrent()) + "/" + MyGUI::utility::toString(value.getModified()); + int current = std::max(0, static_cast(value.getCurrent())); + int modified = static_cast(value.getModified()); + + mMagicka->setValue(current, modified); + std::string valStr = MyGUI::utility::toString(current) + "/" + MyGUI::utility::toString(modified); mMagicka->setUserString("Caption_HealthDescription", "#{sMagDesc}\n" + valStr); } void ReviewDialog::setFatigue(const MWMechanics::DynamicStat& value) { - mFatigue->setValue(static_cast(value.getCurrent()), static_cast(value.getModified())); - std::string valStr = MyGUI::utility::toString(value.getCurrent()) + "/" + MyGUI::utility::toString(value.getModified()); + int current = std::max(0, static_cast(value.getCurrent())); + int modified = static_cast(value.getModified()); + + mFatigue->setValue(current, modified); + std::string valStr = MyGUI::utility::toString(current) + "/" + MyGUI::utility::toString(modified); mFatigue->setUserString("Caption_HealthDescription", "#{sFatDesc}\n" + valStr); } From 0a90b48e60c0554c23a0e39d5732d0166c06f011 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Thu, 20 Apr 2017 17:37:37 +0400 Subject: [PATCH 2/3] Fixed progressbars layout in review menu --- files/mygui/openmw_text.skin.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/files/mygui/openmw_text.skin.xml b/files/mygui/openmw_text.skin.xml index e442e37ee..163b9d134 100644 --- a/files/mygui/openmw_text.skin.xml +++ b/files/mygui/openmw_text.skin.xml @@ -139,24 +139,24 @@ color_misc=0,205,205 # ???? - + - + - + - + From c65c643abe3969a772e71bc849fddb9f021ef70d Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Thu, 20 Apr 2017 21:30:13 +0400 Subject: [PATCH 3/3] Fixed race menu skills layout --- files/mygui/openmw_chargen_race.layout | 2 +- files/mygui/openmw_resources.xml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/files/mygui/openmw_chargen_race.layout b/files/mygui/openmw_chargen_race.layout index 58eb6f6f7..bddede361 100644 --- a/files/mygui/openmw_chargen_race.layout +++ b/files/mygui/openmw_chargen_race.layout @@ -84,7 +84,7 @@ - + diff --git a/files/mygui/openmw_resources.xml b/files/mygui/openmw_resources.xml index 662d78ab7..ef11d10a0 100644 --- a/files/mygui/openmw_resources.xml +++ b/files/mygui/openmw_resources.xml @@ -68,11 +68,13 @@ - + + - + +