From 41c60459864f504b89f9b08642c701402d9bef2d Mon Sep 17 00:00:00 2001 From: MiroslavR Date: Mon, 1 Sep 2014 03:38:05 +0200 Subject: [PATCH 1/3] Realign all parent boxes when autosizedwidgets change size --- apps/openmw/mwgui/widgets.cpp | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/apps/openmw/mwgui/widgets.cpp b/apps/openmw/mwgui/widgets.cpp index 6a5a43be7f..853b90b0f7 100644 --- a/apps/openmw/mwgui/widgets.cpp +++ b/apps/openmw/mwgui/widgets.cpp @@ -544,19 +544,22 @@ namespace MWGui void AutoSizedWidget::notifySizeChange (MyGUI::Widget* w) { - if (w->getParent () != 0) + MyGUI::Widget * parent = w->getParent(); + if (parent != 0) { - Box* b = dynamic_cast(w->getParent()); - if (b) - b->notifyChildrenSizeChanged (); - else + if (mExpandDirection == MyGUI::Align::Left) { - if (mExpandDirection == MyGUI::Align::Left) - { - int hdiff = getRequestedSize ().width - w->getSize().width; - w->setPosition(w->getPosition() - MyGUI::IntPoint(hdiff, 0)); - } - w->setSize(getRequestedSize ()); + int hdiff = getRequestedSize ().width - w->getSize().width; + w->setPosition(w->getPosition() - MyGUI::IntPoint(hdiff, 0)); + } + w->setSize(getRequestedSize ()); + + while (parent != 0) + { + Box * b = dynamic_cast(parent); + if (b) + b->notifyChildrenSizeChanged(); + parent = parent->getParent(); } } } From 98e7ab1b7910ef1e47e08d021c3bd0c92d196a5f Mon Sep 17 00:00:00 2001 From: MiroslavR Date: Mon, 1 Sep 2014 03:40:11 +0200 Subject: [PATCH 2/3] Add missing tooltips to enchant dialog --- files/mygui/openmw_enchanting_dialog.layout | 71 +++++++++++++-------- 1 file changed, 45 insertions(+), 26 deletions(-) diff --git a/files/mygui/openmw_enchanting_dialog.layout b/files/mygui/openmw_enchanting_dialog.layout index def065b7a0..188c538e46 100644 --- a/files/mygui/openmw_enchanting_dialog.layout +++ b/files/mygui/openmw_enchanting_dialog.layout @@ -48,33 +48,52 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - From 7dfba0ae30f16eadfece002472a18d4d104a64de Mon Sep 17 00:00:00 2001 From: MiroslavR Date: Mon, 1 Sep 2014 03:43:53 +0200 Subject: [PATCH 3/3] Followers with high fight should not engage in combat with the player --- apps/openmw/mwmechanics/actors.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp index 3785ba9ae9..0e9ebb6437 100644 --- a/apps/openmw/mwmechanics/actors.cpp +++ b/apps/openmw/mwmechanics/actors.cpp @@ -297,7 +297,14 @@ namespace MWMechanics bool aggressive; if (againstPlayer) + { + // followers with high fight should not engage in combat with the player (e.g. bm_bear_black_summon) + const std::list& followers = getActorsFollowing(actor2); + if (std::find(followers.begin(), followers.end(), actor1) != followers.end()) + return; + aggressive = MWBase::Environment::get().getMechanicsManager()->isAggressive(actor1, actor2); + } else { aggressive = false;