1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-08 09:37:53 +00:00
OpenMW/apps/openmw/mwworld/actionopen.cpp

27 lines
710 B
C++
Raw Normal View History

2012-04-15 15:52:39 +00:00
#include "actionopen.hpp"
2012-05-11 09:52:07 +00:00
#include "../mwbase/environment.hpp"
#include "../mwbase/windowmanager.hpp"
2012-04-15 15:52:39 +00:00
#include "../mwgui/container.hpp"
#include "class.hpp"
#include "containerstore.hpp"
2012-04-15 15:52:39 +00:00
namespace MWWorld
{
ActionOpen::ActionOpen (const MWWorld::Ptr& container) : Action (false, container)
{
2012-04-15 15:52:39 +00:00
}
bool ActionOpen::executeImp (const MWWorld::Ptr& actor)
2012-04-15 15:52:39 +00:00
{
if (!MWBase::Environment::get().getWindowManager()->isAllowed(MWGui::GW_Inventory))
return false;
2012-05-23 10:23:35 +00:00
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Container);
MWBase::Environment::get().getWindowManager()->getContainerWindow()->open(getTarget());
return true;
2012-04-15 15:52:39 +00:00
}
}