forked from mirror/openmw-tes3mp
Fix Show Owned option affecting tooltips that are not objects (Fixes #3036)
This commit is contained in:
parent
2ffcc2a2b4
commit
984c455027
2 changed files with 11 additions and 10 deletions
|
@ -87,9 +87,9 @@ namespace MWGui
|
|||
return;
|
||||
}
|
||||
|
||||
bool gameMode = MWBase::Environment::get().getWindowManager()->isGuiMode();
|
||||
bool guiMode = MWBase::Environment::get().getWindowManager()->isGuiMode();
|
||||
|
||||
if (gameMode)
|
||||
if (guiMode)
|
||||
{
|
||||
const MyGUI::IntPoint& mousePos = MyGUI::InputManager::getInstance().getMousePosition();
|
||||
|
||||
|
@ -112,7 +112,7 @@ namespace MWGui
|
|||
if (info.caption.empty())
|
||||
info.caption=mFocusObject.getCellRef().getRefId();
|
||||
info.icon="";
|
||||
tooltipSize = createToolTip(info);
|
||||
tooltipSize = createToolTip(info, true);
|
||||
}
|
||||
else
|
||||
tooltipSize = getToolTipViaPtr(true);
|
||||
|
@ -178,7 +178,7 @@ namespace MWGui
|
|||
ToolTipInfo info;
|
||||
info.text = data.caption;
|
||||
info.notes = data.notes;
|
||||
tooltipSize = createToolTip(info);
|
||||
tooltipSize = createToolTip(info, false);
|
||||
}
|
||||
else if (type == "ItemPtr")
|
||||
{
|
||||
|
@ -197,7 +197,7 @@ namespace MWGui
|
|||
}
|
||||
else if (type == "ToolTipInfo")
|
||||
{
|
||||
tooltipSize = createToolTip(*focus->getUserData<MWGui::ToolTipInfo>());
|
||||
tooltipSize = createToolTip(*focus->getUserData<MWGui::ToolTipInfo>(), false);
|
||||
}
|
||||
else if (type == "AvatarItemSelection")
|
||||
{
|
||||
|
@ -240,7 +240,7 @@ namespace MWGui
|
|||
info.text = "#{sSchool}: " + sSchoolNames[school];
|
||||
}
|
||||
info.effects = effects;
|
||||
tooltipSize = createToolTip(info);
|
||||
tooltipSize = createToolTip(info, false);
|
||||
}
|
||||
else if (type == "Layout")
|
||||
{
|
||||
|
@ -345,7 +345,7 @@ namespace MWGui
|
|||
ToolTipInfo info = object.getToolTipInfo(mFocusObject);
|
||||
if (!image)
|
||||
info.icon = "";
|
||||
tooltipSize = createToolTip(info);
|
||||
tooltipSize = createToolTip(info, true);
|
||||
}
|
||||
|
||||
return tooltipSize;
|
||||
|
@ -370,13 +370,13 @@ namespace MWGui
|
|||
}
|
||||
}
|
||||
|
||||
MyGUI::IntSize ToolTips::createToolTip(const MWGui::ToolTipInfo& info)
|
||||
MyGUI::IntSize ToolTips::createToolTip(const MWGui::ToolTipInfo& info, bool isFocusObject)
|
||||
{
|
||||
mDynamicToolTipBox->setVisible(true);
|
||||
|
||||
if(mShowOwned == 1 || mShowOwned == 3)
|
||||
{
|
||||
if(checkOwned())
|
||||
if(isFocusObject && checkOwned())
|
||||
{
|
||||
mDynamicToolTipBox->changeWidgetSkin("HUD_Box_NoTransp_Owned");
|
||||
}
|
||||
|
|
|
@ -98,8 +98,9 @@ namespace MWGui
|
|||
MyGUI::IntSize getToolTipViaPtr (bool image=true);
|
||||
///< @return requested tooltip size
|
||||
|
||||
MyGUI::IntSize createToolTip(const ToolTipInfo& info);
|
||||
MyGUI::IntSize createToolTip(const ToolTipInfo& info, bool isFocusObject);
|
||||
///< @return requested tooltip size
|
||||
/// @param isFocusObject Is the object this tooltips originates from mFocusObject?
|
||||
|
||||
float mFocusToolTipX;
|
||||
float mFocusToolTipY;
|
||||
|
|
Loading…
Reference in a new issue