Converted boolean flags for component creation in windows to using enum bitwise attributes.
This commit is contained in:
+4
-4
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user