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