Handled dynamic adding and removing of inventory items and syncing with menu systems.

This commit is contained in:
2023-10-17 05:35:19 -05:00
parent 6656e3d036
commit 04d6f42526
17 changed files with 254 additions and 50 deletions
+7 -1
View File
@@ -1,6 +1,8 @@
#include "Crawler.h"
#include "MenuComponent.h"
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){}
@@ -78,4 +80,8 @@ bool MenuComponent::PointWithinParent(MenuComponent*child,vi2d drawPos){
bool MenuComponent::HandleOutsideDisabledButtonSelection(MenuComponent*disabledButton){
return false;
};
};
vf2d MenuComponent::GetPos(){
return rect.pos;
}