Changed how properties work

This commit is contained in:
andreja6
2018-10-23 06:49:41 -07:00
parent 18b856602c
commit ee528d1245
11 changed files with 26 additions and 34 deletions

View File

@@ -15,7 +15,6 @@ Instance::Instance(const Instance &oinst)
setParent(oinst.parent);
name = oinst.name;
className = oinst.className;
initProperties();
}
void Instance::render(RenderDevice* rd)
@@ -26,22 +25,24 @@ void Instance::render(RenderDevice* rd)
}
}
void Update(PROPGRIDITEM)
void Instance::PropUpdate(DWORD addr, PROPGRIDITEM pItem)
{
}
void Instance::initProperties()
std::vector<Property> Instance::getProperties()
{
PROPGRIDITEM * pItem = new PROPGRIDITEM();
PropGrid_ItemInit((*pItem));
pItem->lpszCatalog="Properties";
pItem->lpszPropName="Name";
pItem->lpszPropDesc="The name of the current instance";
pItem->lpCurValue=(LPARAM)name.c_str();
pItem->iItemType=PIT_EDIT;
std::vector<Property> properties;
PROPGRIDITEM pItem;
PropGrid_ItemInit(pItem);
pItem.lpszCatalog="Properties";
pItem.lpszPropName="Name";
pItem.lpszPropDesc="The name of the current instance";
pItem.lpCurValue=(LPARAM)name.c_str();
pItem.iItemType=PIT_EDIT;
properties.push_back(new Property(pItem, Update));
properties.push_back(Property(pItem, (DWORD)&name));
return properties;
}