#pragma once #include "UIElement.h" class UIReference; class UIInventoryElement : public UIElement { private: UIReference* reference; int rowSize; int numSlots; Framework::Text slotNameFilter; bool hasFilter; public: UIInventoryElement(); ~UIInventoryElement(); void setReference(UIReference* reference); UIReference* zReference() const; void setRowSize(int rowSize); int getRowSize() const; void setNumSlots(int numSlots); int getNumSlots() const; void setSlotNameFilter(const Framework::Text& slotNameFilter); const Framework::Text& getSlotNameFilter() const; bool hasSlotNameFilter() const; Framework::XML::Element* toUIML(Framework::Either zTarget, Entity* zActor) const override; }; class UIInventoryElementFactory : public UIElementFactory { public: UIInventoryElementFactory(); virtual JSONObjectValidationBuilder* addToValidator( JSONObjectValidationBuilder* builder) const override; UIInventoryElement* fromJson( Framework::JSON::JSONObject* zJson) const override; Framework::JSON::JSONObject* toJsonObject( UIInventoryElement* zObject) const override; UIInventoryElement* createElement( Framework::JSON::JSONObject* zJson) const override; const char* getTypeToken() const override; };