mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 16:19:56 +00:00
26 lines
715 B
C++
26 lines
715 B
C++
#include "actionopen.hpp"
|
|
|
|
#include "../mwbase/environment.hpp"
|
|
|
|
#include "../mwclass/container.hpp"
|
|
#include "../mwgui/window_manager.hpp"
|
|
#include "../mwgui/container.hpp"
|
|
|
|
#include "class.hpp"
|
|
#include "containerstore.hpp"
|
|
|
|
namespace MWWorld
|
|
{
|
|
ActionOpen::ActionOpen (const MWWorld::Ptr& container) : mContainer (container) {
|
|
mContainer = container;
|
|
}
|
|
|
|
void ActionOpen::execute ()
|
|
{
|
|
if (!MWBase::Environment::get().getWindowManager()->isAllowed(MWGui::GW_Inventory))
|
|
return;
|
|
|
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Container);
|
|
MWBase::Environment::get().getWindowManager()->getContainerWindow()->open(mContainer);
|
|
}
|
|
}
|