deque
scrawl 10 years ago
commit 628d57f18c

@ -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 (); int hdiff = getRequestedSize ().width - w->getSize().width;
else w->setPosition(w->getPosition() - MyGUI::IntPoint(hdiff, 0));
}
w->setSize(getRequestedSize ());
while (parent != 0)
{ {
if (mExpandDirection == MyGUI::Align::Left) Box * b = dynamic_cast<Box*>(parent);
{ if (b)
int hdiff = getRequestedSize ().width - w->getSize().width; b->notifyChildrenSizeChanged();
w->setPosition(w->getPosition() - MyGUI::IntPoint(hdiff, 0)); parent = parent->getParent();
}
w->setSize(getRequestedSize ());
} }
} }
} }

@ -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;

@ -48,34 +48,53 @@
</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">
</Widget> <UserString key="HStretch" value="true"/>
<Widget type="TextBox" skin="SandText" position="280 0 258 24" name="Enchantment"> <Widget type="AutoSizedTextBox" skin="NormalText">
<Property key="Caption" value="1"/> <Property key="Caption" value="#{sEnchantmentMenu3}:"/>
<Property key="TextAlign" value="Right HCenter"/> <UserString key="ToolTipType" value="Layout"/>
</Widget> <UserString key="ToolTipLayout" value="TextToolTip"/>
<UserString key="Caption_Text" value="#{sEnchantmentHelp3}"/>
</Widget>
<Widget type="TextBox" skin="NormalText" position="320 24 300 24"> <Widget type="AutoSizedTextBox" skin="SandText" name="Enchantment">
<Property key="Caption" value="#{sCastCost}:"/> <Property key="Caption" value="1"/>
</Widget> <Property key="TextAlign" value="Right VCenter"/>
<Widget type="TextBox" skin="SandText" position="280 24 258 24" name="CastCost"> <UserString key="HStretch" value="true"/>
<Property key="Caption" value="39"/> </Widget>
<Property key="TextAlign" value="Right HCenter"/> </Widget>
</Widget> <Widget type="HBox">
<UserString key="HStretch" value="true"/>
<Widget type="AutoSizedTextBox" skin="NormalText">
<Widget type="TextBox" skin="NormalText" position="320 48 300 24"> <Property key="Caption" value="#{sCastCost}:"/>
<Property key="Caption" value="#{sCharges}"/> <UserString key="ToolTipType" value="Layout"/>
</Widget> <UserString key="ToolTipLayout" value="TextToolTip"/>
<Widget type="TextBox" skin="SandText" position="280 48 258 24" name="Charge"> <UserString key="Caption_Text" value="#{sEnchantmentHelp4}"/>
<Property key="Caption" value="39"/> </Widget>
<Property key="TextAlign" value="Right HCenter"/> <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>
<!-- Available effects --> <!-- Available effects -->
<Widget type="TextBox" skin="NormalText" position="12 108 300 24"> <Widget type="TextBox" skin="NormalText" position="12 108 300 24">
<Property key="Caption" value="#{sMagicEffects}"/> <Property key="Caption" value="#{sMagicEffects}"/>

Loading…
Cancel
Save