forked from teamnwah/openmw-tes3coop
add duration to spell icons too
and use gmststrings instead of direct strings in tooltips durations can display minutes and hours I don't know any effect lasting an hour or more but you never know...
This commit is contained in:
parent
47e29480ce
commit
1472711583
2 changed files with 18 additions and 1 deletions
|
@ -169,7 +169,7 @@ namespace MWClass
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
|
||||||
text += "\nDuration: " + MWGui::ToolTips::toString(ptr.getClass().getRemainingUsageTime(ptr));
|
text += "\n#{sDuration}: " + MWGui::ToolTips::toString(ptr.getClass().getRemainingUsageTime(ptr));
|
||||||
if (ref->mBase->mData.mWeight != 0)
|
if (ref->mBase->mData.mWeight != 0)
|
||||||
{
|
{
|
||||||
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->mBase->mData.mWeight);
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->mBase->mData.mWeight);
|
||||||
|
|
|
@ -133,6 +133,23 @@ namespace MWGui
|
||||||
MWBase::Environment::get().getWindowManager()->getGameSettingString("spoints", "") :
|
MWBase::Environment::get().getWindowManager()->getGameSettingString("spoints", "") :
|
||||||
MWBase::Environment::get().getWindowManager()->getGameSettingString("spoint", "") );
|
MWBase::Environment::get().getWindowManager()->getGameSettingString("spoint", "") );
|
||||||
}
|
}
|
||||||
|
if (effectIt->mRemainingTime > -1) {
|
||||||
|
sourcesDescription += " #{sDuration}: ";
|
||||||
|
float duration = effectIt->mRemainingTime;
|
||||||
|
if (duration > 3600) {
|
||||||
|
int hour = duration / 3600;
|
||||||
|
duration -= hour*3600;
|
||||||
|
sourcesDescription += MWGui::ToolTips::toString(hour) + "h";
|
||||||
|
}
|
||||||
|
if (duration > 60) {
|
||||||
|
int minute = duration / 60;
|
||||||
|
duration -= minute*60;
|
||||||
|
sourcesDescription += MWGui::ToolTips::toString(minute) + "m";
|
||||||
|
}
|
||||||
|
if (duration > 0.1) {
|
||||||
|
sourcesDescription += MWGui::ToolTips::toString(duration) + "s";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue