1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 09:53:54 +00:00

The inventory window now display the inventory of the player

This commit is contained in:
gugus 2012-04-21 11:05:30 +02:00
parent 1e8d894e1c
commit 33654535c1
4 changed files with 28 additions and 1 deletions

View file

@ -44,8 +44,8 @@ namespace MWGui
void Update();
virtual ~ContainerWindow();
protected:
private:
MWWorld::Environment& mEnvironment;
std::vector<MyGUI::WidgetPtr> containerWidgets;
MyGUI::WidgetPtr containerWidget;

View file

@ -1,5 +1,23 @@
#include "inventorywindow.hpp"
#include <iterator>
#include <algorithm>
#include "window_manager.hpp"
#include "widgets.hpp"
#include "../mwworld/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"
namespace MWGui
{
@ -8,4 +26,9 @@ namespace MWGui
{
}
void InventoryWindow::openInventory()
{
open(mEnvironment.mWorld->getPlayer().getPlayer());
}
}

View file

@ -25,6 +25,8 @@ namespace MWGui
{
public:
InventoryWindow(WindowManager& parWindowManager,MWWorld::Environment& environment);
void openInventory();
};
}
#endif // Inventory_H

View file

@ -222,11 +222,13 @@ void WindowManager::updateVisible()
map -> setVisible( (eff & GW_Map) != 0 );
stats -> setVisible( (eff & GW_Stats) != 0 );
mInventoryWindow->setVisible(true);
mInventoryWindow->openInventory();
break;
}
case GM_Container:
containerWindow->setVisible(true);
mInventoryWindow->setVisible(true);
mInventoryWindow->openInventory();
break;
case GM_Dialogue:
dialogueWindow->open();