#pragma once #include "olcUTIL_Geometry2D.h" #include "MenuType.h" #include class Menu; class Crawler; class MenuComponent{ friend class Menu; MenuType menuDest; MenuFunc onClick; bool hovered=false; bool selectable=true; private: float hoverEffect=0; protected: geom2d::rectrect; std::string label; bool border=true; public: MenuComponent(geom2d::rectrect,std::string label,MenuFunc onClick,bool selectable=true); MenuComponent(geom2d::rectrect,std::string label,MenuType menuDest,MenuFunc onClick,bool selectable=true); virtual void Update(Crawler*game); virtual void Draw(Crawler*game,vf2d parentPos); };