mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Merge branch 'master' into 'master'
Some checks failed
Build and test / MacOS (push) Has been cancelled
Build and test / Read .env file and expose it as output (push) Has been cancelled
Build and test / Ubuntu (push) Has been cancelled
Build and test / Windows (2019) (push) Has been cancelled
Build and test / Windows (2022) (push) Has been cancelled
Some checks failed
Build and test / MacOS (push) Has been cancelled
Build and test / Read .env file and expose it as output (push) Has been cancelled
Build and test / Ubuntu (push) Has been cancelled
Build and test / Windows (2019) (push) Has been cancelled
Build and test / Windows (2022) (push) Has been cancelled
Add Player Gold Counter to Spell Creation Window See merge request OpenMW/openmw!4610
This commit is contained in:
commit
5f79fe0977
6 changed files with 30 additions and 4 deletions
|
@ -50,7 +50,7 @@ namespace MWGui
|
|||
getWidget(mBuyButton, "BuyButton");
|
||||
getWidget(mPrice, "PriceLabel");
|
||||
getWidget(mPriceText, "PriceTextLabel");
|
||||
|
||||
getWidget(mPlayerGold, "PlayerGold");
|
||||
setWidgets(mAvailableEffectsList, mUsedEffectsView);
|
||||
|
||||
mCancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &EnchantingDialog::onCancelButtonClicked);
|
||||
|
@ -65,6 +65,10 @@ namespace MWGui
|
|||
{
|
||||
center();
|
||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mName);
|
||||
|
||||
MWWorld::Ptr player = MWMechanics::getPlayer();
|
||||
int playerGold = player.getClass().getContainerStore(player).count(MWWorld::ContainerStore::sGoldId);
|
||||
mPlayerGold->setCaptionWithReplacing(MyGUI::utility::toString(playerGold));
|
||||
}
|
||||
|
||||
void EnchantingDialog::setSoulGem(const MWWorld::Ptr& gem)
|
||||
|
|
|
@ -70,6 +70,7 @@ namespace MWGui
|
|||
MyGUI::TextBox* mSuccessChance;
|
||||
MyGUI::TextBox* mPrice;
|
||||
MyGUI::TextBox* mPriceText;
|
||||
MyGUI::TextBox* mPlayerGold;
|
||||
|
||||
MWMechanics::Enchanting mEnchanting;
|
||||
ESM::EffectList mEffectList;
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
|
||||
namespace
|
||||
{
|
||||
|
||||
bool sortMagicEffects(short id1, short id2)
|
||||
{
|
||||
const MWWorld::Store<ESM::GameSetting>& gmst
|
||||
|
@ -352,6 +351,7 @@ namespace MWGui
|
|||
getWidget(mAvailableEffectsList, "AvailableEffects");
|
||||
getWidget(mUsedEffectsView, "UsedEffects");
|
||||
getWidget(mPriceLabel, "PriceLabel");
|
||||
getWidget(mPlayerGold, "PlayerGold");
|
||||
getWidget(mBuyButton, "BuyButton");
|
||||
getWidget(mCancelButton, "CancelButton");
|
||||
|
||||
|
@ -370,6 +370,10 @@ namespace MWGui
|
|||
mPtr = actor;
|
||||
mNameEdit->setCaption({});
|
||||
|
||||
MWWorld::Ptr player = MWMechanics::getPlayer();
|
||||
int playerGold = player.getClass().getContainerStore(player).count(MWWorld::ContainerStore::sGoldId);
|
||||
mPlayerGold->setCaptionWithReplacing(MyGUI::utility::toString(playerGold));
|
||||
|
||||
startEditing();
|
||||
}
|
||||
|
||||
|
|
|
@ -175,6 +175,7 @@ namespace MWGui
|
|||
MyGUI::Button* mBuyButton;
|
||||
MyGUI::Button* mCancelButton;
|
||||
MyGUI::TextBox* mPriceLabel;
|
||||
MyGUI::TextBox* mPlayerGold;
|
||||
|
||||
ESM::Spell mSpell;
|
||||
};
|
||||
|
|
|
@ -138,6 +138,14 @@
|
|||
<UserString key="ToolTipLayout" value="TextToolTip"/>
|
||||
<UserString key="Caption_Text" value="#{sEnchantmentHelp7}"/>
|
||||
</Widget>
|
||||
|
||||
<Widget type="AutoSizedTextBox" skin="NormalText" name="GoldTextLabel">
|
||||
<Property key="Caption" value="#{sGold}"/>
|
||||
<UserString key="ToolTipType" value="Layout"/>
|
||||
</Widget>
|
||||
<Widget type="AutoSizedTextBox" skin="SandText" name="PlayerGold">
|
||||
<Property key="Caption" value="0"/>
|
||||
</Widget>
|
||||
|
||||
<Widget type="Spacer"/>
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<Property key="TextAlign" value="Right HCenter"/>
|
||||
<Property key="NeedMouse" value="false"/>
|
||||
</Widget>
|
||||
|
||||
|
||||
<!-- Available effects -->
|
||||
<Widget type="TextBox" skin="NormalText" position="12 48 300 24">
|
||||
<Property key="Caption" value="#{sMagicEffects}"/>
|
||||
|
@ -68,6 +68,15 @@
|
|||
<Widget type="HBox" position="0 336 558 60">
|
||||
<Property key="Padding" value="16"/>
|
||||
|
||||
<Widget type="AutoSizedTextBox" skin="NormalText">
|
||||
<Property key="Caption" value="#{sGold}"/>
|
||||
<UserString key="ToolTipType" value="Layout"/>
|
||||
<UserString key="ToolTipLayout" value="TextToolTip"/>
|
||||
<UserString key="Caption_Text" value="#{sYourGold}"/>
|
||||
</Widget>
|
||||
<Widget type="AutoSizedTextBox" skin="SandText" name="PlayerGold">
|
||||
</Widget>
|
||||
|
||||
<Widget type="Spacer"/>
|
||||
|
||||
<Widget type="AutoSizedTextBox" skin="NormalText">
|
||||
|
@ -79,7 +88,6 @@
|
|||
<Widget type="AutoSizedTextBox" skin="SandText" name="PriceLabel">
|
||||
</Widget>
|
||||
|
||||
|
||||
<Widget type="AutoSizedButton" skin="MW_Button" name="BuyButton">
|
||||
<Property key="Caption" value="#{sBuy}"/>
|
||||
</Widget>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue