-
Notifications
You must be signed in to change notification settings - Fork 3
/
ChooseTypes.h
67 lines (56 loc) · 1.77 KB
/
ChooseTypes.h
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
#ifndef ChooseTypesH
#define ChooseTypesH
enum EChooseMode{
smCustom = 0,
smSoundSource,
smSoundEnv,
smObject,
smEShader,
smCShader,
smPE,
smParticles,
smTexture,
smEntityType,
smSpawnItem,
smLAnim,
smVisual,
smSkeletonAnims,
smSkeletonBones,
smGameMaterial,
smGameAnim,
smGameSMotions,
};
struct SChooseItem{
shared_str name;
shared_str hint;
SChooseItem (LPCSTR nm, LPCSTR ht):name(nm),hint(ht){}
};
DEFINE_VECTOR(SChooseItem,ChooseItemVec,ChooseItemVecIt);
// typedef
typedef fastdelegate::FastDelegate2<ChooseItemVec&,void*> TOnChooseFillItems;
typedef fastdelegate::FastDelegate2<SChooseItem*, PropItemVec&> TOnChooseSelectItem;
typedef fastdelegate::FastDelegate3<LPCSTR, HDC, const Irect&> TOnDrawThumbnail;
typedef fastdelegate::FastDelegate0 TOnChooseClose;
typedef void (*TOnChooseFillEvents)();
struct SChooseEvents{
shared_str caption;
TOnChooseFillItems on_fill;
TOnChooseSelectItem on_sel;
TOnDrawThumbnail on_thm;
TOnChooseClose on_close;
SChooseEvents (){caption="Select Item";}
SChooseEvents (LPCSTR capt, TOnChooseFillItems f, TOnChooseSelectItem s, TOnDrawThumbnail t, TOnChooseClose c)
{
Set (capt,f,s,t,c);
}
void Set (LPCSTR capt, TOnChooseFillItems f, TOnChooseSelectItem s, TOnDrawThumbnail t, TOnChooseClose c)
{
caption = capt;
on_fill = f;
on_sel = s;
on_thm = t;
on_close = c;
}
};
#define NONE_CAPTION "<none>"
#endif