#include "global.hpp"
#include "config.hpp"
#include "construct_dialog.hpp"
#include "cursor.hpp"
#include "game_display.hpp"
#include "events.hpp"
#include "filesystem.hpp"
#include "game_config.hpp"
#include "hotkeys.hpp"
#include "key.hpp"
#include "gettext.hpp"
#include "log.hpp"
#include "marked-up_text.hpp"
#include "preferences_display.hpp"
#include "sdl_utils.hpp"
#include "show_dialog.hpp"
#include "titlescreen.hpp"
#include "util.hpp"
#include "video.hpp"
#include "serialization/parser.hpp"
#include "serialization/preprocessor.hpp"
#include <algorithm>
#include <vector>
#include "SDL_ttf.h"
Go to the source code of this file.
Namespaces | |
namespace | gui |
Defines | |
#define | LOG_DP LOG_STREAM(info, display) |
Log info-messages to stdout during the game, mainly for debugging. | |
#define | ERR_DP LOG_STREAM(err, display) |
Log error-messages to stdout during the game, mainly for debugging. | |
#define | LOG_CONFIG LOG_STREAM(info, config) |
#define | ERR_CONFIG LOG_STREAM(err, config) |
Functions | |
static bool | fade_logo (game_display &screen, int xpos, int ypos) |
Fade-in the wesnoth-logo. | |
static void | read_tips_of_day (config &tips_of_day) |
Read the file with the tips-of-the-day. | |
static void | next_tip_of_day (config &tips_of_day, bool reverse=false) |
Go to the next tips-of-the-day. | |
static const config * | get_tip_of_day (config &tips_of_day) |
Return the text for one of the tips-of-the-day. | |
static void | draw_tip_of_day (game_display &screen, config &tips_of_day, const gui::dialog_frame::style &style, gui::button *const previous_tip_button, gui::button *const next_tip_button, gui::button *const help_tip_button, const SDL_Rect *const main_dialog_area, surface_restorer &tip_of_day_restorer) |
Show one tip-of-the-day in a frame on the titlescreen. | |
static void | draw_background (game_display &screen) |
Draw the map image background, revision number and fade the log the first time. | |
TITLE_RESULT | gui::show_title (game_display &screen, config &tips_of_day, bool redraw_background) |
Show titlepage with logo and background, menu-buttons and tip-of-the-day. |
The menu consists of buttons, such als Start-Tutorial, Start-Campaign, Load-Game, etc. As decoration, the wesnoth-logo and a landmap in the background are shown.
Definition in file titlescreen.cpp.
#define ERR_CONFIG LOG_STREAM(err, config) |
Definition at line 56 of file titlescreen.cpp.
#define ERR_DP LOG_STREAM(err, display) |
Log error-messages to stdout during the game, mainly for debugging.
Definition at line 54 of file titlescreen.cpp.
#define LOG_CONFIG LOG_STREAM(info, config) |
Definition at line 55 of file titlescreen.cpp.
#define LOG_DP LOG_STREAM(info, display) |
Log info-messages to stdout during the game, mainly for debugging.
Definition at line 52 of file titlescreen.cpp.
static void draw_background | ( | game_display & | screen | ) | [static] |
Draw the map image background, revision number and fade the log the first time.
Definition at line 287 of file titlescreen.cpp.
References _, CVideo::blit_surface(), draw_solid_tinted_rectangle(), font::draw_text(), ERR_CONFIG, ERR_DP, fade_logo(), game_config::game_title, image::get_image(), CVideo::getSurface(), display::h(), LOG_DP, font::NORMAL_COLOUR, surface::null(), utils::REMOVE_EMPTY, game_config::revision, scale_surface(), display::screen_area(), screen_area(), font::SIZE_TINY, utils::split(), utils::STRIP_SPACES, game_config::title_logo_x, game_config::title_logo_y, update_rect(), display::video(), and display::w().
static void draw_tip_of_day | ( | game_display & | screen, | |
config & | tips_of_day, | |||
const gui::dialog_frame::style & | style, | |||
gui::button *const | previous_tip_button, | |||
gui::button *const | next_tip_button, | |||
gui::button *const | help_tip_button, | |||
const SDL_Rect *const | main_dialog_area, | |||
surface_restorer & | tip_of_day_restorer | |||
) | [static] |
Show one tip-of-the-day in a frame on the titlescreen.
This frame has 2 buttons: Next-Tip, and Show-Help.
Definition at line 205 of file titlescreen.cpp.
References font::draw_text(), lg::engine, lg::err, get_tip_of_day(), gui::widget::location(), LOG_DP, LOG_STREAM, font::NORMAL_COLOUR, surface_restorer::restore(), gui::widget::set_dirty(), gui::widget::set_location(), preferences::show_tip_of_day(), font::SIZE_NORMAL, text, font::text_area(), game_config::title_tip_padding, game_config::title_tip_width, game_config::title_tip_x, display::video(), display::w(), and font::word_wrap_text().
Referenced by gui::show_title().
static bool fade_logo | ( | game_display & | screen, | |
int | xpos, | |||
int | ypos | |||
) | [static] |
Fade-in the wesnoth-logo.
Animation-effect: scroll-in from right.
Used only once, after the game is started.
screen | surface to operate on | |
xpos | x-position of logo | |
ypos | y-position of logo |
true | operation finished (successful or not) | |
false | operation failed (because modeChanged), need to retry |
Definition at line 72 of file titlescreen.cpp.
References display::delay(), ERR_DP, game_config::game_logo, image::get_image(), CVideo::getSurface(), LOG_DP, CVideo::modeChanged(), events::pump(), display::update_display(), update_rect(), and display::video().
Referenced by draw_background().
Return the text for one of the tips-of-the-day.
Definition at line 164 of file titlescreen.cpp.
References config::empty(), preferences::encountered_units(), config::get_children(), next_tip_of_day(), read_tips_of_day(), utils::split(), and tips.
Referenced by draw_tip_of_day().
static void next_tip_of_day | ( | config & | tips_of_day, | |
bool | reverse = false | |||
) | [static] |
Go to the next tips-of-the-day.
Definition at line 152 of file titlescreen.cpp.
References config::child_range(), and tips.
Referenced by get_tip_of_day(), and gui::show_title().
static void read_tips_of_day | ( | config & | tips_of_day | ) | [static] |
Read the file with the tips-of-the-day.
Definition at line 133 of file titlescreen.cpp.
References config::child_range(), config::clear(), ERR_CONFIG, LOG_CONFIG, preprocess_file(), read(), stream, and tips.
Referenced by get_tip_of_day().
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |