1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-12 03:36:32 +00:00
OpenMW/apps/openmw/mwworld/failedaction.cpp
2015-08-21 21:12:39 +12:00

21 lines
515 B
C++

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