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:
parent
1e8d894e1c
commit
33654535c1
4 changed files with 28 additions and 1 deletions
|
@ -44,8 +44,8 @@ namespace MWGui
|
|||
void Update();
|
||||
|
||||
virtual ~ContainerWindow();
|
||||
|
||||
protected:
|
||||
private:
|
||||
MWWorld::Environment& mEnvironment;
|
||||
std::vector<MyGUI::WidgetPtr> containerWidgets;
|
||||
MyGUI::WidgetPtr containerWidget;
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
|
@ -25,6 +25,8 @@ namespace MWGui
|
|||
{
|
||||
public:
|
||||
InventoryWindow(WindowManager& parWindowManager,MWWorld::Environment& environment);
|
||||
|
||||
void openInventory();
|
||||
};
|
||||
}
|
||||
#endif // Inventory_H
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue