X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FMenu.cpp;fp=src%2Fgraphics%2FMenu.cpp;h=b70697e43a1fa71fda57483051dd60d278687590;hb=e35b71bedb8c2424346d60c737020f1599438b74;hp=0000000000000000000000000000000000000000;hpb=81da0a7970ce80843ef8f144da06c1e0e2d950a9;p=l2e.git diff --git a/src/graphics/Menu.cpp b/src/graphics/Menu.cpp new file mode 100644 index 0000000..b70697e --- /dev/null +++ b/src/graphics/Menu.cpp @@ -0,0 +1,43 @@ +/* + * 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)); +} + +}