mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
Merge remote-tracking branch 'miroslavr/master'
This commit is contained in:
commit
71a2424500
@ -26,6 +26,7 @@ namespace MWGui
|
||||
getWidget(mLevelText, "LevelText");
|
||||
getWidget(mLevelDescription, "LevelDescription");
|
||||
getWidget(mCoinBox, "Coins");
|
||||
getWidget(mAssignWidget, "AssignWidget");
|
||||
|
||||
mOkButton->eventMouseButtonClick += MyGUI::newDelegate(this, &LevelupDialog::onOkButtonClicked);
|
||||
|
||||
@ -83,13 +84,19 @@ namespace MWGui
|
||||
{
|
||||
const int coinSpacing = 10;
|
||||
int curX = mCoinBox->getWidth()/2 - (coinSpacing*(mCoinCount - 1) + 16*mCoinCount)/2;
|
||||
for (unsigned int i=0; i<mCoinCount; ++i)
|
||||
for (unsigned int i=0; i<sMaxCoins; ++i)
|
||||
{
|
||||
MyGUI::ImageBox* image = mCoins[i];
|
||||
image->detachFromWidget();
|
||||
image->attachToWidget(mCoinBox);
|
||||
image->setCoord(MyGUI::IntCoord(curX,0,16,16));
|
||||
curX += 16+coinSpacing;
|
||||
if (i < mCoinCount)
|
||||
{
|
||||
mCoins[i]->setVisible(true);
|
||||
image->setCoord(MyGUI::IntCoord(curX,0,16,16));
|
||||
curX += 16+coinSpacing;
|
||||
}
|
||||
else
|
||||
mCoins[i]->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -100,13 +107,13 @@ namespace MWGui
|
||||
{
|
||||
MyGUI::ImageBox* image = mCoins[i];
|
||||
image->detachFromWidget();
|
||||
image->attachToWidget(mMainWidget);
|
||||
image->attachToWidget(mAssignWidget);
|
||||
|
||||
int attribute = mSpentAttributes[i];
|
||||
|
||||
int xdiff = mAttributeMultipliers[attribute]->getCaption() == "" ? 0 : 20;
|
||||
|
||||
MyGUI::IntPoint pos = mAttributes[attribute]->getAbsolutePosition() - mMainWidget->getAbsolutePosition() - MyGUI::IntPoint(22+xdiff,0);
|
||||
MyGUI::IntPoint pos = mAttributes[attribute]->getAbsolutePosition() - mAssignWidget->getAbsolutePosition() - MyGUI::IntPoint(22+xdiff,0);
|
||||
pos.top += (mAttributes[attribute]->getHeight() - image->getHeight())/2;
|
||||
image->setPosition(pos);
|
||||
}
|
||||
@ -178,14 +185,6 @@ namespace MWGui
|
||||
|
||||
mCoinCount = std::min(sMaxCoins, availableAttributes);
|
||||
|
||||
for (unsigned int i = 0; i < sMaxCoins; i++)
|
||||
{
|
||||
if (i < mCoinCount)
|
||||
mCoins[i]->attachToWidget(mCoinBox);
|
||||
else
|
||||
mCoins[i]->detachFromWidget();
|
||||
}
|
||||
|
||||
mSpentAttributes.clear();
|
||||
resetCoins();
|
||||
|
||||
|
@ -20,6 +20,7 @@ namespace MWGui
|
||||
MyGUI::EditBox* mLevelDescription;
|
||||
|
||||
MyGUI::Widget* mCoinBox;
|
||||
MyGUI::Widget* mAssignWidget;
|
||||
|
||||
std::vector<MyGUI::Button*> mAttributes;
|
||||
std::vector<MyGUI::TextBox*> mAttributeValues;
|
||||
|
@ -559,6 +559,8 @@ namespace MWGui
|
||||
Box * b = dynamic_cast<Box*>(parent);
|
||||
if (b)
|
||||
b->notifyChildrenSizeChanged();
|
||||
else
|
||||
break;
|
||||
parent = parent->getParent();
|
||||
}
|
||||
}
|
||||
|
@ -92,7 +92,6 @@
|
||||
<UserString key="HStretch" value="true"/>
|
||||
</Widget>
|
||||
</Widget>
|
||||
<Widget type="Widget"/>
|
||||
</Widget>
|
||||
|
||||
<!-- Available effects -->
|
||||
|
@ -16,7 +16,7 @@
|
||||
<Widget type="AutoSizedTextBox" skin="SandText" position="28 218 391 24" name="LevelText">
|
||||
</Widget>
|
||||
|
||||
<Widget type="AutoSizedEditBox" skin="SandText" position="36 280 330 24" name="LevelDescription">
|
||||
<Widget type="AutoSizedEditBox" skin="SandText" position="36 280 391 24" name="LevelDescription">
|
||||
<Property key="MultiLine" value="true"/>
|
||||
<Property key="WordWrap" value="true"/>
|
||||
<Property key="Static" value="true"/>
|
||||
@ -27,20 +27,20 @@
|
||||
<UserString key="VStretch" value="false"/>
|
||||
</Widget>
|
||||
|
||||
<Widget type="Widget" skin="" position="0 280 350 100">
|
||||
<Widget type="Widget" skin="" position="0 280 391 100" name="AssignWidget">
|
||||
<UserString key="HStretch" value="false"/>
|
||||
<UserString key="VStretch" value="false"/>
|
||||
|
||||
<Widget type="TextBox" skin="SandTextVCenter" position="0 0 100 24" name="AttribMultiplier1"/>
|
||||
<Widget type="TextBox" skin="SandTextVCenter" position="0 24 100 24" name="AttribMultiplier2"/>
|
||||
<Widget type="TextBox" skin="SandTextVCenter" position="0 48 100 24" name="AttribMultiplier3"/>
|
||||
<Widget type="TextBox" skin="SandTextVCenter" position="0 72 100 24" name="AttribMultiplier4"/>
|
||||
<Widget type="TextBox" skin="SandTextVCenter" position="200 0 100 24" name="AttribMultiplier5"/>
|
||||
<Widget type="TextBox" skin="SandTextVCenter" position="200 24 100 24" name="AttribMultiplier6"/>
|
||||
<Widget type="TextBox" skin="SandTextVCenter" position="200 48 100 24" name="AttribMultiplier7"/>
|
||||
<Widget type="TextBox" skin="SandTextVCenter" position="200 72 100 24" name="AttribMultiplier8"/>
|
||||
<Widget type="TextBox" skin="SandTextVCenter" position="22 0 100 24" name="AttribMultiplier1"/>
|
||||
<Widget type="TextBox" skin="SandTextVCenter" position="22 24 100 24" name="AttribMultiplier2"/>
|
||||
<Widget type="TextBox" skin="SandTextVCenter" position="22 48 100 24" name="AttribMultiplier3"/>
|
||||
<Widget type="TextBox" skin="SandTextVCenter" position="22 72 100 24" name="AttribMultiplier4"/>
|
||||
<Widget type="TextBox" skin="SandTextVCenter" position="218 0 100 24" name="AttribMultiplier5"/>
|
||||
<Widget type="TextBox" skin="SandTextVCenter" position="218 24 100 24" name="AttribMultiplier6"/>
|
||||
<Widget type="TextBox" skin="SandTextVCenter" position="218 48 100 24" name="AttribMultiplier7"/>
|
||||
<Widget type="TextBox" skin="SandTextVCenter" position="218 72 100 24" name="AttribMultiplier8"/>
|
||||
|
||||
<Widget type="HBox" position="22 0 200 24">
|
||||
<Widget type="HBox" position="42 0 200 24">
|
||||
<Widget type="AutoSizedButton" skin="SandTextButton" name="Attrib1">
|
||||
<UserString key="TextPadding" value="0 0"/>
|
||||
<UserString key="ToolTipType" value="Layout"/>
|
||||
@ -54,7 +54,7 @@
|
||||
</Widget>
|
||||
</Widget>
|
||||
|
||||
<Widget type="HBox" position="22 24 200 24">
|
||||
<Widget type="HBox" position="42 24 200 24">
|
||||
<Widget type="AutoSizedButton" skin="SandTextButton" name="Attrib2">
|
||||
<UserString key="TextPadding" value="0 0"/>
|
||||
<UserString key="ToolTipType" value="Layout"/>
|
||||
@ -68,7 +68,7 @@
|
||||
</Widget>
|
||||
</Widget>
|
||||
|
||||
<Widget type="HBox" position="22 48 200 24">
|
||||
<Widget type="HBox" position="42 48 200 24">
|
||||
<Widget type="AutoSizedButton" skin="SandTextButton" name="Attrib3">
|
||||
<UserString key="TextPadding" value="0 0"/>
|
||||
<UserString key="ToolTipType" value="Layout"/>
|
||||
@ -82,7 +82,7 @@
|
||||
</Widget>
|
||||
</Widget>
|
||||
|
||||
<Widget type="HBox" position="22 72 200 24">
|
||||
<Widget type="HBox" position="42 72 200 24">
|
||||
<Widget type="AutoSizedButton" skin="SandTextButton" name="Attrib4">
|
||||
<UserString key="TextPadding" value="0 0"/>
|
||||
<UserString key="ToolTipType" value="Layout"/>
|
||||
@ -97,7 +97,7 @@
|
||||
</Widget>
|
||||
|
||||
|
||||
<Widget type="HBox" position="222 0 200 24">
|
||||
<Widget type="HBox" position="238 0 200 24">
|
||||
<Widget type="AutoSizedButton" skin="SandTextButton" name="Attrib5">
|
||||
<UserString key="TextPadding" value="0 0"/>
|
||||
<UserString key="ToolTipType" value="Layout"/>
|
||||
@ -111,7 +111,7 @@
|
||||
</Widget>
|
||||
</Widget>
|
||||
|
||||
<Widget type="HBox" position="222 24 200 24">
|
||||
<Widget type="HBox" position="238 24 200 24">
|
||||
<Widget type="AutoSizedButton" skin="SandTextButton" name="Attrib6">
|
||||
<UserString key="TextPadding" value="0 0"/>
|
||||
<UserString key="ToolTipType" value="Layout"/>
|
||||
@ -125,7 +125,7 @@
|
||||
</Widget>
|
||||
</Widget>
|
||||
|
||||
<Widget type="HBox" position="222 48 200 24">
|
||||
<Widget type="HBox" position="238 48 200 24">
|
||||
<Widget type="AutoSizedButton" skin="SandTextButton" name="Attrib7">
|
||||
<UserString key="TextPadding" value="0 0"/>
|
||||
<UserString key="ToolTipType" value="Layout"/>
|
||||
@ -139,7 +139,7 @@
|
||||
</Widget>
|
||||
</Widget>
|
||||
|
||||
<Widget type="HBox" position="222 72 200 24">
|
||||
<Widget type="HBox" position="238 72 200 24">
|
||||
<Widget type="AutoSizedButton" skin="SandTextButton" name="Attrib8">
|
||||
<UserString key="TextPadding" value="0 0"/>
|
||||
<UserString key="ToolTipType" value="Layout"/>
|
||||
|
Loading…
Reference in New Issue
Block a user