Merge remote-tracking branch 'trombonecot/master'
Conflicts: apps/openmw/mwclass/light.cppactorid
commit
5d45bcd03a
@ -0,0 +1,21 @@
|
||||
#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), message(msg)
|
||||
{ }
|
||||
|
||||
|
||||
void FailedAction::executeImp (const Ptr& actor)
|
||||
{
|
||||
if ( actor.getRefData().getHandle()=="player" and !(message.empty()))
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager() ->messageBox(message, std::vector<std::string>());
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
#ifndef GAME_MWWORLD_FAILEDACTION_H
|
||||
#define GAME_MWWORLD_FAILEDACTION_H
|
||||
|
||||
#include "action.hpp"
|
||||
#include "ptr.hpp"
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
class FailedAction : public Action
|
||||
{
|
||||
std::string message;
|
||||
|
||||
virtual void executeImp (const Ptr& actor);
|
||||
|
||||
public:
|
||||
FailedAction (const std::string& message = std::string());
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue