-/*
- * SpellMenu.cpp
- *
- * Created on: Nov 18, 2012
- * Author: holy
- */
-
#include "SpellMenu.h"
#include "HeroStatus.h"
#include "PartyMenu.h"
#include "Resources.h"
+#include "../app/Application.h"
#include "../app/Input.h"
#include "../common/GameConfig.h"
#include "../common/GameState.h"
#include "../common/Spell.h"
#include "../graphics/Font.h"
#include "../graphics/Frame.h"
+#include "../math/Vector.h"
#include <algorithm>
#include <SDL.h>
using app::Input;
using common::Hero;
using common::Spell;
-using geometry::Vector;
+using math::Vector;
using graphics::Font;
using graphics::Frame;
using std::vector;
SDL_SetAlpha(highlight, SDL_SRCALPHA|SDL_RLEACCEL, 0x20);
actionMenu.SetSelected();
+ actionMenu.StartAnimation(Ctrl());
LoadSpells();
+ spellMenu.StartAnimation(Ctrl());
}
void SpellMenu::LoadSpells() {
// TODO: use spell
}
} else {
- // TODO: swap spells
+ std::swap(GetHero().Spells().at(spellMenu.SelectedIndex()),
+ GetHero().Spells().at(spellMenu.SecondaryIndex()));
spellMenu.SwapSelected();
spellMenu.SetActive();
}
}
}
-void SpellMenu::UpdateWorld(float deltaT) {
+void SpellMenu::UpdateWorld(Uint32 deltaT) {
}