#ifndef SUBMENU_H_ # define SUBMENU_H_ # include # include # include "Core/Core.hh" namespace DamnCute { class SubMenu : public IRenderable { private: bool _alive; sf::Text _text; std::vector::iterator _it; std::vector _options; public: explicit SubMenu(sf::Text &, const std::string & , std::vector); virtual ~SubMenu() = default; inline void operator=(const SubMenu& b) { _text = b._text; } void moveRight(); void moveLeft(); const std::string getName() { return (_text.getString()); } const std::string getField() { return ((*_it)->getString()); } void setAlive() { if (_alive == false) _alive = true; else _alive = false; } virtual void update(sf::RenderTarget*); }; } #endif