storyscreen/interface.hpp

Go to the documentation of this file.
00001 /* $Id: interface.hpp 52533 2012-01-07 02:35:17Z shadowmaster $ */
00002 /*
00003    Copyright (C) 2009 - 2012 by Ignacio R. Morelle <shadowm2006@gmail.com>
00004    Part of the Battle for Wesnoth Project http://www.wesnoth.org/
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 2 of the License, or
00009    (at your option) any later version.
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY.
00012 
00013    See the COPYING file for more details.
00014 */
00015 
00016 /**
00017  * @file
00018  * Storyscreen controller (wrapper interface).
00019  */
00020 
00021 #ifndef STORYSCREEN_HPP_INCLUDED
00022 #define STORYSCREEN_HPP_INCLUDED
00023 
00024 #include <string>
00025 
00026 #include "config.hpp"
00027 
00028 class vconfig;
00029 class display;
00030 class t_string;
00031 
00032 namespace storyscreen {
00033 
00034 enum START_POSITION {
00035     START_BEGINNING,
00036     START_END
00037 };
00038 
00039 } /* storyscreen namespace */
00040 
00041 /**
00042  * Function to show an introduction sequence segment using story WML.
00043  * The WML config data (story_cfg) has a format similar to:
00044  * @code
00045  * [part]
00046  *     id='id'
00047  *     story='story'
00048  *     image='img'
00049  * [/part]
00050  * @endcode
00051  * Where 'id' is a unique identifier, 'story' is text describing the
00052  * storyline,and 'img' is a background image. Each part of the sequence will
00053  * be displayed in turn, with the user able to go to the next part, or skip
00054  * it entirely.
00055  * @return is NEXT if the segment played to the end, BACK if the segment played to the beginning,
00056  * and QUIT if the story was quit
00057  */
00058 void show_story(display &disp, const std::string &scenario_name,
00059     const config::const_child_itors &story);
00060 
00061 /**
00062  * Displays a simple fading screen with any user-provided text.
00063  * Used after the end of single-player campaigns.
00064  *
00065  * @param text     Text to display, centered on the screen.
00066  *
00067  * @param duration In milliseconds, for how much time the text will
00068  *                 be displayed on screen.
00069  */
00070 void show_endscreen(display& disp, const t_string& text, unsigned int duration);
00071 
00072 #endif /* ! STORYSCREEN_HPP_INCLUDED */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:02:44 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs