1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 21:23:52 +00:00
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,12 +544,8 @@ 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 (b)
b->notifyChildrenSizeChanged ();
else
{ {
if (mExpandDirection == MyGUI::Align::Left) if (mExpandDirection == MyGUI::Align::Left)
{ {
@ -557,6 +553,13 @@ namespace MWGui
w->setPosition(w->getPosition() - MyGUI::IntPoint(hdiff, 0)); 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">
<Widget type="HBox">
<UserString key="HStretch" value="true"/>
<Widget type="AutoSizedTextBox" skin="NormalText">
<Property key="Caption" value="#{sEnchantmentMenu3}:"/> <Property key="Caption" value="#{sEnchantmentMenu3}:"/>
<UserString key="ToolTipType" value="Layout"/>
<UserString key="ToolTipLayout" value="TextToolTip"/>
<UserString key="Caption_Text" value="#{sEnchantmentHelp3}"/>
</Widget> </Widget>
<Widget type="TextBox" skin="SandText" position="280 0 258 24" name="Enchantment"> <Widget type="AutoSizedTextBox" skin="SandText" name="Enchantment">
<Property key="Caption" value="1"/> <Property key="Caption" value="1"/>
<Property key="TextAlign" value="Right HCenter"/> <Property key="TextAlign" value="Right VCenter"/>
<UserString key="HStretch" value="true"/>
</Widget> </Widget>
</Widget>
<Widget type="HBox">
<Widget type="TextBox" skin="NormalText" position="320 24 300 24"> <UserString key="HStretch" value="true"/>
<Widget type="AutoSizedTextBox" skin="NormalText">
<Property key="Caption" value="#{sCastCost}:"/> <Property key="Caption" value="#{sCastCost}:"/>
<UserString key="ToolTipType" value="Layout"/>
<UserString key="ToolTipLayout" value="TextToolTip"/>
<UserString key="Caption_Text" value="#{sEnchantmentHelp4}"/>
</Widget> </Widget>
<Widget type="TextBox" skin="SandText" position="280 24 258 24" name="CastCost"> <Widget type="AutoSizedTextBox" skin="SandText" name="CastCost">
<Property key="Caption" value="39"/> <Property key="Caption" value="39"/>
<Property key="TextAlign" value="Right HCenter"/> <Property key="TextAlign" value="Right VCenter"/>
<UserString key="HStretch" value="true"/>
</Widget> </Widget>
</Widget>
<Widget type="HBox">
<Widget type="TextBox" skin="NormalText" position="320 48 300 24"> <UserString key="HStretch" value="true"/>
<Widget type="AutoSizedTextBox" skin="NormalText">
<Property key="Caption" value="#{sCharges}"/> <Property key="Caption" value="#{sCharges}"/>
<UserString key="ToolTipType" value="Layout"/>
<UserString key="ToolTipLayout" value="TextToolTip"/>
<UserString key="Caption_Text" value="#{sEnchantmentHelp5}"/>
</Widget> </Widget>
<Widget type="TextBox" skin="SandText" position="280 48 258 24" name="Charge"> <Widget type="AutoSizedTextBox" skin="SandText" name="Charge">
<Property key="Caption" value="39"/> <Property key="Caption" value="39"/>
<Property key="TextAlign" value="Right HCenter"/> <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">