Merge pull request #224 from OpenMW/master

Add OpenMW commits up to 3 Jun 2017
pull/249/merge
David Cernat 8 years ago committed by GitHub
commit 315ec46ff6

@ -2,10 +2,9 @@
brew update
brew rm cmake || true
brew rm pkgconfig || true
brew rm qt5 || true
brew install cmake pkgconfig $macos_qt_formula
brew outdated cmake || brew upgrade cmake
brew outdated pkgconfig || brew upgrade pkgconfig
brew install $macos_qt_formula
curl https://downloads.openmw.org/osx/dependencies/openmw-deps-c79172d.zip -o ~/openmw-deps.zip
unzip ~/openmw-deps.zip -d /private/tmp/openmw-deps > /dev/null

@ -8,6 +8,7 @@
#include <MyGUI_ScrollView.h>
#include <components/widgets/list.hpp>
#include <components/settings/settings.hpp>
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
@ -43,6 +44,8 @@ namespace MWGui
getWidget(mEnchantmentPoints, "Enchantment");
getWidget(mCastCost, "CastCost");
getWidget(mCharge, "Charge");
getWidget(mSuccessChance, "SuccessChance");
getWidget(mChanceLayout, "ChanceLayout");
getWidget(mTypeButton, "TypeButton");
getWidget(mBuyButton, "BuyButton");
getWidget(mPrice, "PriceLabel");
@ -115,6 +118,9 @@ namespace MWGui
mCharge->setCaption(MyGUI::utility::toString(mEnchanting.getGemCharge()));
int successChance = int(mEnchanting.getEnchantChance());
mSuccessChance->setCaption(MyGUI::utility::toString(std::max(0, successChance)));
std::stringstream castCost;
castCost << mEnchanting.getEffectiveCastCost();
mCastCost->setCaption(castCost.str());
@ -144,11 +150,15 @@ namespace MWGui
void EnchantingDialog::startEnchanting (MWWorld::Ptr actor)
{
mName->setCaption("");
mEnchanting.setSelfEnchanting(false);
mEnchanting.setEnchanter(actor);
mBuyButton->setCaptionWithReplacing("#{sBuy}");
mChanceLayout->setVisible(false);
mPtr = actor;
setSoulGem(MWWorld::Ptr());
@ -162,6 +172,8 @@ namespace MWGui
void EnchantingDialog::startSelfEnchanting(MWWorld::Ptr soulgem)
{
mName->setCaption("");
MWWorld::Ptr player = MWMechanics::getPlayer();
mEnchanting.setSelfEnchanting(true);
@ -169,6 +181,10 @@ namespace MWGui
mBuyButton->setCaptionWithReplacing("#{sCreate}");
bool enabled = Settings::Manager::getBool("show enchant chance","GUI");
mChanceLayout->setVisible(enabled);
mPtr = player;
startEditing();

@ -49,6 +49,8 @@ namespace MWGui
ItemSelectionDialog* mItemSelectionDialog;
MyGUI::Widget* mChanceLayout;
MyGUI::Button* mCancelButton;
ItemWidget* mItemBox;
ItemWidget* mSoulBox;
@ -60,6 +62,7 @@ namespace MWGui
MyGUI::TextBox* mEnchantmentPoints;
MyGUI::TextBox* mCastCost;
MyGUI::TextBox* mCharge;
MyGUI::TextBox* mSuccessChance;
MyGUI::TextBox* mPrice;
MyGUI::TextBox* mPriceText;

@ -127,3 +127,14 @@ The default value is "1.0 0.15 0.15 1.0" which is a bright red color.
This setting can only be configured by editing the settings configuration file.
This setting has no effect if the crosshair setting in the HUD Settings Section is false.
This setting has no effect if the show owned setting in the Game Settings Section is false.
show enchant chance
----------------
:Type: boolean
:Range: True/False
:Default: False
Whether or not the chance of success will be displayed in the enchanting menu.
The default value is false. This setting can only be configured by editing the settings configuration file.

@ -52,7 +52,7 @@
</Widget>
<!-- Values -->
<Widget type="VBox" position="320 7 222 72">
<Widget type="VBox" position="320 7 222 80">
<Widget type="HBox">
<UserString key="HStretch" value="true"/>
<Widget type="AutoSizedTextBox" skin="NormalText">
@ -95,6 +95,17 @@
<UserString key="HStretch" value="true"/>
</Widget>
</Widget>
<Widget type="HBox" name="ChanceLayout">
<UserString key="HStretch" value="true"/>
<Widget type="AutoSizedTextBox" skin="NormalText">
<Property key="Caption" value="#{sEnchantmentMenu6}:"/>
</Widget>
<Widget type="AutoSizedTextBox" skin="SandText" name="SuccessChance">
<Property key="Caption" value="39"/>
<Property key="TextAlign" value="Right VCenter"/>
<UserString key="HStretch" value="true"/>
</Widget>
</Widget>
</Widget>
<!-- Available effects -->

@ -141,6 +141,9 @@ werewolf overlay = true
color background owned = 0.15 0.0 0.0 1.0
color crosshair owned = 1.0 0.15 0.15 1.0
# Show success probability in self-enchant dialog
show enchant chance = false
[HUD]
# Displays the crosshair or reticle when not in GUI mode.

Loading…
Cancel
Save