4 * Created on: Aug 6, 2012
8 #include "AttackTypeMenu.h"
10 #include "../geometry/Vector.h"
11 #include "../graphics/Sprite.h"
13 using geometry::Vector;
17 void AttackTypeMenu::Render(SDL_Surface *screen, const geometry::Vector<int> &position) {
18 const Vector<int> &swordOffset(IconSize());
19 const Vector<int> magicOffset(IconWidth(), 0);
20 const Vector<int> defendOffset(2 * IconWidth(), IconHeight());
21 const Vector<int> ikariOffset(IconWidth(), 2 * IconHeight());
22 const Vector<int> itemOffset(0, IconHeight());
24 icons->Draw(screen, position + swordOffset, AttackChoice::SWORD, (selected == AttackChoice::SWORD) ? 1 : 0);
25 icons->Draw(screen, position + magicOffset, AttackChoice::MAGIC, (selected == AttackChoice::MAGIC) ? 1 : 0);
26 icons->Draw(screen, position + defendOffset, AttackChoice::DEFEND, (selected == AttackChoice::DEFEND) ? 1 : 0);
27 icons->Draw(screen, position + ikariOffset, AttackChoice::IKARI, (selected == AttackChoice::IKARI) ? 1 : 0);
28 icons->Draw(screen, position + itemOffset, AttackChoice::ITEM, (selected == AttackChoice::ITEM) ? 1 : 0);