Changed how properties work

This commit is contained in:
andreja6
2018-10-22 20:35:23 -07:00
parent a70cc31d28
commit b986815fcb
6 changed files with 25 additions and 26 deletions

View File

@@ -1,25 +1,19 @@
#include "Property.h"
Property::Property(std::string title, std::string propName, void * prop, void *(*getFunc)(void), void(*setFunc)(void *))
Property::Property(PROPGRIDITEM item, void(*onPropUpdate)(PROPGRIDITEM))
{
this->title = title;
this->propName = propName;
this->prop = prop;
this->getFunc = getFunc;
this->setFunc = setFunc;
this->callbackFuncOnChange = onPropUpdate;
this->item = item;
}
Property::~Property(void)
{
}
void Property::setProperty(void * newprop)
void Property::updateProperty(PROPGRIDITEM item)
{
this->setFunc(newprop);
callbackFuncOnChange(item);
}
void * Property::getProperty()
{
return this->getFunc();
}