/* _______________ ,----------------------------------------------------------------. //`````````````\\ \ \ //~~~~~~~~~~~~~~~\\ \ by @ohsqueezy & @sleepin \ //=================\\ \ [ohsqueezy.itch.io] [sleepin.itch.io] \ // \\ \ \ // \\ \ code released under the zlib license [git.nugget.fun/pudding] \ // ☆ GUNKISS ☆ \\ \ \ //_________________________\\ `---------------------------------------------------------------*/ #ifndef ITEM_H_ #define ITEM_H_ /* including so we can use GLuint type */ #if defined(__EMSCRIPTEN__) #include #else #include "glew/glew.h" #endif #include #include #include #include #include #include #include "json/json.hpp" #include "extension.hpp" #include "Node.hpp" #include "Texture.hpp" #include "Log.hpp" class Item : public Node { private: nlohmann::json json = {}; std::vector image_textures; std::string brand_name = "", product_name = "", upc = ""; int current_image_index = 0; void set_text_property(const std::string&, std::string&, const std::string&); /* * add properties: ingredients, protein weight, nutrition grade, popularity, "serving unit", keywords, * allergens, calories, fat, saturated fat, cholesterol, sodium, carbohydrates, fiber, sugar, potassium */ public: Item(Node*); void add_image_texture(sb::Texture); const std::vector& get_image_textures() const; const sb::Texture& get_active_image_texture() const; void set_brand_name(const std::string&); const std::string& get_brand_name() const; void set_product_name(const std::string&); const std::string& get_product_name() const; void set_upc(const std::string&); const std::string& get_upc() const; std::string get_full_name() const; void increment_image_index(int = 1); }; #endif