This commit is contained in:
scrawl 2014-09-03 04:55:24 +02:00
commit 628d57f18c
3 changed files with 66 additions and 37 deletions

View file

@ -544,19 +544,22 @@ namespace MWGui
void AutoSizedWidget::notifySizeChange (MyGUI::Widget* w) void AutoSizedWidget::notifySizeChange (MyGUI::Widget* w)
{ {
if (w->getParent () != 0) MyGUI::Widget * parent = w->getParent();
if (parent != 0)
{ {
Box* b = dynamic_cast<Box*>(w->getParent()); if (mExpandDirection == MyGUI::Align::Left)
if (b)
b->notifyChildrenSizeChanged ();
else
{ {
if (mExpandDirection == MyGUI::Align::Left) int hdiff = getRequestedSize ().width - w->getSize().width;
{ w->setPosition(w->getPosition() - MyGUI::IntPoint(hdiff, 0));
int hdiff = getRequestedSize ().width - w->getSize().width; }
w->setPosition(w->getPosition() - MyGUI::IntPoint(hdiff, 0)); w->setSize(getRequestedSize ());
}
w->setSize(getRequestedSize ()); while (parent != 0)
{
Box * b = dynamic_cast<Box*>(parent);
if (b)
b->notifyChildrenSizeChanged();
parent = parent->getParent();
} }
} }
} }

View file

@ -297,7 +297,14 @@ namespace MWMechanics
bool aggressive; bool aggressive;
if (againstPlayer) if (againstPlayer)
{
// followers with high fight should not engage in combat with the player (e.g. bm_bear_black_summon)
const std::list<MWWorld::Ptr>& followers = getActorsFollowing(actor2);
if (std::find(followers.begin(), followers.end(), actor1) != followers.end())
return;
aggressive = MWBase::Environment::get().getMechanicsManager()->isAggressive(actor1, actor2); aggressive = MWBase::Environment::get().getMechanicsManager()->isAggressive(actor1, actor2);
}
else else
{ {
aggressive = false; aggressive = false;

View file

@ -48,33 +48,52 @@
</Widget> </Widget>
<!-- Values -->
<Widget type="TextBox" skin="NormalText" position="320 0 300 24"> <Widget type="VBox" position="320 8 222 72">
<Property key="Caption" value="#{sEnchantmentMenu3}:"/> <Widget type="HBox">
<UserString key="HStretch" value="true"/>
<Widget type="AutoSizedTextBox" skin="NormalText">
<Property key="Caption" value="#{sEnchantmentMenu3}:"/>
<UserString key="ToolTipType" value="Layout"/>
<UserString key="ToolTipLayout" value="TextToolTip"/>
<UserString key="Caption_Text" value="#{sEnchantmentHelp3}"/>
</Widget>
<Widget type="AutoSizedTextBox" skin="SandText" name="Enchantment">
<Property key="Caption" value="1"/>
<Property key="TextAlign" value="Right VCenter"/>
<UserString key="HStretch" value="true"/>
</Widget>
</Widget>
<Widget type="HBox">
<UserString key="HStretch" value="true"/>
<Widget type="AutoSizedTextBox" skin="NormalText">
<Property key="Caption" value="#{sCastCost}:"/>
<UserString key="ToolTipType" value="Layout"/>
<UserString key="ToolTipLayout" value="TextToolTip"/>
<UserString key="Caption_Text" value="#{sEnchantmentHelp4}"/>
</Widget>
<Widget type="AutoSizedTextBox" skin="SandText" name="CastCost">
<Property key="Caption" value="39"/>
<Property key="TextAlign" value="Right VCenter"/>
<UserString key="HStretch" value="true"/>
</Widget>
</Widget>
<Widget type="HBox">
<UserString key="HStretch" value="true"/>
<Widget type="AutoSizedTextBox" skin="NormalText">
<Property key="Caption" value="#{sCharges}"/>
<UserString key="ToolTipType" value="Layout"/>
<UserString key="ToolTipLayout" value="TextToolTip"/>
<UserString key="Caption_Text" value="#{sEnchantmentHelp5}"/>
</Widget>
<Widget type="AutoSizedTextBox" skin="SandText" name="Charge">
<Property key="Caption" value="39"/>
<Property key="TextAlign" value="Right VCenter"/>
<UserString key="HStretch" value="true"/>
</Widget>
</Widget>
<Widget type="Widget"/>
</Widget> </Widget>
<Widget type="TextBox" skin="SandText" position="280 0 258 24" name="Enchantment">
<Property key="Caption" value="1"/>
<Property key="TextAlign" value="Right HCenter"/>
</Widget>
<Widget type="TextBox" skin="NormalText" position="320 24 300 24">
<Property key="Caption" value="#{sCastCost}:"/>
</Widget>
<Widget type="TextBox" skin="SandText" position="280 24 258 24" name="CastCost">
<Property key="Caption" value="39"/>
<Property key="TextAlign" value="Right HCenter"/>
</Widget>
<Widget type="TextBox" skin="NormalText" position="320 48 300 24">
<Property key="Caption" value="#{sCharges}"/>
</Widget>
<Widget type="TextBox" skin="SandText" position="280 48 258 24" name="Charge">
<Property key="Caption" value="39"/>
<Property key="TextAlign" value="Right HCenter"/>
</Widget>
<!-- Available effects --> <!-- Available effects -->
<Widget type="TextBox" skin="NormalText" position="12 108 300 24"> <Widget type="TextBox" skin="NormalText" position="12 108 300 24">