New render code

This commit is contained in:
Vulpovile
2021-03-13 19:07:15 -08:00
parent 8b4460c104
commit cdba7f6eee
18 changed files with 348 additions and 576 deletions

View File

@@ -1,13 +1,12 @@
#pragma once
#include "Property.h"
#pragma once
class BoolProperty : public Property<bool>
{
public:
template <typename T>
BoolProperty(std::string name, bool& value)
BoolProperty(std::string name, bool& value, Instance& owner)
{
Property(name, (T)value);
Property<bool>(name, value, owner);
}
~BoolProperty(void);
PROPGRIDITEM getPropGridItem();
};

View File

@@ -1,19 +1,30 @@
#pragma once
#include "propertyGrid.h"
#include "DataModelV2/Instance.h"
#include <string>
class Instance;
template <typename T>
class Property
{
public:
Property(std::string name, T& value)
Property(std::string name, T& value, Instance& owner)
{
value = t;
_value = value;
_owner = owner;
}
~Property(void);
T getValue();
void setValue(T);
PROPGRIDITEM getPropGridItem();
const T getValue()
{
return _value;
}
const void setValue(T val)
{
_value = val;
}
virtual PROPGRIDITEM getPropGridItem();
void setProperty(LPPROPGRIDITEM item);
protected:
std::string name;
T* value;
Instance* _owner;
std::string _name;
T* _value;
};