mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-20 11:53:53 +00:00
Merge pull request #1263 from akortunov/chargenfixes
Chargen menus fixes
This commit is contained in:
commit
5eb12ea8b5
4 changed files with 24 additions and 13 deletions
|
@ -160,22 +160,31 @@ namespace MWGui
|
|||
|
||||
void ReviewDialog::setHealth(const MWMechanics::DynamicStat<float>& value)
|
||||
{
|
||||
mHealth->setValue(static_cast<int>(value.getCurrent()), static_cast<int>(value.getModified()));
|
||||
std::string valStr = MyGUI::utility::toString(value.getCurrent()) + "/" + MyGUI::utility::toString(value.getModified());
|
||||
int current = std::max(0, static_cast<int>(value.getCurrent()));
|
||||
int modified = static_cast<int>(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<float>& value)
|
||||
{
|
||||
mMagicka->setValue(static_cast<int>(value.getCurrent()), static_cast<int>(value.getModified()));
|
||||
std::string valStr = MyGUI::utility::toString(value.getCurrent()) + "/" + MyGUI::utility::toString(value.getModified());
|
||||
int current = std::max(0, static_cast<int>(value.getCurrent()));
|
||||
int modified = static_cast<int>(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<float>& value)
|
||||
{
|
||||
mFatigue->setValue(static_cast<int>(value.getCurrent()), static_cast<int>(value.getModified()));
|
||||
std::string valStr = MyGUI::utility::toString(value.getCurrent()) + "/" + MyGUI::utility::toString(value.getModified());
|
||||
int current = std::max(0, static_cast<int>(value.getCurrent()));
|
||||
int modified = static_cast<int>(value.getModified());
|
||||
|
||||
mFatigue->setValue(current, modified);
|
||||
std::string valStr = MyGUI::utility::toString(current) + "/" + MyGUI::utility::toString(modified);
|
||||
mFatigue->setUserString("Caption_HealthDescription", "#{sFatDesc}\n" + valStr);
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
<Property key="Caption" value="#{sBack}"/>
|
||||
</Widget>
|
||||
<Widget type="AutoSizedButton" skin="MW_Button" position="532 397 42 23" name="OKButton">
|
||||
<Property key="Caption" value="#{sOK]"/>
|
||||
<Property key="Caption" value="#{sOK}"/>
|
||||
</Widget>
|
||||
</Widget>
|
||||
</Widget>
|
||||
|
|
|
@ -68,11 +68,13 @@
|
|||
<Resource type="ResourceLayout" name="MW_StatNameValue" version="3.2.0">
|
||||
<Widget type="Widget" skin="" position="0 0 200 18" name="Root">
|
||||
<Property key="NeedMouse" value="true"/>
|
||||
<Widget type="TextBox" skin="SandText" position="0 0 160 18" align="Left HStretch" name="StatName">
|
||||
<Widget type="TextBox" skin="SandText" position="0 0 168 18" align="Left HStretch" name="StatName">
|
||||
<Property key="NeedMouse" value="false"/>
|
||||
<Property key="TextAlign" value="Left"/>
|
||||
</Widget>
|
||||
<Widget type="TextBox" skin="SandTextRight" position="160 0 40 18" align="Right Top" name="StatValue">
|
||||
<Widget type="TextBox" skin="SandTextRight" position="168 0 32 18" align="Right Top" name="StatValue">
|
||||
<Property key="NeedMouse" value="false"/>
|
||||
<Property key="TextAlign" value="Right"/>
|
||||
</Widget>
|
||||
</Widget>
|
||||
</Resource>
|
||||
|
|
|
@ -139,24 +139,24 @@ color_misc=0,205,205 # ????
|
|||
|
||||
<Resource type="ResourceSkin" name="MW_ChargeBar_Blue" size="204 18">
|
||||
<Child type="ProgressBar" skin="MW_Progress_Blue" offset="0 0 204 18" align="Right Top Stretch" name="Bar"/>
|
||||
<Child type="TextBox" skin="ProgressText" offset="0 1 204 14" align="Right Top Stretch" name="BarText"/>
|
||||
<Child type="TextBox" skin="ProgressText" offset="0 0 204 16" align="Right Top Stretch" name="BarText"/>
|
||||
</Resource>
|
||||
|
||||
<Resource type="ResourceSkin" name="MW_DynamicStat_Red" size="204 18">
|
||||
<Child type="TextBox" skin="SandText" offset="0 0 100 18" align="Left Top" name="Text"/>
|
||||
<Child type="ProgressBar" skin="MW_Progress_Red" offset="74 0 130 18" align="Right Top" name="Bar"/>
|
||||
<Child type="TextBox" skin="ProgressText" offset="74 0 130 18" align="Right Top" name="BarText"/>
|
||||
<Child type="TextBox" skin="ProgressText" offset="74 0 130 14" align="Right Top" name="BarText"/>
|
||||
</Resource>
|
||||
|
||||
<Resource type="ResourceSkin" name="MW_DynamicStat_Blue" size="204 18">
|
||||
<Child type="TextBox" skin="SandText" offset="0 0 100 18" align="Left Top" name="Text"/>
|
||||
<Child type="ProgressBar" skin="MW_Progress_Blue" offset="74 0 130 18" align="Right Top" name="Bar"/>
|
||||
<Child type="TextBox" skin="ProgressText" offset="74 0 130 18" align="Right Top" name="BarText"/>
|
||||
<Child type="TextBox" skin="ProgressText" offset="74 0 130 14" align="Right Top" name="BarText"/>
|
||||
</Resource>
|
||||
|
||||
<Resource type="ResourceSkin" name="MW_DynamicStat_Green" size="204 18">
|
||||
<Child type="TextBox" skin="SandText" offset="0 0 100 18" align="Left Top" name="Text"/>
|
||||
<Child type="ProgressBar" skin="MW_Progress_Green" offset="74 0 130 18" align="Right Top" name="Bar"/>
|
||||
<Child type="TextBox" skin="ProgressText" offset="74 0 130 18" align="Right Top" name="BarText"/>
|
||||
<Child type="TextBox" skin="ProgressText" offset="74 0 130 14" align="Right Top" name="BarText"/>
|
||||
</Resource>
|
||||
</MyGUI>
|
||||
|
|
Loading…
Reference in a new issue