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);
}
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) {
void ConfigMenu::RenderMenu(SDL_Surface *screen, const geometry::Vector<int> &offset) const {
const Font &font(*parent->Res().normalFont);
const Frame &frame(*parent->Res().statusFrame);
+ const Vector<int> menuOffset(
+ 3 * font.CharWidth(), 2 * font.CharHeight());
frame.Draw(screen, offset, 30 * font.CharWidth(), 14 * font.CharHeight());
+ configMenu.Draw(screen, offset + menuOffset);
}
}