From: Daniel Karbach Date: Thu, 9 Aug 2012 15:21:12 +0000 (+0200) Subject: added some information about menus X-Git-Url: http://git.localhorst.tv/?a=commitdiff_plain;h=8670d83df24f13cd9b4fd324dca9f13824400f7a;p=l2e.git added some information about menus --- diff --git a/src/graphics/Menu.h b/src/graphics/Menu.h index 172c318..1cdddcd 100644 --- a/src/graphics/Menu.h +++ b/src/graphics/Menu.h @@ -34,6 +34,7 @@ public: int Height() const; int ColWidth() const { return iconSpace + font->CharWidth() * charsPerEntry; } int RowHeight() const { return font->CharHeight() + rowGap; } + int CharsPerEntry() const { return charsPerEntry; } T &Selected() { return entries[selected].value; } const T &Selected() const { return entries[selected].value; } @@ -56,6 +57,7 @@ public: void Disable(int index) { entries[index].enabled = false; } void Enable(int index) { entries[index].enabled = true; } void Reserve(int n) { entries.reserve(n); } + void Clear() { entries.clear(); } void Draw(SDL_Surface *dest, geometry::Point position) const;