mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 14:59:54 +00:00
Merge branch 'count' into 'master'
Improve item count handling See merge request OpenMW/openmw!2430
This commit is contained in:
commit
f7da42870e
3 changed files with 5 additions and 5 deletions
|
@ -40,7 +40,7 @@ namespace MWGui
|
||||||
mSlider->setScrollRange(maxCount);
|
mSlider->setScrollRange(maxCount);
|
||||||
mItemText->setCaption(item);
|
mItemText->setCaption(item);
|
||||||
|
|
||||||
int width = std::max(mItemText->getTextSize().width + 128, 320);
|
int width = std::max(mItemText->getTextSize().width + 160, 320);
|
||||||
setCoord(viewSize.width / 2 - width / 2, viewSize.height / 2 - mMainWidget->getHeight() / 2, width,
|
setCoord(viewSize.width / 2 - width / 2, viewSize.height / 2 - mMainWidget->getHeight() / 2, width,
|
||||||
mMainWidget->getHeight());
|
mMainWidget->getHeight());
|
||||||
|
|
||||||
|
|
|
@ -30,11 +30,11 @@ namespace
|
||||||
{
|
{
|
||||||
if (count > 999999999)
|
if (count > 999999999)
|
||||||
return MyGUI::utility::toString(count / 1000000000) + "b";
|
return MyGUI::utility::toString(count / 1000000000) + "b";
|
||||||
else if (count > 9999999)
|
else if (count > 99999999)
|
||||||
return ">9m";
|
return ">9m";
|
||||||
else if (count > 999999)
|
else if (count > 999999)
|
||||||
return MyGUI::utility::toString(count / 1000000) + "m";
|
return MyGUI::utility::toString(count / 1000000) + "m";
|
||||||
else if (count > 9999)
|
else if (count > 99999)
|
||||||
return ">9k";
|
return ">9k";
|
||||||
else if (count > 999)
|
else if (count > 999)
|
||||||
return MyGUI::utility::toString(count / 1000) + "k";
|
return MyGUI::utility::toString(count / 1000) + "k";
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
<Widget type="TextBox" skin="SandText" position="0 4 592 24" align="Left Top HStretch" name="LabelText">
|
<Widget type="TextBox" skin="SandText" position="0 4 592 24" align="Left Top HStretch" name="LabelText">
|
||||||
<Property key="TextAlign" value="Center"/>
|
<Property key="TextAlign" value="Center"/>
|
||||||
</Widget>
|
</Widget>
|
||||||
<Widget type="TextBox" skin="SandText" position="12 36 521 24" align="Left Top HStretch" name="ItemText">
|
<Widget type="TextBox" skin="SandText" position="12 36 471 24" align="Left Top HStretch" name="ItemText">
|
||||||
<Property key="TextAlign" value="Left"/>
|
<Property key="TextAlign" value="Left"/>
|
||||||
</Widget>
|
</Widget>
|
||||||
<Widget type="NumericEditBox" skin="MW_TextEdit" position="535 36 50 24" align="Right Top" name="ItemEdit">
|
<Widget type="NumericEditBox" skin="MW_TextEdit" position="485 36 100 24" align="Right Top" name="ItemEdit">
|
||||||
<Property key="TextAlign" value="Center"/>
|
<Property key="TextAlign" value="Center"/>
|
||||||
</Widget>
|
</Widget>
|
||||||
<Widget type="ScrollBar" skin="MW_HScroll" position="7 67 578 18" align="Left Top HStretch" name="CountSlider">
|
<Widget type="ScrollBar" skin="MW_HScroll" position="7 67 578 18" align="Left Top HStretch" name="CountSlider">
|
||||||
|
|
Loading…
Reference in a new issue