1 #include "AttackTypeMenu.h"
3 #include "../math/Vector.h"
4 #include "../graphics/Sprite.h"
10 void AttackTypeMenu::Render(SDL_Surface *screen, const math::Vector<int> &position) {
11 const Vector<int> &swordOffset(IconSize());
12 const Vector<int> magicOffset(IconWidth(), 0);
13 const Vector<int> defendOffset(2 * IconWidth(), IconHeight());
14 const Vector<int> ikariOffset(IconWidth(), 2 * IconHeight());
15 const Vector<int> itemOffset(0, IconHeight());
17 icons->Draw(screen, position + swordOffset, AttackChoice::SWORD, (selected == AttackChoice::SWORD) ? 1 : 0);
18 icons->Draw(screen, position + magicOffset, AttackChoice::MAGIC, (selected == AttackChoice::MAGIC) ? 1 : 0);
19 icons->Draw(screen, position + defendOffset, AttackChoice::DEFEND, (selected == AttackChoice::DEFEND) ? 1 : 0);
20 icons->Draw(screen, position + ikariOffset, AttackChoice::IKARI, (selected == AttackChoice::IKARI) ? 1 : 0);
21 icons->Draw(screen, position + itemOffset, AttackChoice::ITEM, (selected == AttackChoice::ITEM) ? 1 : 0);