New render code
This commit is contained in:
@@ -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();
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user