mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
22 lines
523 B
C++
22 lines
523 B
C++
#include "failedaction.hpp"
|
|
|
|
#include "../mwbase/environment.hpp"
|
|
#include "../mwbase/windowmanager.hpp"
|
|
|
|
#include "../mwmechanics/actorutil.hpp"
|
|
|
|
namespace MWWorld
|
|
{
|
|
FailedAction::FailedAction(std::string_view msg, const Ptr& target)
|
|
: Action(false, target)
|
|
, mMessage(msg)
|
|
{
|
|
}
|
|
|
|
void FailedAction::executeImp(const Ptr& actor)
|
|
{
|
|
if (actor == MWMechanics::getPlayer() && !mMessage.empty())
|
|
MWBase::Environment::get().getWindowManager()->messageBox(mMessage);
|
|
}
|
|
}
|