-
Notifications
You must be signed in to change notification settings - Fork 4
/
CloudType.as
82 lines (65 loc) · 1.46 KB
/
CloudType.as
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
package
{
public class CloudType
{
// Cloud Types
public static const IMAGE:String = "Image";
public static const TEXT:String = "Text";
public static const DRAW:String = "Draw";
// Cloud subTypes
public static const ST_IMAGE:String = "Image";
public static const ST_FONT:String = "Font";
public static const ST_BRUSH:String = "Brush";
public static const ST_SHAPE:String = "Shape";
public static const ST_EFFECT:String = "Effect";
public static const ST_GRADIENT:String = "Gradient";
// CLOUD TYPE ICONS
public static function Icon(type:String):Class
{
switch(type)
{
case ST_IMAGE:
return Globals.g_assets.ImageIcon;
break;
case ST_FONT:
return Globals.g_assets.NewTextCloudIcon;
break;
case ST_BRUSH:
return Globals.g_assets.BrushIcon;
break;
case ST_SHAPE:
return Globals.g_assets.ShapeIcon;
break;
case ST_EFFECT:
return Globals.g_assets.FilterIcon;
break;
}
return Globals.g_assets.AddTagIcon;
}
public static function GetIndex(type:String):uint
{
switch(type)
{
case ST_IMAGE:
return 0;
break;
case ST_FONT:
return 1;
break;
case ST_BRUSH:
return 2;
break;
case ST_SHAPE:
return 3;
break;
case ST_EFFECT:
return 4;
break;
case ST_GRADIENT:
return 4;
break;
}
return 0;
}
}
}