]> git.localhorst.tv Git - l2e.git/blobdiff - src/menu/ScenarioMenu.h
added scenario menu
[l2e.git] / src / menu / ScenarioMenu.h
diff --git a/src/menu/ScenarioMenu.h b/src/menu/ScenarioMenu.h
new file mode 100644 (file)
index 0000000..bcc2bbc
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * ScenarioMenu.h
+ *
+ *  Created on: Nov 30, 2012
+ *      Author: holy
+ */
+
+#ifndef MENU_SCENARIOMENU_H_
+#define MENU_SCENARIOMENU_H_
+
+#include "fwd.h"
+#include "../app/State.h"
+#include "../common/fwd.h"
+#include "../geometry/Vector.h"
+#include "../graphics/Menu.h"
+
+namespace menu {
+
+class ScenarioMenu
+: public app::State {
+
+public:
+       explicit ScenarioMenu(PartyMenu *parent);
+
+public:
+       virtual void HandleEvents(const app::Input &);
+       virtual void UpdateWorld(float deltaT);
+       virtual void Render(SDL_Surface *);
+
+       int Width() const;
+       int Height() const;
+
+private:
+       virtual void OnEnterState(SDL_Surface *screen);
+       virtual void OnExitState(SDL_Surface *screen);
+       virtual void OnResumeState(SDL_Surface *screen);
+       virtual void OnPauseState(SDL_Surface *screen);
+
+       virtual void OnResize(int width, int height);
+
+       void LoadItems();
+
+       void RenderHeadline(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
+       void RenderItems(SDL_Surface *screen, const geometry::Vector<int> &offset) const;
+
+private:
+       PartyMenu *parent;
+       graphics::Menu<const common::Item *> itemMenu;
+
+};
+
+}
+
+#endif /* MENU_SCENARIOMENU_H_ */