1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-05-22 00:41:29 +00:00

Minor tweaks.

This commit is contained in:
cc9cii 2014-11-02 15:03:26 +11:00
parent 1eed180a5c
commit e174428cc5

View file

@ -207,6 +207,7 @@ namespace CSVRender
mMouseState = Mouse_Edit; mMouseState = Mouse_Edit;
mCurrentObj = result.first; mCurrentObj = result.first;
}
// print some debug info // print some debug info
if(isDebug()) if(isDebug())
{ {
@ -224,7 +225,6 @@ namespace CSVRender
} }
} }
} }
}
break; break;
} }
case Mouse_Drag: case Mouse_Drag:
@ -335,29 +335,29 @@ namespace CSVRender
{ {
CSMSettings::UserSettings &userSettings = CSMSettings::UserSettings::instance(); CSMSettings::UserSettings &userSettings = CSMSettings::UserSettings::instance();
QString coord = userSettings.setting("debug/mouse-reference", QString("screen")); QString coord = userSettings.setting("debug/mouse-reference", QString("screen"));
Ogre::Vector3 derived = getCamera()->getDerivedDirection(); Ogre::Vector3 dir = getCamera()->getDerivedDirection();
QString wheelDir = userSettings.setting("debug/mouse-wheel", QString("Closer/Further")); QString wheelDir = userSettings.setting("debug/mouse-wheel", QString("Closer/Further"));
if(wheelDir == "Left/Right") if(wheelDir == "Left/Right")
{ {
if(coord == "world") if(coord == "world")
return std::make_pair(Ogre::Vector3::UNIT_Y, Ogre::Vector3::UNIT_X); return std::make_pair(Ogre::Vector3::UNIT_Y, Ogre::Vector3::UNIT_Z);
else else
return std::make_pair(getCamera()->getDerivedRight(), Ogre::Vector3(-derived.x, -derived.y, -derived.z)); return std::make_pair(getCamera()->getDerivedRight(), getCamera()->getDerivedUp());
} }
else if(wheelDir == "Up/Down") else if(wheelDir == "Up/Down")
{ {
if(coord == "world") if(coord == "world")
return std::make_pair(Ogre::Vector3::UNIT_Z, Ogre::Vector3::UNIT_Y); return std::make_pair(Ogre::Vector3::UNIT_Z, Ogre::Vector3::UNIT_X);
else else
return std::make_pair(getCamera()->getDerivedUp(), getCamera()->getDerivedRight()); return std::make_pair(getCamera()->getDerivedUp(), Ogre::Vector3(-dir.x, -dir.y, -dir.z));
} }
else else
{ {
if(coord == "world") if(coord == "world")
return std::make_pair(Ogre::Vector3::UNIT_X, Ogre::Vector3::UNIT_Y); return std::make_pair(Ogre::Vector3::UNIT_X, Ogre::Vector3::UNIT_Y);
else else
return std::make_pair(Ogre::Vector3(-derived.x, -derived.y, -derived.z), getCamera()->getDerivedRight()); return std::make_pair(Ogre::Vector3(-dir.x, -dir.y, -dir.z), getCamera()->getDerivedRight());
} }
} }