From 987677db75c6078207de48f52ca28182ff3b4a53 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Sun, 30 Apr 2017 22:39:05 +0400 Subject: [PATCH] Tooltips: dynamic stats, birthsign and hand-to-hand layout fixes --- apps/openmw/mwgui/hud.cpp | 2 +- apps/openmw/mwgui/review.cpp | 6 +++--- apps/openmw/mwgui/statswindow.cpp | 2 +- apps/openmw/mwgui/tooltips.cpp | 2 +- files/mygui/openmw_tooltips.layout | 8 ++++---- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/openmw/mwgui/hud.cpp b/apps/openmw/mwgui/hud.cpp index 7ce2dfa8b..84e5794e3 100644 --- a/apps/openmw/mwgui/hud.cpp +++ b/apps/openmw/mwgui/hud.cpp @@ -183,7 +183,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..ce7ac915c 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"); diff --git a/apps/openmw/mwgui/tooltips.cpp b/apps/openmw/mwgui/tooltips.cpp index 9b6a3bb70..fad78d9a6 100644 --- a/apps/openmw/mwgui/tooltips.cpp +++ b/apps/openmw/mwgui/tooltips.cpp @@ -785,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; diff --git a/files/mygui/openmw_tooltips.layout b/files/mygui/openmw_tooltips.layout index 2d7d514eb..3d40b3260 100644 --- a/files/mygui/openmw_tooltips.layout +++ b/files/mygui/openmw_tooltips.layout @@ -86,7 +86,7 @@ - + @@ -102,9 +102,9 @@ - + - + @@ -115,7 +115,7 @@ - +