X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmenu%2FCapsuleChangeMenu.cpp;h=47c7b2eb5d57bdae5ccbd8a696a907477b75f5de;hb=f6548c2aabfb371bd81382d7800e6e2cdb826e06;hp=24b7187b2cbc34415974e15203463a28212f7ec7;hpb=5cbe0ba11d6fe180f49101547f05e7fe586d55c0;p=l2e.git diff --git a/src/menu/CapsuleChangeMenu.cpp b/src/menu/CapsuleChangeMenu.cpp index 24b7187..47c7b2e 100644 --- a/src/menu/CapsuleChangeMenu.cpp +++ b/src/menu/CapsuleChangeMenu.cpp @@ -11,12 +11,13 @@ #include "../graphics/Font.h" #include "../graphics/Frame.h" #include "../graphics/Texture.h" +#include "../math/Vector.h" using app::Input; using common::Capsule; using common::Inventory; using common::Item; -using geometry::Vector; +using math::Vector; using graphics::Font; using graphics::Frame; @@ -51,7 +52,8 @@ void CapsuleChangeMenu::OnResize(int width, int height) { void CapsuleChangeMenu::HandleEvents(const Input &input) { - if (input.JustPressed(Input::ACTION_B)) { + if (input.JustPressed(Input::ACTION_A) + || input.JustPressed(Input::ACTION_B)) { Ctrl().PopState(); } @@ -104,7 +106,7 @@ void CapsuleChangeMenu::PreviousClass() { } -void CapsuleChangeMenu::UpdateWorld(float deltaT) { +void CapsuleChangeMenu::UpdateWorld(Uint32 deltaT) { } @@ -151,7 +153,7 @@ void CapsuleChangeMenu::RenderClasses(SDL_Surface *screen, const Vector &of Vector target( cursor.X() + parent->Res().capsuleSelectTopLeft->Width(), cursor.Y() + numClasses * parent->Res().capsuleSelectLadder->Height()); - parent->Res().capsuleSelectLeftRepeat->Render(screen, cursor, target); + parent->Res().capsuleSelectLeftRepeat->Draw(screen, cursor, target); cursor.Y() = target.Y(); parent->Res().capsuleSelectBottomLeft->Draw(screen, cursor); cursor.X() += parent->Res().capsuleSelectTopLeft->Width(); @@ -183,7 +185,7 @@ void CapsuleChangeMenu::RenderClasses(SDL_Surface *screen, const Vector &of target = Vector( cursor.X() + parent->Res().capsuleSelectTopRight->Width(), cursor.Y() + numClasses * parent->Res().capsuleSelectLadder->Height()); - parent->Res().capsuleSelectRightRepeat->Render(screen, cursor, target); + parent->Res().capsuleSelectRightRepeat->Draw(screen, cursor, target); cursor.Y() = target.Y(); parent->Res().capsuleSelectBottomRight->Draw(screen, cursor); }