Setup internal menu components so they know what button was clicked on a menu function. Compacted the on click menu function for menu buttons.

Refactored some item convenience functions.
This commit is contained in:
2023-10-07 15:47:26 -05:00
parent 819f5845b1
commit 99c24b9c37
19 changed files with 148 additions and 94 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
#include "Crawler.h"
#include "Menu.h"
#include "MenuComponent.h"
MenuComponent::MenuComponent(geom2d::rect<float>rect,std::string label,MenuFunc onClick,bool selectable)
:rect(rect),label(label),menuDest(MenuType::ENUM_END),onClick(onClick),hoverEffect(0),selectable(selectable){}