X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FMenu.h;h=02a88c0be13853a9c59ec6f5393d3ea218afbb73;hb=70641f2eb3f9fce8c89dcbf345e202050609a142;hp=c879cc979556f9b9c1d94d60f7552f5cf338d36e;hpb=1162be37102b24df11f469495c0184f3f9a26ba0;p=l2e.git diff --git a/src/graphics/Menu.h b/src/graphics/Menu.h index c879cc9..02a88c0 100644 --- a/src/graphics/Menu.h +++ b/src/graphics/Menu.h @@ -10,8 +10,6 @@ #include "Font.h" #include "Sprite.h" -#include "../geometry/operators.h" -#include "../geometry/Point.h" #include "../geometry/Vector.h" #include @@ -21,7 +19,6 @@ namespace graphics { class Sprite; -// TODO: animation when top row changes template class Menu { @@ -61,7 +58,7 @@ public: void Reserve(int n) { entries.reserve(n); } void Clear() { entries.clear(); } - void Draw(SDL_Surface *dest, const geometry::Point &position) const; + void Draw(SDL_Surface *dest, const geometry::Vector &position) const; private: int GetRow(int index) const { return index / cols; } @@ -196,7 +193,7 @@ void Menu::SelectIndex(int index) { template -void Menu::Draw(SDL_Surface *dest, const geometry::Point &position) const { +void Menu::Draw(SDL_Surface *dest, const geometry::Vector &position) const { int start(topRow * cols); int slots(rows * cols); int items(entries.size() - start);