1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00
OpenMW/apps/openmw/mwworld/failedaction.cpp

22 lines
482 B
C++
Raw Normal View History

2012-11-17 18:17:08 +01:00
#include "failedaction.hpp"
#include "../mwbase/world.hpp"
2012-11-19 21:04:49 +01:00
#include "../mwbase/environment.hpp"
#include "../mwbase/windowmanager.hpp"
2012-11-17 18:17:08 +01:00
namespace MWWorld
{
2012-11-19 21:04:49 +01:00
FailedAction::FailedAction (const std::string& msg) : Action (false), message(msg)
{ }
2012-11-22 17:24:28 +01:00
2012-11-17 18:17:08 +01:00
void FailedAction::executeImp (const Ptr& actor)
{
2012-11-22 17:24:28 +01:00
if ( actor.getRefData().getHandle()=="player" && !(message.empty()))
2012-11-17 18:17:08 +01:00
{
MWBase::Environment::get().getWindowManager() ->messageBox(message);
2012-11-17 18:17:08 +01:00
}
}
}