Parts with "ShowName" enabled now do what they are supposed to. Huzzah!

This commit is contained in:
andreja6
2018-10-25 18:56:00 -07:00
parent f7d6781698
commit 7e2eb2c694
7 changed files with 55 additions and 18 deletions

View File

@@ -3,6 +3,7 @@
PVInstance::PVInstance(void)
{
Instance::Instance();
nameShown = false;
className = "PVInstance";
}
@@ -15,12 +16,26 @@ PVInstance::~PVInstance(void)
{
}
void PVInstance::postRender(RenderDevice* rd)
{
}
std::vector<PROPGRIDITEM> PVInstance::getProperties()
{
std::vector<PROPGRIDITEM> properties = Instance::getProperties();
properties.push_back(createPGI(
"Item",
"NameShown",
"This chooses whether the item name is shown",
false,
PIT_CHECK));
return properties;
}
void PVInstance::PropUpdate(LPPROPGRIDITEM &pItem)
{
Instance::PropUpdate(pItem);
if(strcmp(pItem->lpszPropName, "NameShown") == 0)
{
nameShown = (bool)pItem->lpCurValue;
}
else Instance::PropUpdate(pItem);
}