1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 23:23:52 +00:00
openmw-tes3mp/apps/openmw/mwgui/inventorywindow.cpp

52 lines
1.5 KiB
C++
Raw Normal View History

2012-04-21 08:51:01 +00:00
#include "inventorywindow.hpp"
#include <iterator>
#include <algorithm>
#include "window_manager.hpp"
#include "widgets.hpp"
2012-04-21 08:51:01 +00:00
2012-05-11 09:52:07 +00:00
#include "../mwbase/environment.hpp"
#include "../mwworld/manualref.hpp"
#include <cmath>
#include <algorithm>
#include <iterator>
#include <assert.h>
#include <iostream>
#include "../mwclass/container.hpp"
#include "../mwworld/containerstore.hpp"
#include <boost/lexical_cast.hpp>
#include "../mwworld/class.hpp"
#include "../mwworld/world.hpp"
#include "../mwworld/player.hpp"
2012-04-21 08:51:01 +00:00
namespace MWGui
{
2012-05-11 09:52:07 +00:00
InventoryWindow::InventoryWindow(WindowManager& parWindowManager,DragAndDrop* dragAndDrop)
2012-05-12 11:12:37 +00:00
: ContainerBase(parWindowManager,dragAndDrop,"openmw_inventory_window_layout.xml")
2012-04-21 08:51:01 +00:00
{
static_cast<MyGUI::Window*>(mMainWidget)->eventWindowChangeCoord += MyGUI::newDelegate(this, &InventoryWindow::onWindowResize);
2012-05-12 19:28:04 +00:00
getWidget(mAvatar, "Avatar");
getWidget(mEncumbranceBar, "EncumbranceBar");
getWidget(mEncumbranceText, "EncumbranceBarT");
getWidget(mFilterAll, "AllButton");
getWidget(mFilterWeapon, "WeaponButton");
getWidget(mFilterApparel, "ApparelButton");
getWidget(mFilterMagic, "MagicButton");
getWidget(mFilterMisc, "MiscButton");
2012-04-21 08:51:01 +00:00
}
void InventoryWindow::openInventory()
{
2012-05-11 09:52:07 +00:00
open(MWBase::Environment::get().getWorld()->getPlayer().getPlayer());
2012-05-12 19:28:04 +00:00
onWindowResize(static_cast<MyGUI::Window*>(mMainWidget));
}
void InventoryWindow::onWindowResize(MyGUI::Window* _sender)
{
drawItems();
}
2012-04-22 19:06:08 +00:00
}