Converted boolean flags for component creation in windows to using enum bitwise attributes.

This commit is contained in:
2023-11-06 01:00:17 -06:00
parent c82a3c5980
commit 2e248e30b4
11 changed files with 79 additions and 31 deletions
+4 -4
View File
@@ -11,10 +11,10 @@ class MenuLabel:public MenuComponent{
bool centered=true;
int scale=1;
public:
inline MenuLabel(MenuType parent,geom2d::rect<float>rect,std::string label,int scale=1,bool centered=true,bool shadow=false,bool outline=false,bool background=false)
:MenuComponent(parent,rect,label,MenuFunc{},false),scale(scale),centered(centered),shadow(shadow){
border=outline;
this->background=background;
inline MenuLabel(MenuType parent,geom2d::rect<float>rect,std::string label,int scale=1,ComponentAttr attributes=ComponentAttr::NONE)
:MenuComponent(parent,rect,label,MenuFunc{},ButtonAttr::UNSELECTABLE|ButtonAttr::UNSELECTABLE_VIA_KEYBOARD),scale(scale),centered(!(attributes&ComponentAttr::LEFT_ALIGN)),shadow(attributes&ComponentAttr::SHADOW){
border=attributes&ComponentAttr::OUTLINE;
this->background=attributes&ComponentAttr::BACKGROUND;
showDefaultLabel=false;
}
inline void SetLabel(std::string text){