mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 18:36:43 +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();
|
void Update();
|
||||||
|
|
||||||
virtual ~ContainerWindow();
|
virtual ~ContainerWindow();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
private:
|
|
||||||
MWWorld::Environment& mEnvironment;
|
MWWorld::Environment& mEnvironment;
|
||||||
std::vector<MyGUI::WidgetPtr> containerWidgets;
|
std::vector<MyGUI::WidgetPtr> containerWidgets;
|
||||||
MyGUI::WidgetPtr containerWidget;
|
MyGUI::WidgetPtr containerWidget;
|
||||||
|
|
|
@ -1,5 +1,23 @@
|
||||||
#include "inventorywindow.hpp"
|
#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
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -8,4 +26,9 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void InventoryWindow::openInventory()
|
||||||
|
{
|
||||||
|
open(mEnvironment.mWorld->getPlayer().getPlayer());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -25,6 +25,8 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
InventoryWindow(WindowManager& parWindowManager,MWWorld::Environment& environment);
|
InventoryWindow(WindowManager& parWindowManager,MWWorld::Environment& environment);
|
||||||
|
|
||||||
|
void openInventory();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif // Inventory_H
|
#endif // Inventory_H
|
||||||
|
|
|
@ -222,11 +222,13 @@ void WindowManager::updateVisible()
|
||||||
map -> setVisible( (eff & GW_Map) != 0 );
|
map -> setVisible( (eff & GW_Map) != 0 );
|
||||||
stats -> setVisible( (eff & GW_Stats) != 0 );
|
stats -> setVisible( (eff & GW_Stats) != 0 );
|
||||||
mInventoryWindow->setVisible(true);
|
mInventoryWindow->setVisible(true);
|
||||||
|
mInventoryWindow->openInventory();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GM_Container:
|
case GM_Container:
|
||||||
containerWindow->setVisible(true);
|
containerWindow->setVisible(true);
|
||||||
mInventoryWindow->setVisible(true);
|
mInventoryWindow->setVisible(true);
|
||||||
|
mInventoryWindow->openInventory();
|
||||||
break;
|
break;
|
||||||
case GM_Dialogue:
|
case GM_Dialogue:
|
||||||
dialogueWindow->open();
|
dialogueWindow->open();
|
||||||
|
|
Loading…
Reference in a new issue