Fix manually changed mouse cursor

actorid
scrawl 12 years ago
parent 8be9627c8d
commit e34685b8a3

@ -237,6 +237,8 @@ namespace MWBase
virtual void startEnchanting(MWWorld::Ptr actor) = 0;
virtual void startTraining(MWWorld::Ptr actor) = 0;
virtual void changePointer (const std::string& name) = 0;
virtual const Translation::Storage& getTranslationDataStorage() const = 0;
};
}

@ -13,8 +13,9 @@ namespace MWGui
{
ResourceImageSetPointerFix::ResourceImageSetPointerFix() :
mImageSet(NULL)
ResourceImageSetPointerFix::ResourceImageSetPointerFix()
: mImageSet(NULL)
, mRotation(0)
{
}

@ -4,7 +4,6 @@
#include <MyGUI_Widget.h>
#include <MyGUI_RenderManager.h>
#include <MyGUI_PointerManager.h>
#include <boost/lexical_cast.hpp>
@ -222,7 +221,7 @@ void HUD::onWorldClicked(MyGUI::Widget* _sender)
else
world->dropObjectOnGround(world->getPlayer().getPlayer(), object);
MyGUI::PointerManager::getInstance().setPointer("arrow");
MWBase::Environment::get().getWindowManager()->changePointer("arrow");
std::string sound = MWWorld::Class::get(object).getDownSoundId(object);
MWBase::Environment::get().getSoundManager()->playSound (sound, 1.0, 1.0);
@ -273,21 +272,21 @@ void HUD::onWorldMouseOver(MyGUI::Widget* _sender, int x, int y)
bool canDrop = world->canPlaceObject(mouseX, mouseY);
if (!canDrop)
MyGUI::PointerManager::getInstance().setPointer("drop_ground");
MWBase::Environment::get().getWindowManager()->changePointer("drop_ground");
else
MyGUI::PointerManager::getInstance().setPointer("arrow");
MWBase::Environment::get().getWindowManager()->changePointer("arrow");
}
else
{
MyGUI::PointerManager::getInstance().setPointer("arrow");
MWBase::Environment::get().getWindowManager()->changePointer("arrow");
mWorldMouseOver = true;
}
}
void HUD::onWorldMouseLostFocus(MyGUI::Widget* _sender, MyGUI::Widget* _new)
{
MyGUI::PointerManager::getInstance().setPointer("arrow");
MWBase::Environment::get().getWindowManager()->changePointer("arrow");
mWorldMouseOver = false;
}

@ -1127,3 +1127,8 @@ const Translation::Storage& WindowManager::getTranslationDataStorage() const
{
return mTranslationDataStorage;
}
void WindowManager::changePointer(const std::string &name)
{
mCursor->onCursorChange(name);
}

@ -228,6 +228,8 @@ namespace MWGui
virtual void startEnchanting(MWWorld::Ptr actor);
virtual void startTraining(MWWorld::Ptr actor);
virtual void changePointer (const std::string& name);
virtual const Translation::Storage& getTranslationDataStorage() const;
private:

Loading…
Cancel
Save