Converted boolean flags for component creation in windows to using enum bitwise attributes.
This commit is contained in:
@@ -3,13 +3,13 @@
|
||||
|
||||
typedef Attribute A;
|
||||
|
||||
MenuComponent::MenuComponent(MenuType parent,geom2d::rect<float>rect,std::string label,MenuFunc onClick,bool selectable,bool selectableViaKeyboard)
|
||||
:parentMenu(parent),rect(rect),label(label),menuDest(MenuType::ENUM_END),onClick(onClick),hoverEffect(0),selectable(selectable),selectableViaKeyboard(selectableViaKeyboard),memoryLeakInfo(Menu::GetMemoryLeakReportInfo()){
|
||||
MenuComponent::MenuComponent(MenuType parent,geom2d::rect<float>rect,std::string label,MenuFunc onClick,ButtonAttr attributes)
|
||||
:parentMenu(parent),rect(rect),label(label),menuDest(MenuType::ENUM_END),onClick(onClick),hoverEffect(0),selectable(!(attributes&ButtonAttr::UNSELECTABLE)),selectableViaKeyboard(!(attributes&ButtonAttr::UNSELECTABLE_VIA_KEYBOARD)),memoryLeakInfo(Menu::GetMemoryLeakReportInfo()){
|
||||
Menu::unhandledComponents.push_back(this);
|
||||
}
|
||||
|
||||
MenuComponent::MenuComponent(MenuType parent,geom2d::rect<float>rect,std::string label,MenuType menuDest,MenuFunc onClick,bool selectable,bool selectableViaKeyboard)
|
||||
:MenuComponent(parent,rect,label,onClick,selectable,selectableViaKeyboard){
|
||||
MenuComponent::MenuComponent(MenuType parent,geom2d::rect<float>rect,std::string label,MenuType menuDest,MenuFunc onClick,ButtonAttr attributes)
|
||||
:MenuComponent(parent,rect,label,onClick,attributes){
|
||||
//NOTE: This constructor also calls the other constructor above!
|
||||
this->menuDest=menuDest;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user