X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmenu%2FConfigMenu.cpp;h=62eed325d0ff33b40ebe2b1d29bf3e714fc64d43;hb=1852ed1ca9ccfb63183fec12efeeaccc211a9f72;hp=1e27973e94e954f78957227c5263765e52dc16de;hpb=a47b25a3a6631c8136fec6585a92b8756c68d243;p=l2e.git diff --git a/src/menu/ConfigMenu.cpp b/src/menu/ConfigMenu.cpp index 1e27973..62eed32 100644 --- a/src/menu/ConfigMenu.cpp +++ b/src/menu/ConfigMenu.cpp @@ -22,8 +22,12 @@ using graphics::Frame; namespace menu { ConfigMenu::ConfigMenu(PartyMenu *parent) -: parent(parent) { - +: parent(parent) +, configMenu(*parent->Res().configMenuProperties) { + configMenu.Add(parent->Res().configMessageSpeedLabel, 0); + configMenu.Add(parent->Res().configBattleCursorLabel, 1); + configMenu.Add(parent->Res().configStatusCursorLabel, 2); + configMenu.Add(parent->Res().configMusicLabel, 3); } @@ -62,6 +66,12 @@ void ConfigMenu::HandleEvents(const Input &input) { if (input.JustPressed(Input::ACTION_B)) { Ctrl().PopState(); } + if (input.JustPressed(Input::PAD_DOWN)) { + configMenu.NextRow(); + } + if (input.JustPressed(Input::PAD_UP)) { + configMenu.PreviousRow(); + } } void ConfigMenu::UpdateWorld(float deltaT) { @@ -94,8 +104,11 @@ void ConfigMenu::RenderHeadline(SDL_Surface *screen, const geometry::Vector void ConfigMenu::RenderMenu(SDL_Surface *screen, const geometry::Vector &offset) const { const Font &font(*parent->Res().normalFont); const Frame &frame(*parent->Res().statusFrame); + const Vector menuOffset( + 3 * font.CharWidth(), 2 * font.CharHeight()); frame.Draw(screen, offset, 30 * font.CharWidth(), 14 * font.CharHeight()); + configMenu.Draw(screen, offset + menuOffset); } }