Public Types | Public Member Functions | Private Member Functions | Private Attributes

gui2::ttitle_screen Class Reference

This class implements the title screen. More...

#include <title_screen.hpp>

Inheritance diagram for gui2::ttitle_screen:
Inheritance graph
[legend]
Collaboration diagram for gui2::ttitle_screen:
Collaboration graph
[legend]

List of all members.

Public Types

enum  tresult {
  TUTORIAL = 1, NEW_CAMPAIGN, MULTIPLAYER, LOAD_GAME,
  GET_ADDONS, START_MAP_EDITOR, CHANGE_LANGUAGE, EDIT_PREFERENCES,
  SHOW_ABOUT, QUIT_GAME, TIP_PREVIOUS, TIP_NEXT,
  SHOW_HELP, REDRAW_BACKGROUND, RELOAD_GAME_DATA, NOTHING
}
 

Values for the menu-items of the main menu.

More...

Public Member Functions

 ttitle_screen ()
 ~ttitle_screen ()

Private Member Functions

virtual const std::string & window_id () const
 Inherited from tdialog, implemented by REGISTER_DIALOG.
virtual void post_build (CVideo &video, twindow &window)
 Inherited from tdialog.
void pre_show (CVideo &video, twindow &window)
 Inherited from tdialog.
void update_tip (twindow &window, const bool previous)
 Updates the tip of day widget.
void show_debug_clock_window (CVideo &video)
 Shows the debug clock.

Private Attributes

unsigned long logo_timer_id_
 The progress bar time for the logo.
tpopupdebug_clock_
 Holds the debug clock dialog.

Detailed Description

This class implements the title screen.

The menu buttons return a result back to the caller with the button pressed. So at the moment it only handles the tips itself.

Todo:
Evaluate whether we can handle more buttons in this class.

Definition at line 36 of file title_screen.hpp.


Member Enumeration Documentation

Values for the menu-items of the main menu.

Todo:
Evaluate the best place for these items.
Enumerator:
TUTORIAL 

Start special campaign 'tutorial'.

NEW_CAMPAIGN 

Let user select a campaign to play.

MULTIPLAYER 

Play single scenario against humans or AI.

LOAD_GAME 
GET_ADDONS 
START_MAP_EDITOR 
CHANGE_LANGUAGE 
EDIT_PREFERENCES 
SHOW_ABOUT 

Show credits.

QUIT_GAME 
TIP_PREVIOUS 

Show previous tip-of-the-day.

TIP_NEXT 

Show next tip-of-the-day.

SHOW_HELP 
REDRAW_BACKGROUND 

Used after an action needing a redraw (ex: fullscreen).

RELOAD_GAME_DATA 

Used to reload all game data.

NOTHING 

Default, nothing done, no redraw needed.

Definition at line 48 of file title_screen.hpp.


Constructor & Destructor Documentation

gui2::ttitle_screen::ttitle_screen (  ) 

Definition at line 122 of file title_screen.cpp.

gui2::ttitle_screen::~ttitle_screen (  ) 

Definition at line 128 of file title_screen.cpp.

References debug_clock_, logo_timer_id_, and gui2::remove_timer().

Here is the call graph for this function:


Member Function Documentation

void gui2::ttitle_screen::post_build ( CVideo video,
twindow window 
) [private, virtual]
void gui2::ttitle_screen::pre_show ( CVideo video,
twindow window 
) [private, virtual]
void gui2::ttitle_screen::show_debug_clock_window ( CVideo video  )  [private]

Shows the debug clock.

Definition at line 413 of file title_screen.cpp.

References debug_clock_, gui2::tpopup::show(), and gui2::show_debug_clock_button.

Referenced by pre_show().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui2::ttitle_screen::update_tip ( twindow window,
const bool  previous 
) [private]

Updates the tip of day widget.

Parameters:
window The window being shown.
previous Show the previous tip, else shows the next one.

Definition at line 390 of file title_screen.cpp.

References gui2::tmulti_page::get_page_count(), gui2::tmulti_page::get_selected_page(), gui2::tmulti_page::select_page(), and gui2::settings::tips.

Referenced by post_build(), and pre_show().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual const std::string& gui2::ttitle_screen::window_id (  )  const [private, virtual]

Inherited from tdialog, implemented by REGISTER_DIALOG.

Implements gui2::tdialog.


Member Data Documentation

Holds the debug clock dialog.

Definition at line 89 of file title_screen.hpp.

Referenced by show_debug_clock_window(), and ~ttitle_screen().

unsigned long gui2::ttitle_screen::logo_timer_id_ [private]

The progress bar time for the logo.

Definition at line 86 of file title_screen.hpp.

Referenced by pre_show(), and ~ttitle_screen().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:22:38 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs