gd_levels/
property_ids.rs1pub trait PropertyID {
2 fn to_property_id(&self) -> i32;
3}
4
5pub enum ObjectCommonProperties {
6 Id,
7 X,
8 Y,
9 FlipHoriz,
10 FlipVert,
11 Rotation,
12 Scale,
13 ScaleX,
14 ScaleY,
15 WarpXAngle,
16 WarpYAngle,
17 Color1,
18 Color2,
19 SingleColorType,
20 Color1HSVEnabled,
21 Color1HSV,
22 Color2HSVEnabled,
23 Color2HSV,
24 Groups,
25 GroupParentIDs,
26 EditorLayer,
27 EditorLayer2,
28 ZLayer,
29 ZOrder,
30 Ord,
31 Channel,
32 Edp,
33 LinkedGroup
34}
35
36impl PropertyID for i32 {
37 fn to_property_id(&self) -> i32 {
38 self.clone()
39 }
40}
41
42impl PropertyID for ObjectCommonProperties {
43 fn to_property_id(&self) -> i32 {
44 match self {
45 ObjectCommonProperties::Id => 1,
46 ObjectCommonProperties::X => 2,
47 ObjectCommonProperties::Y => 3,
48 ObjectCommonProperties::FlipHoriz => 4,
49 ObjectCommonProperties::FlipVert => 5,
50 ObjectCommonProperties::Rotation => 6,
51 ObjectCommonProperties::Scale => 32,
52 ObjectCommonProperties::ScaleX => 128,
53 ObjectCommonProperties::ScaleY => 129,
54 ObjectCommonProperties::WarpXAngle => 132,
55 ObjectCommonProperties::WarpYAngle => 131,
56 ObjectCommonProperties::Color1 => 21,
57 ObjectCommonProperties::Color2 => 22,
58 ObjectCommonProperties::SingleColorType => 497,
59 ObjectCommonProperties::Color1HSVEnabled => 41,
60 ObjectCommonProperties::Color1HSV => 43,
61 ObjectCommonProperties::Color2HSVEnabled => 42,
62 ObjectCommonProperties::Color2HSV => 44,
63 ObjectCommonProperties::Groups => 57,
64 ObjectCommonProperties::GroupParentIDs => 274,
65 ObjectCommonProperties::EditorLayer => 20,
66 ObjectCommonProperties::EditorLayer2 => 61,
67 ObjectCommonProperties::ZLayer => 24,
68 ObjectCommonProperties::ZOrder => 25,
69 ObjectCommonProperties::Ord => 115,
70 ObjectCommonProperties::Channel => 170,
71 ObjectCommonProperties::Edp => 13,
72 ObjectCommonProperties::LinkedGroup => 108
73 }
74 }
75}