Files
AdventuresInLestoria/Crawler/MenuComponent.h
T

22 lines
648 B
C++
Raw Normal View History

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