#include "AttackTypeMenu.h"
-#include "../app/Input.h"
#include "../geometry/operators.h"
#include "../geometry/Vector.h"
#include "../graphics/Sprite.h"
-using app::Input;
using geometry::Point;
using geometry::Vector;
namespace battle {
-void AttackTypeMenu::ReadInput(const Input &input) {
- if (input.IsDown(Input::PAD_UP)) {
- selected = MAGIC;
- } else if (input.IsDown(Input::PAD_RIGHT)) {
- selected = DEFEND;
- } else if (input.IsDown(Input::PAD_DOWN)) {
- selected = IKARI;
- } else if (input.IsDown(Input::PAD_LEFT)) {
- selected = ITEM;
- } else {
- selected = SWORD;
- }
-}
-
void AttackTypeMenu::Render(SDL_Surface *screen, const geometry::Point<int> &position) {
Vector<int> swordOffset(IconWidth(), IconHeight());
Vector<int> magicOffset(IconWidth(), 0);