fixed comment, save settings to member variable, removed usless include, changed variable to const

sceneinput
Jiří Kuneš 10 years ago
parent e68b388d16
commit 4a6d806127

@ -6,8 +6,6 @@
#include <list>
#include <stdint.h>
#include "../mwworld/ptr.hpp"
namespace osg
{
class Vec3f;
@ -25,6 +23,7 @@ namespace MWWorld
{
class Ptr;
class CellStore;
class CellRef;
}
namespace Loading

@ -298,7 +298,6 @@ namespace MWGui
tooltipSize.height);
mDynamicToolTipBox->setVisible(true);
}
}
}
@ -343,7 +342,6 @@ namespace MWGui
if (!image)
info.icon = "";
tooltipSize = createToolTip(info);
}
return tooltipSize;
@ -351,10 +349,9 @@ namespace MWGui
bool ToolTips::checkOwned()
{
// true=owned, false=notOwned
if(!mFocusObject.isEmpty())
{
MWWorld::CellRef& cellref = mFocusObject.getCellRef();
const MWWorld::CellRef& cellref = mFocusObject.getCellRef();
MWWorld::Ptr ptr = MWBase::Environment::get().getWorld()->getPlayerPtr();
MWWorld::Ptr victim;

@ -89,8 +89,8 @@ namespace MWGui
static void createMagicEffectToolTip(MyGUI::Widget* widget, short id);
bool checkOwned();
/// Checks if object is owned and sets correct crosshair mode
/// Returns True if taking mFocusObject would be crime
private:
MyGUI::Widget* mDynamicToolTipBox;

@ -187,6 +187,7 @@ namespace MWGui
, mRestAllowed(true)
, mFPS(0.0f)
, mFallbackMap(fallbackMap)
, mShowOwned(false)
{
float uiScale = Settings::Manager::getFloat("scaling factor", "GUI");
mGuiPlatform = new osgMyGUI::Platform(viewer, guiRoot, resourceSystem->getTextureManager(), uiScale);
@ -261,6 +262,8 @@ namespace MWGui
MyGUI::ClipboardManager::getInstance().eventClipboardChanged += MyGUI::newDelegate(this, &WindowManager::onClipboardChanged);
MyGUI::ClipboardManager::getInstance().eventClipboardRequested += MyGUI::newDelegate(this, &WindowManager::onClipboardRequested);
mShowOwned = Settings::Manager::getBool("show owned", "Game");
}
void WindowManager::initUI()
@ -1039,7 +1042,7 @@ namespace MWGui
{
mToolTips->setFocusObject(focus);
if(Settings::Manager::getBool("show owned", "Game") && mHud)
if(mShowOwned && mHud)
{
bool owned = mToolTips->checkOwned();
mHud->setCrosshairOwned(owned);

@ -486,6 +486,8 @@ namespace MWGui
float mFPS;
std::map<std::string, std::string> mFallbackMap;
bool mShowOwned;
/**
* Called when MyGUI tries to retrieve a tag's value. Tags must be denoted in #{tag} notation and will be replaced upon setting a user visible text/property.

Loading…
Cancel
Save