1 /*
2  * This file is part of EasyRPG Player.
3  *
4  * EasyRPG Player is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * EasyRPG Player is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with EasyRPG Player. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef EP_SCENE_MENU_H
19 #define EP_SCENE_MENU_H
20 
21 // Headers
22 #include "scene.h"
23 #include "window_command.h"
24 #include "window_gold.h"
25 #include "window_menustatus.h"
26 
27 /**
28  * Scene Menu class.
29  */
30 class Scene_Menu : public Scene {
31 public:
32 	/**
33 	 * Constructor.
34 	 *
35 	 * @param menu_index selected index in the menu.
36 	 */
37 	Scene_Menu(int menu_index = 0);
38 
39 	void Start() override;
40 	void Continue(SceneType prev_scene) override;
41 	void Update() override;
42 
43 	/**
44 	 * Creates the window displaying the options.
45 	 */
46 	void CreateCommandWindow();
47 
48 	/**
49 	 * Update function if command window is active.
50 	 */
51 	void UpdateCommand();
52 
53 	/**
54 	 * Update function if status window is active.
55 	 */
56 	void UpdateActorSelection();
57 
58 	/** Options available in a Rpg2k3 menu. */
59 	enum CommandOptionType {
60 		Item = 1,
61 		Skill,
62 		Equipment,
63 		Save,
64 		Status,
65 		Row,
66 		Order,
67 		Wait,
68 		Quit,
69 		// EasyRPG extra
70 		Debug = 100
71 	};
72 
73 private:
74 	/** Selected index on startup. */
75 	int menu_index;
76 
77 	/** Window displaying the commands. */
78 	std::unique_ptr<Window_Command> command_window;
79 
80 	/** Window displaying the gold amount. */
81 	std::unique_ptr<Window_Gold> gold_window;
82 
83 	/** Window displaying the heros and their status. */
84 	std::unique_ptr<Window_MenuStatus> menustatus_window;
85 
86 	/** Options available in the menu. */
87 	std::vector<CommandOptionType> command_options;
88 };
89 
90 #endif
91