MainScreenHandler Class Reference

Handler for the main screen. More...

#include <mainscreenhandler.h>

Collaboration diagram for MainScreenHandler:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 MainScreenHandler ()
 Constructor.
void Init (Types::MainScreenMode::mode screen_mode, GameMode::mode game_mode, ScreensHandler *screens_handler, int boxes_number=0)
 Set the screen mode.
void SwitchMode (Types::MainScreenMode::mode screen_mode, GameMode::mode game_mode, int boxes_number=0)
 Switch mode.
void Captions (std::string box1, std::string box2, std::string box3)
 Set the boxes captions.
void PrintCard (const Card &card, bool convert_to_romaji=false)
 Print a card.
void Scroll (int sx, int sy)
 Scrolls the screen.
bool ViewNext ()
void DrawBgImage ()
 Shows the background image of the screen in the current mode.
void Fill (unsigned short color)
 Fill the screen with a color.
 ~MainScreenHandler ()
 Destructor.

Private Member Functions

void SetMode (Types::MainScreenMode::mode screen_mode, GameMode::mode game_mode, ScreensHandler *screens_handler, int boxes_number)
 Set the mode.
void ResetTextBoxesPositions ()
 Reset all the textboxes positions.
void ClearMembers ()
 Delete all members.

Private Attributes

ScreensHandlerscreens_handler_
 Base screens handler.
Types::MainScreenMode::mode screen_mode_
 Mode of the screen.
TextBoxkanji_
 Kanji.
TextBoxon_reading_
 On reading.
TextBoxkun_reading_
 Kun reading.
TextBoxtranslation_
 Translation.
TextBoxexample_kanji_
 Example in kanjis.
TextBoxexample_reading_
 Reading of the example.
TextBoxexample_translation_
 Translation of the example.
TextBoxcaption_kanji_
 Kanji caption.
TextBoxcaption_on_reading_
 On reading caption.
TextBoxcaption_kun_reading_
 Kun reading caption.
TextBoxcaption_translation_
 Translation caption.
TextBoxcaption_example_
 Example caption.
TextBoxbox1_
 Box 1 text.
TextBoxbox2_
 Box 2 text.
TextBoxbox3_
 Box 3 text.
TextBoxcaption_box1_
 Box 1 caption text.
TextBoxcaption_box2_
 Box 2 caption text.
TextBoxcaption_box3_
 Box 3 caption text.
int scroll_y_
 Vertical scroll.
int boxes_number_
 number of boxes [0-3]
GameMode::mode game_mode_
 Game mode.
int bgid_
 Background id.


Detailed Description

Handler for the main screen.

Definition at line 30 of file mainscreenhandler.h.


Member Function Documentation

void MainScreenHandler::Init ( Types::MainScreenMode::mode  screen_mode,
GameMode::mode  game_mode,
ScreensHandler screens_handler,
int  boxes_number = 0 
)

Set the screen mode.

Parameters:
screen_mode Mode of the screen
game_mode Game mode
screens_handler Already created and initialized screens handler
boxes_number Number of text boxes to be used [0-3].

Definition at line 48 of file mainscreenhandler.cpp.

Referenced by DSMemorizer::Init().

void MainScreenHandler::SetMode ( Types::MainScreenMode::mode  screen_mode,
GameMode::mode  game_mode,
ScreensHandler screens_handler,
int  boxes_number 
) [private]

Set the mode.

Parameters:
screen_mode Mode of the screen
game_mode Game mode
screens_handler Already created and initialized screens handler
boxes_number Number of text boxes to be used [0-3].

Definition at line 75 of file mainscreenhandler.cpp.

Referenced by Init(), and SwitchMode().

void MainScreenHandler::SwitchMode ( Types::MainScreenMode::mode  screen_mode,
GameMode::mode  game_mode,
int  boxes_number = 0 
)

Switch mode.

Parameters:
screen_mode Mode of the screen
game_mode Game mode
boxes_number Number of text boxes to be used [0-3].

Definition at line 61 of file mainscreenhandler.cpp.

Referenced by DSMemorizer::Init(), DSMemorizer::KanjiMode(), DSMemorizer::KanjiQuizMode(), DSMemorizer::VocabularyMode(), and DSMemorizer::VocabularyQuizMode().

bool MainScreenHandler::ViewNext (  ) 

Shows the next invisible box

Returns:
true if all was already visible

Definition at line 307 of file mainscreenhandler.cpp.

Referenced by DSMemorizer::KanjiMode(), and DSMemorizer::VocabularyMode().


The documentation for this class was generated from the following files:

Generated on Fri Oct 2 10:25:29 2009 for DSMemorizer by  doxygen 1.5.8