diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-20 14:33:09 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-20 14:33:09 +1000 |
commit | 6352e8e3196f78388b6c771073f9e03eaa612673 (patch) | |
tree | e23772f79a7fbc41bc9108951e9e136857484bf4 /source/frontend/StarInventory.hpp | |
parent | 6741a057e5639280d85d0f88ba26f000baa58f61 (diff) |
everything everywhere
all at once
Diffstat (limited to 'source/frontend/StarInventory.hpp')
-rw-r--r-- | source/frontend/StarInventory.hpp | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/source/frontend/StarInventory.hpp b/source/frontend/StarInventory.hpp new file mode 100644 index 0000000..035045c --- /dev/null +++ b/source/frontend/StarInventory.hpp @@ -0,0 +1,67 @@ +#ifndef STAR_INVENTORY_HPP +#define STAR_INVENTORY_HPP + +#include "StarPane.hpp" +#include "StarInventoryTypes.hpp" +#include "StarItemDescriptor.hpp" +#include "StarPlayerTech.hpp" +#include "StarGameTimers.hpp" +#include "StarContainerInteractor.hpp" + +namespace Star { + +STAR_CLASS(MainInterface); +STAR_CLASS(UniverseClient); +STAR_CLASS(Player); +STAR_CLASS(Item); +STAR_CLASS(ItemSlotWidget); +STAR_CLASS(ItemGridWidget); +STAR_CLASS(ImageWidget); +STAR_CLASS(Widget); +STAR_CLASS(InventoryPane); + +class InventoryPane : public Pane { +public: + InventoryPane(MainInterface* parent, PlayerPtr player, ContainerInteractorPtr containerInteractor); + + void displayed() override; + PanePtr createTooltip(Vec2I const& screenPosition) override; + + bool giveContainerResult(ContainerResult result); + + // update only item grids, to see if they have had their slots changed + // this is a little hacky and should probably be checked in the player inventory instead + void updateItems(); + bool containsNewItems() const; + +protected: + virtual void update() override; + void selectTab(String const& selected); + +private: + MainInterface* m_parent; + PlayerPtr m_player; + ContainerInteractorPtr m_containerInteractor; + + bool m_expectingSwap; + InventorySlot m_containerSource; + + GameTimer m_trashBurn; + ItemSlotWidgetPtr m_trashSlot; + + Map<String, ItemGridWidgetPtr> m_itemGrids; + Map<String, String> m_tabButtonData; + + Map<String, WidgetPtr> m_newItemMarkers; + String m_selectedTab; + + StringList m_pickUpSounds; + StringList m_putDownSounds; + Maybe<ItemDescriptor> m_currentSwapSlotItem; + + List<ImageWidgetPtr> m_disabledTechOverlays; +}; + +} + +#endif |