]> git.localhorst.tv Git - l2e.git/blob - src/graphics/Menu.cpp
fixed some issues to get it to compile again
[l2e.git] / src / graphics / Menu.cpp
1 /*
2  * Menu.cpp
3  *
4  *  Created on: Sep 9, 2012
5  *      Author: holy
6  */
7
8 #include "Menu.h"
9
10 #include "../loader/TypeDescription.h"
11
12 using loader::FieldDescription;
13 using loader::TypeDescription;
14
15 namespace graphics {
16
17 void MenuProperties::CreateTypeDescription() {
18         MenuProperties p;
19         TypeDescription &td(TypeDescription::CreateOrGet("MenuProperties"));
20
21         td.SetSize(sizeof(MenuProperties));
22
23         int fontId(TypeDescription::GetTypeId("Font"));
24         int numberId(TypeDescription::GetTypeId("Number"));
25         int spriteId(TypeDescription::GetTypeId("Sprite"));
26         int stringId(TypeDescription::GetTypeId("String"));
27
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));
41 }
42
43 }