-
Notifications
You must be signed in to change notification settings - Fork 1
/
Edittime.cpp
110 lines (82 loc) · 2.92 KB
/
Edittime.cpp
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
// Edittime.cpp - Edittime implementation of object
//
// Include StdAfx and Properties.h
#include "StdAfx.h"
#ifndef RUN_ONLY
//////////////////////////////////////////////////////////////////////////////////
// Property table
//////////////////////////////////////////////////////////////////////////////////
// The property table defines the list of properties that appear in the property
// grid when your object is selected in the layout editor.
//
// See the SDK docs for full documentation, but to get you started:-
//
// PROPERTY_EDIT (myVariable, "Label", "Description"); // A text field property.
// PROPERTY_VALUE (myVariable, "Label 2", "Description"); // An integer property.
// PROPERTY_FLOAT (myVariable, "Label 3", "Description"); // A double/float property
//
// The labels must be unique!
BEGIN_PROPERTY_TABLE();
PROPERTY_VALUE( m_GameID, "Game ID", "Your game's ID." );
PROPERTY_EDIT( m_GamePrivateKey, "Game Private Key", "Your game's private key." );
END_PROPERTY_TABLE ();
/////////////////////////////////////////////////////////////////////////////////
// Edittime functions
//////////////////////////////////////////////////////////////////////////////////
// Constructor
EditExt::EditExt(VEditTime* pVEditTime, editInfo* pEInfo)
{
// Store the edittime and einfo pointers
pEditTime = pVEditTime;
pInfo = pEInfo;
}
// Destructor: when your object is deleted or the application closed:
// close any allocated resources here
EditExt::~EditExt()
{
}
// Initialization: when the frame editor is opened. Create textures, fonts,
// and any other DirectX volatile data here.
void EditExt::Initialize()
{
}
// Called when any property has been changed.
void EditExt::OnPropertiesUpdate()
{
}
// When the object is inserted to the layout editor by the user.
void EditExt::OnPut()
{
// Default object size
pInfo->objectWidth = 64;
pInfo->objectHeight = 64;
m_GameID = 0;
m_GamePrivateKey = "";
}
// When the object is removed from the layout editor by the user.
void EditExt::OnRemoved()
{
}
// On object resized
BOOL EditExt::OnSizeObject()
{
return TRUE;
}
void EditExt::GetAnimationHandle(int& handle)
{
}
#else //ifndef RUN_ONLY
BOOL WINAPI ETCreateObject(editInfo* editObject) {return FALSE;}
BOOL WINAPI ETInitializeObject(editInfo* editObject, VEditTime* pVEditTime) {return FALSE;}
BOOL WINAPI ETDestroyObject(editInfo* editObject) {return FALSE;}
int WINAPI ETDrawObject(editInfo *editObject) {return 0;}
void ETOnPropertyChanged(editInfo* editObject) {}
long LinkPropTable() {return 0;}
void WINAPI ETSerialize(editInfo* editObject, bin& ar) {}
void WINAPI ETPutObject(editInfo* editObject) {}
void WINAPI ETRemoveObject(editInfo* editObject) {}
void WINAPI GetInfo(LPOINFO objectInfo) {}
int WINAPI ETGetMenuIcons(editInfo* editObject, int ACEMenu) {return 0;}
int WINAPI ETShowACEMenu(editInfo* editObject, TABLE ACEType) {return 0;}
BOOL WINAPI ETSizeObject(editInfo* editObject) {return FALSE;}
#endif // RUN_ONLY