Setup framework for scrollbar and buttons in ScrollableWindowComponent. Fixed a bug where disabled buttons would not increment selection check loop. CreateMenu function instead of creating pointer and returning, so windows can add stuff to menus easily.
This commit is contained in:
@@ -7,6 +7,8 @@ MenuComponent::MenuComponent(MenuType parent,geom2d::rect<float>rect,std::string
|
||||
MenuComponent::MenuComponent(MenuType parent,geom2d::rect<float>rect,std::string label,MenuType menuDest,MenuFunc onClick,bool selectable)
|
||||
:parentMenu(parent),rect(rect),label(label),menuDest(menuDest),onClick(onClick),hoverEffect(0),selectable(selectable){}
|
||||
|
||||
void MenuComponent::AfterCreate(){}
|
||||
|
||||
void MenuComponent::Update(Crawler*game){
|
||||
if(hovered){
|
||||
hoverEffect=std::min("ThemeGlobal.HighlightTime"_F,hoverEffect+game->GetElapsedTime());
|
||||
|
||||
Reference in New Issue
Block a user