mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:23:52 +00:00
fixed comment, save settings to member variable, removed usless include, changed variable to const
This commit is contained in:
parent
e68b388d16
commit
4a6d806127
5 changed files with 10 additions and 9 deletions
|
@ -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,7 +89,7 @@ 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);
|
||||
|
|
|
@ -487,6 +487,8 @@ namespace MWGui
|
|||
|
||||
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.
|
||||
* Supported syntax:
|
||||
|
|
Loading…
Reference in a new issue