X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmenu%2FScenarioMenu.cpp;h=59e075bdbbaee47621a8c300a7e1c69ae37081de;hb=ec824200aec12d6870b70304bcd2e2aeadba767b;hp=9896d8605ee3b55019e449cb09be3a680344bceb;hpb=cc3d698b8c1ad09d7a3f9e3f28bc84e0ac1735ea;p=l2e.git diff --git a/src/menu/ScenarioMenu.cpp b/src/menu/ScenarioMenu.cpp index 9896d86..59e075b 100644 --- a/src/menu/ScenarioMenu.cpp +++ b/src/menu/ScenarioMenu.cpp @@ -2,6 +2,7 @@ #include "PartyMenu.h" #include "Resources.h" +#include "../app/Application.h" #include "../app/Input.h" #include "../common/GameConfig.h" #include "../common/GameState.h" @@ -9,11 +10,12 @@ #include "../common/Item.h" #include "../graphics/Font.h" #include "../graphics/Frame.h" +#include "../math/Vector.h" using app::Input; using common::Inventory; using common::Item; -using geometry::Vector; +using math::Vector; using graphics::Font; using graphics::Frame; @@ -28,6 +30,7 @@ ScenarioMenu::ScenarioMenu(PartyMenu *parent) void ScenarioMenu::OnEnterState(SDL_Surface *) { LoadItems(); + itemMenu.StartAnimation(Ctrl()); } void ScenarioMenu::LoadItems() { @@ -74,7 +77,7 @@ void ScenarioMenu::HandleEvents(const Input &input) { } } -void ScenarioMenu::UpdateWorld(float deltaT) { +void ScenarioMenu::UpdateWorld(Uint32 deltaT) { } @@ -99,7 +102,7 @@ int ScenarioMenu::Height() const { return parent->Height(); } -void ScenarioMenu::RenderHeadline(SDL_Surface *screen, const geometry::Vector &offset) const { +void ScenarioMenu::RenderHeadline(SDL_Surface *screen, const math::Vector &offset) const { const Font &font(*parent->Res().normalFont); const Frame &frame(*parent->Res().statusFrame); const Vector textOffset(2 * font.CharWidth(), font.CharHeight()); @@ -109,7 +112,7 @@ void ScenarioMenu::RenderHeadline(SDL_Surface *screen, const geometry::VectorRes().scenarioMenuHeadline, screen, offset + textOffset); } -void ScenarioMenu::RenderItems(SDL_Surface *screen, const geometry::Vector &offset) const { +void ScenarioMenu::RenderItems(SDL_Surface *screen, const math::Vector &offset) const { const Font &font(*parent->Res().normalFont); const Frame &frame(*parent->Res().statusFrame); const Vector menuOffset(3 * font.CharWidth(), font.CharHeight() + font.CharHeight() / 4);