Handled dynamic adding and removing of inventory items and syncing with menu systems.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user