]> git.localhorst.tv Git - l2e.git/blobdiff - src/graphics/Menu.cpp
added menu cursor animations
[l2e.git] / src / graphics / Menu.cpp
index 7a1f25df888a7ae8bfb4dfbcaa691b1ebce593f3..2d7e23777f51c3850ce7ddc9208716f645b11c47 100644 (file)
@@ -1,12 +1,6 @@
-/*
- * Menu.cpp
- *
- *  Created on: Sep 9, 2012
- *      Author: holy
- */
-
 #include "Menu.h"
 
+#include "Animation.h"
 #include "../loader/Interpreter.h"
 #include "../loader/TypeDescription.h"
 
@@ -26,6 +20,9 @@ void MenuProperties::CreateTypeDescription() {
        td.AddField("font", FieldDescription(((char *)&p.font) - ((char *)&p), Font::TYPE_ID).SetReferenced().SetDescription("the font to use for normal/enabled entries"));
        td.AddField("disabledFont", FieldDescription(((char *)&p.disabledFont) - ((char *)&p), Font::TYPE_ID).SetReferenced().SetDescription("the font for disabled entries"));
        td.AddField("cursor", FieldDescription(((char *)&p.cursor) - ((char *)&p), Sprite::TYPE_ID).SetReferenced().SetDescription("the cursor sprite indicating the current selection"));
+       td.AddField("selectedCursor", FieldDescription(((char *)&p.selectedCursor) - ((char *)&p), Sprite::TYPE_ID).SetReferenced().SetDescription("the cursor sprite used when fixating a selection"));
+       td.AddField("cursorAnimation", FieldDescription(((char *)&p.cursorAnimation) - ((char *)&p), Animation::TYPE_ID).SetReferenced().SetDescription("an animation for the cursor sprite"));
+       td.AddField("selectedCursorAnimation", FieldDescription(((char *)&p.selectedCursorAnimation) - ((char *)&p), Animation::TYPE_ID).SetReferenced().SetDescription("an animation for the selected cursor"));
        td.AddField("charsPerEntry", FieldDescription(((char *)&p.charsPerEntry) - ((char *)&p), Interpreter::NUMBER_ID).SetDescription("width of an entry in characters"));
        td.AddField("rows", FieldDescription(((char *)&p.rows) - ((char *)&p), Interpreter::NUMBER_ID).SetDescription("number of visible rows"));
        td.AddField("rowGap", FieldDescription(((char *)&p.rowGap) - ((char *)&p), Interpreter::NUMBER_ID).SetDescription("space between rows in pixles"));
@@ -36,6 +33,9 @@ void MenuProperties::CreateTypeDescription() {
        td.AddField("charsPerNumber", FieldDescription(((char *)&p.charsPerNumber) - ((char *)&p), Interpreter::NUMBER_ID).SetDescription("maximum width of a number in chars"));
        td.AddField("charsPerAdditionalText", FieldDescription(((char *)&p.charsPerAdditionalText) - ((char *)&p), Interpreter::NUMBER_ID).SetDescription("maximum number of additional text characters"));
        td.AddField("additionalTextGap", FieldDescription(((char *)&p.additionalTextGap) - ((char *)&p), Interpreter::NUMBER_ID).SetDescription("space between normal and additional text in pixels"));
+       td.AddField("wrapX", FieldDescription(((char *)&p.wrapX) - ((char *)&p), Interpreter::BOOLEAN_ID).SetDescription("horizontally wrap cursor movement"));
+       td.AddField("wrapY", FieldDescription(((char *)&p.wrapY) - ((char *)&p), Interpreter::BOOLEAN_ID).SetDescription("vertically wrap cursor movement"));
+       td.AddField("thirdColumnHack", FieldDescription(((char *)&p.thirdColumnHack) - ((char *)&p), Interpreter::NUMBER_ID).SetDescription("offset the third column by this many characters"));
 }
 
 void MenuProperties::Construct(void *data) {