You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw-tes3mp/apps/openmw/mwworld/failedaction.cpp

22 lines
516 B
C++

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