mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-13 23:09:40 +00:00
Minor console selection improvements
This commit is contained in:
parent
a07c910d0b
commit
f5bf7254a8
2 changed files with 18 additions and 11 deletions
|
@ -83,15 +83,22 @@ void ToolTips::onFrame(float frameDuration)
|
|||
|
||||
if (mWindowManager->getWorldMouseOver() && (mWindowManager->getMode() == GM_Console))
|
||||
{
|
||||
MWWorld::Ptr object = MWBase::Environment::get().getWorld()->getFacedObject();
|
||||
if (!object.isEmpty())
|
||||
MWWorld::Ptr objectptr = MWBase::Environment::get().getWorld()->getFacedObject();
|
||||
if (!objectptr.isEmpty())
|
||||
{
|
||||
const MWWorld::Class& objectclass = MWWorld::Class::get (mFocusObject);
|
||||
IntSize tooltipSize;
|
||||
if (!objectclass.hasToolTip(mFocusObject))
|
||||
{
|
||||
setCoord(0, 0, 300, 300);
|
||||
mDynamicToolTipBox->setVisible(true);
|
||||
ToolTipInfo info;
|
||||
info.caption=object.getCellRef().mRefID;
|
||||
info.caption=objectptr.getCellRef().mRefID;
|
||||
info.icon="";
|
||||
IntSize tooltipSize = createToolTip(info);
|
||||
tooltipSize = createToolTip(info);
|
||||
}
|
||||
else
|
||||
tooltipSize = getToolTipViaPtr(true);
|
||||
IntPoint tooltipPosition = InputManager::getInstance().getMousePosition() + IntPoint(0, 24);
|
||||
|
||||
if ((tooltipPosition.left + tooltipSize.width) > viewSize.width)
|
||||
|
|
|
@ -673,10 +673,10 @@ namespace MWWorld
|
|||
MWWorld::Ptr object = searchPtrViaHandle (result.second);
|
||||
float ActivationDistance;
|
||||
|
||||
if (object.getTypeName ().find("NPC") != std::string::npos)
|
||||
ActivationDistance = getNpcActivationDistance ();
|
||||
else if (MWBase::Environment::get().getWindowManager()->isConsoleMode())
|
||||
if (MWBase::Environment::get().getWindowManager()->isConsoleMode())
|
||||
ActivationDistance = getObjectActivationDistance ()*50;
|
||||
else if (object.getTypeName ().find("NPC") != std::string::npos)
|
||||
ActivationDistance = getNpcActivationDistance ();
|
||||
else
|
||||
ActivationDistance = getObjectActivationDistance ();
|
||||
|
||||
|
|
Loading…
Reference in a new issue