-
Notifications
You must be signed in to change notification settings - Fork 350
Expand file tree
/
Copy pathPolyPlugin.h
More file actions
95 lines (76 loc) · 2.86 KB
/
PolyPlugin.h
File metadata and controls
95 lines (76 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*
Copyright (C) 2014 by Joachim Meyer
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#pragma once
#include "PolyGlobals.h"
#include "PolyString.h"
#include "PolyResource.h"
namespace Polycode {
class ObjectEntry;
class _PolyExport Prop : public PolyBase {
public:
Prop(const String& name, const int type = Prop::PROP_STRING);
Prop(ObjectEntry *entry);
~Prop();
Prop *loadPropFromEntry(ObjectEntry* entry);
int type;
String name;
int value;
std::vector<Prop*> children;
static const int PROP_VECTOR3 = 0;
static const int PROP_VECTOR2 = 1;
static const int PROP_SLIDER = 2;
static const int PROP_BUTTON = 3;
static const int PROP_NUMBER = 4;
static const int PROP_TARGET_BINDING = 5;
static const int PROP_RENDER_TARGET = 6;
static const int PROP_SHADER_PASS = 7;
static const int PROP_REMOVABLE_STRING = 8;
static const int PROP_LAYER = 9;
static const int PROP_CUSTOM = 10;
static const int PROP_STRING = 11;
static const int PROP_COLOR = 12;
static const int PROP_COMBO = 13;
static const int PROP_BOOL = 14;
static const int PROP_SOUND = 15;
static const int PROP_BEZIER_RGBA_CURVE = 16;
static const int PROP_BEZIER_CURVE = 17;
static const int PROP_MATERIAL = 18;
static const int PROP_MATERIAL_PREVIEW = 19;
static const int PROP_TEXTURE = 20;
static const int PROP_SCENE_SPRITE = 21;
static const int PROP_SCENE_ENTITY_INSTANCE = 22; };
class _PolyExport Plugin : public Resource {
public:
Plugin(const String& name);
Plugin(ObjectEntry *entry);
~Plugin();
Plugin* loadPluginFromEntry(ObjectEntry *entry);
void setProp(Prop* prop);
void removeProp(Prop* prop);
void removeProp(const String& propName);
std::vector<Prop*> getProps() const;
unsigned int getNumProps() const;
unsigned int pluginType;
static const unsigned int PLUGIN_ENTITY = 0;
String ext;
String author;
protected:
std::vector<Prop*> props;
};
}