4 * Created on: Sep 9, 2012
10 #include "../loader/TypeDescription.h"
12 using loader::FieldDescription;
13 using loader::TypeDescription;
17 void MenuProperties::CreateTypeDescription() {
20 int fontId(TypeDescription::GetTypeId("Font"));
21 int numberId(TypeDescription::GetTypeId("Number"));
22 int spriteId(TypeDescription::GetTypeId("Sprite"));
23 int stringId(TypeDescription::GetTypeId("String"));
25 TypeDescription &td(TypeDescription::CreateOrGet("MenuProperties"));
26 td.SetConstructor(&Construct);
27 td.SetSize(sizeof(MenuProperties));
29 td.AddField("font", FieldDescription(((char *)&p.font) - ((char *)&p), fontId, true));
30 td.AddField("disabledFont", FieldDescription(((char *)&p.disabledFont) - ((char *)&p), fontId, true));
31 td.AddField("cursor", FieldDescription(((char *)&p.cursor) - ((char *)&p), spriteId, true));
32 td.AddField("charsPerEntry", FieldDescription(((char *)&p.charsPerEntry) - ((char *)&p), numberId, false));
33 td.AddField("rows", FieldDescription(((char *)&p.rows) - ((char *)&p), numberId, false));
34 td.AddField("rowGap", FieldDescription(((char *)&p.rowGap) - ((char *)&p), numberId, false));
35 td.AddField("iconSpace", FieldDescription(((char *)&p.iconSpace) - ((char *)&p), numberId, false));
36 td.AddField("cols", FieldDescription(((char *)&p.cols) - ((char *)&p), numberId, false));
37 td.AddField("colGap", FieldDescription(((char *)&p.colGap) - ((char *)&p), numberId, false));
38 td.AddField("delimiter", FieldDescription(((char *)&p.delimiter) - ((char *)&p), stringId, false));
39 td.AddField("charsPerNumber", FieldDescription(((char *)&p.charsPerNumber) - ((char *)&p), numberId, false));
40 td.AddField("charsPerAdditionalText", FieldDescription(((char *)&p.charsPerAdditionalText) - ((char *)&p), numberId, false));
41 td.AddField("additionalTextGap", FieldDescription(((char *)&p.additionalTextGap) - ((char *)&p), numberId, false));
44 void MenuProperties::Construct(void *data) {
45 new (data) MenuProperties;