1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-05 15:55:45 +00:00
OpenMW/apps/openmw/mwworld/failedaction.cpp
2013-08-08 22:34:53 -07:00

20 lines
484 B
C++

#include "failedaction.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/environment.hpp"
#include "../mwbase/windowmanager.hpp"
namespace MWWorld
{
FailedAction::FailedAction(const std::string &msg)
: Action(false), mMessage(msg)
{ }
void FailedAction::executeImp(const Ptr &actor)
{
if(actor.getRefData().getHandle() == "player" && !mMessage.empty())
MWBase::Environment::get().getWindowManager()->messageBox(mMessage);
}
}