menuResources.equipMenuRemoveAllLabel = "REMOVE ALL";
menuResources.equipMenuDropLabel = "DROP";
+ graphics::MenuProperties configMenuProperties;
+ configMenuProperties.cols = 1;
+ configMenuProperties.rows = 4;
+ configMenuProperties.charsPerEntry = 8;
+ configMenuProperties.rowGap = 32;
+ configMenuProperties.cursor = &menuCursor;
+ configMenuProperties.font = &menuFont;
+ configMenuProperties.wrapY = true;
+ menuResources.configMenuProperties = &configMenuProperties;
+
+ menuResources.configMessageSpeedLabel = "MESSAGE\n SPEED";
+ menuResources.configMessageSpeedFast = "FAST";
+ menuResources.configMessageSpeedNormal = "NORMAL";
+ menuResources.configMessageSpeedSlow = "SLOW";
+ menuResources.configBattleCursorLabel = "BATTLE\n CURSOR";
+ menuResources.configStatusCursorLabel = "STATUS\n CURSOR";
+ menuResources.configCursorClear = "CLEAR";
+ menuResources.configCursorMemory = "MEMORY";
+ menuResources.configMusicLabel = "MUSIC";
+ menuResources.configMusicStereo = "STEREO";
+ menuResources.configMusicMono = "MONO";
+
InitScreen screen(width, height);
app::State *state(0);
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);
}
}
#include "fwd.h"
#include "../app/State.h"
#include "../geometry/Vector.h"
+#include "../graphics/Menu.h"
namespace menu {
private:
PartyMenu *parent;
+ graphics::Menu<int> configMenu;
};
, equipMenuStrongestLabel(0)
, equipMenuRemoveLabel(0)
, equipMenuRemoveAllLabel(0)
-, equipMenuDropLabel(0) {
+, equipMenuDropLabel(0)
+
+, configMenuProperties(0)
+, configMessageSpeedLabel(0)
+, configMessageSpeedFast(0)
+, configMessageSpeedNormal(0)
+, configMessageSpeedSlow(0)
+, configBattleCursorLabel(0)
+, configStatusCursorLabel(0)
+, configCursorClear(0)
+, configCursorMemory(0)
+, configMusicLabel(0)
+, configMusicStereo(0)
+, configMusicMono(0) {
}
const char *equipMenuRemoveAllLabel;
const char *equipMenuDropLabel;
+ graphics::MenuProperties *configMenuProperties;
+ const char *configMessageSpeedLabel;
+ const char *configMessageSpeedFast;
+ const char *configMessageSpeedNormal;
+ const char *configMessageSpeedSlow;
+ const char *configBattleCursorLabel;
+ const char *configStatusCursorLabel;
+ const char *configCursorClear;
+ const char *configCursorMemory;
+ const char *configMusicLabel;
+ const char *configMusicStereo;
+ const char *configMusicMono;
+
Resources();
};