The open source repository for the action RPG game in development by Sig Productions titled 'Adventures in Lestoria'!
https://forums.lestoria.net
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
648 B
22 lines
648 B
#pragma once
|
|
#include "Menu.h"
|
|
|
|
class MenuComponent{
|
|
friend class Menu;
|
|
MenuType menuDest;
|
|
MenuFunc onClick;
|
|
bool hovered=false;
|
|
bool selectable=true;
|
|
bool draggable=false;
|
|
private:
|
|
float hoverEffect=0;
|
|
protected:
|
|
geom2d::rect<float>rect;
|
|
std::string label;
|
|
bool border=true;
|
|
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);
|
|
}; |