00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef MAINSCREENHANDLER_H_
00021 #define MAINSCREENHANDLER_H_
00022
00023 #include "types.h"
00024
00025 class Card;
00026 class TextBox;
00027 class ScreensHandler;
00028
00030 class MainScreenHandler
00031 {
00032 public:
00034 MainScreenHandler ();
00035
00037 void Init (Types::MainScreenMode::mode screen_mode,
00038 GameMode::mode game_mode,
00039 ScreensHandler* screens_handler,
00040 int boxes_number = 0);
00042 void SwitchMode (Types::MainScreenMode::mode screen_mode,
00043 GameMode::mode game_mode,
00044 int boxes_number = 0);
00045
00047 void Captions (std::string box1, std::string box2, std::string box3);
00048
00050 void PrintCard (const Card& card, bool convert_to_romaji = false);
00052 void Scroll (int sx, int sy);
00055 bool ViewNext ();
00057 void DrawBgImage ();
00059 void Fill (unsigned short color);
00060
00062 ~MainScreenHandler();
00063
00064 private:
00066 void SetMode (Types::MainScreenMode::mode screen_mode,
00067 GameMode::mode game_mode, ScreensHandler* screens_handler,
00068 int boxes_number);
00070 void ResetTextBoxesPositions ();
00072 void ClearMembers ();
00074 ScreensHandler* screens_handler_;
00076 Types::MainScreenMode::mode screen_mode_;
00077 TextBox *kanji_,
00078 *on_reading_,
00079 *kun_reading_,
00080 *translation_,
00081 *example_kanji_,
00082 *example_reading_,
00083 *example_translation_,
00084 *caption_kanji_,
00085 *caption_on_reading_,
00086 *caption_kun_reading_,
00087 *caption_translation_,
00088 *caption_example_,
00089 *box1_,
00090 *box2_,
00091 *box3_,
00092 *caption_box1_,
00093 *caption_box2_,
00094 *caption_box3_;
00095
00097 int scroll_y_;
00099 int boxes_number_;
00101 GameMode::mode game_mode_;
00103 int bgid_;
00104 };
00105
00106 #endif // MAINSCREENHANDLER_H_
00107