#pragma once #include "MaterialNode.h" #include "Color.h" class GridNode : public MaterialNode { public: GridNode(const DiscretePoint& location); void setNumX(unsigned numX); void setNumY(unsigned numY); void setData(const std::vector& colors); SceneItem* getSceneItem(std::size_t idx) const override; unsigned getNumSceneItems() const override; void update(FontsManager* fontsManager) override; void setWidth(unsigned width); void setHeight(unsigned height); private: unsigned mNumberX{5}; unsigned mNumberY{5}; unsigned mWidth{1}; unsigned mHeight{1}; bool mDataDirty = true; std::vector mData; std::unique_ptr mBackgroundModel; std::unique_ptr mOutlineModel; };