--- /dev/null
+/*
+ * Menu.cpp
+ *
+ * Created on: Sep 9, 2012
+ * Author: holy
+ */
+
+#include "Menu.h"
+
+#include "../loader/TypeDescription.h"
+
+using loader::FieldDescription;
+using loader::TypeDescription;
+
+namespace graphics {
+
+void MenuProperties::CreateTypeDescription() {
+ MenuProperties p;
+ TypeDescription &td(TypeDescription::CreateOrGet("MenuProperties"));
+
+ td.SetSize(sizeof(MenuProperties));
+
+ int fontId(TypeDescription::GetTypeId("Font"));
+ int numberId(TypeDescription::GetTypeId("Number"));
+ int spriteId(TypeDescription::GetTypeId("Sprite"));
+ int stringId(TypeDescription::GetTypeId("String"));
+
+ td.AddField("font", FieldDescription(((char *)&p.font) - ((char *)&p), fontId, true));
+ td.AddField("disabledFont", FieldDescription(((char *)&p.disabledFont) - ((char *)&p), fontId, true));
+ td.AddField("cursor", FieldDescription(((char *)&p.cursor) - ((char *)&p), spriteId, true));
+ td.AddField("charsPerEntry", FieldDescription(((char *)&p.charsPerEntry) - ((char *)&p), numberId, false));
+ td.AddField("rows", FieldDescription(((char *)&p.rows) - ((char *)&p), numberId, false));
+ td.AddField("rowGap", FieldDescription(((char *)&p.rowGap) - ((char *)&p), numberId, false));
+ td.AddField("iconSpace", FieldDescription(((char *)&p.iconSpace) - ((char *)&p), numberId, false));
+ td.AddField("cols", FieldDescription(((char *)&p.cols) - ((char *)&p), numberId, false));
+ td.AddField("colGap", FieldDescription(((char *)&p.colGap) - ((char *)&p), numberId, false));
+ td.AddField("delimiter", FieldDescription(((char *)&p.delimiter) - ((char *)&p), stringId, false));
+ td.AddField("charsPerNumber", FieldDescription(((char *)&p.charsPerNumber) - ((char *)&p), numberId, false));
+ td.AddField("charsPerAdditionalText", FieldDescription(((char *)&p.charsPerAdditionalText) - ((char *)&p), numberId, false));
+ td.AddField("additionalTextGap", FieldDescription(((char *)&p.additionalTextGap) - ((char *)&p), numberId, false));
+}
+
+}
MenuProperties(const Font *font, const Font *disabledFont, const Sprite *cursor, int charsPerEntry, int rows, int rowGap, int iconSpace, int cols, int colGap, int charsPerNumber, char delimiter, int charsPerAdditionalText, int additionalTextGap)
: font(font), disabledFont(disabledFont), cursor(cursor), charsPerEntry(charsPerEntry), rows(rows), rowGap(rowGap), iconSpace(iconSpace), cols(cols), colGap(colGap), charsPerNumber(charsPerNumber), charsPerAdditionalText(charsPerAdditionalText), additionalTextGap(additionalTextGap), delimiter(delimiter) { }
+
+ static void CreateTypeDescription();
};
template<class T>