1 ///////////////////////////////////////////////////////////////////////////////
2 //            Copyright (C) 2004-2010 by The Allacrost Project
3 //                         All Rights Reserved
4 //
5 // This code is licensed under the GNU GPL version 2. It is free software
6 // and you may modify it and/or redistribute it under the terms of this license.
7 // See http://www.gnu.org/copyleft/gpl.html for details.
8 ///////////////////////////////////////////////////////////////////////////////
9 
10 /** ****************************************************************************
11 *** \file    boot_welcome.h
12 *** \author  Philip Vorsilak, gorzuate@allacrost.org
13 *** \brief   Header file for the boot welcome window
14 *** ***************************************************************************/
15 
16 #ifndef __BOOT_WELCOME__
17 #define __BOOT_WELCOME__
18 
19 #include "utils.h"
20 #include "video.h"
21 #include "gui.h"
22 
23 namespace hoa_boot {
24 
25 namespace private_boot {
26 
27 /** ****************************************************************************
28 *** \brief Displays vital information to the player upon starting the game
29 ***
30 *** This welcome window only pops up the first time that the player starts the game.
31 *** Its purpose is to ensure that the player understands the default key commands in
32 *** case they started up the game prior to reading the game manual. Under normal
33 *** circumstances, this screen is shown only once when the player first starts up
34 *** the game after installation. After that the Lua file holding the game settings
35 *** is marked so that this screen does not pop up a second time.
36 ***
37 *** The window itself consists of a large MenuWindow, header text explaining the
38 *** window's purpose of providing default key mappings to the player, a table of
39 *** the default keys and purposes, and footer text informing the player where
40 *** they can find more information.
41 *** *****************************************************************************/
42 class WelcomeWindow {
43 public:
44 	WelcomeWindow();
45 
46 	~WelcomeWindow();
47 
48 	//! \brief Updates the state of the welcome window and processes user input
49 	void Update();
50 
51 	//! \brief Draws the welcome window and its contents to the screen
52 	void Draw();
53 
54 	//! \brief Activates and shows the welcome window
55 	void Show();
56 
57 	//! \brief Deactivates and hides the welcome window
58 	void Hide();
59 
60 	//! \brief Returns true if the welcome window is currently active and visible
IsActive()61 	bool IsActive() const
62 		{ return _active; }
63 
64 private:
65 	//! \brief Set to true when the window is active and should be visible on the screen
66 	bool _active;
67 
68 	//! Window for the screen
69 	hoa_gui::MenuWindow _window;
70 
71 	//! \brief Rendered text of the header string
72 	hoa_video::TextImage _text_header;
73 
74 	//! \brief An option box used as a header for the key table
75 	hoa_gui::OptionBox _key_table_header;
76 
77 	//! \brief Stores the text for default key mappings in a table format
78 	hoa_gui::OptionBox _key_table;
79 
80 	//! \brief Rendered text that tells the player how to move past the window
81 	hoa_video::TextImage _text_additional;
82 
83 	//! \brief Rendered text that tells the player how to move past the window
84 	hoa_video::TextImage _text_continue;
85 }; // class WelcomeWindow
86 
87 } // namespace private_boot
88 
89 } // namespace hoa_boot
90 
91 #endif // __BOOT_WELCOME__
92