World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Класс GUIWindow_Book

#include <UIBooks.h>

+ Граф наследования:GUIWindow_Book:
+ Граф связей класса GUIWindow_Book:

Открытые члены

 GUIWindow_Book ()
 
virtual ~GUIWindow_Book ()
 
virtual void Release ()
 
- Открытые члены унаследованные от GUIWindow
 GUIWindow ()
 
 GUIWindow (WindowType windowType, unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight, int pButton, const String &hint=String())
 
virtual ~GUIWindow ()
 
GUIButtonCreateButton (int x, int y, int width, int height, int a6, int a7, UIMessageType msg, unsigned int msg_param, uint8_t hotkey, const String &label, const std::vector< Image * > &textures=std::vector< Image * >())
 
bool Contains (unsigned int x, unsigned int y)
 
void DrawFlashingInputCursor (int uX, int uY, GUIFont *a2)
 
int DrawTextInRect (GUIFont *font, unsigned int x, unsigned int y, unsigned int color, const char *text, int rect_width, int reverse_text)
 
int DrawTextInRect (GUIFont *font, unsigned int x, unsigned int y, unsigned int color, String &str, int rect_width, int reverse_text)
 
void DrawText (GUIFont *font, int x, int y, unsigned short uFontColor, const char *str, bool present_time_transparency=false, int max_text_height=0, int uFontShadowColor=0)
 
void DrawText (GUIFont *font, int x, int y, unsigned short uFontColor, const String &str, bool present_time_transparency=false, int max_text_height=0, int uFontShadowColor=0)
 
void DrawTitleText (GUIFont *font, int horizontal_margin, int vertical_margin, unsigned __int16 uDefaultColor, const char *pInString, int line_spacing)
 
void DrawTitleText (GUIFont *font, int horizontal_margin, int vertical_margin, unsigned __int16 uDefaultColor, const String &str, int line_spacing)
 
void DrawShops_next_generation_time_string (GameTime time)
 
void HouseDialogManager ()
 
void DrawMessageBox (bool inside_game_viewport)
 
GUIButtonGetControl (unsigned int uID)
 
void _41D08F_set_keyboard_control_group (int num_buttons, int a3, int a4, int a5)
 
void _41D73D_draw_buff_tooltip ()
 
virtual void Update ()
 
void DeleteButtons ()
 

Защищенные члены

void BasicBookInitialization ()
 

Закрытые члены

void InitializeFonts ()
 

Дополнительные унаследованные члены

- Открытые статические члены унаследованные от GUIWindow
static void InitializeGUI ()
 
- Открытые атрибуты унаследованные от GUIWindow
unsigned int uFrameX
 
unsigned int uFrameY
 
unsigned int uFrameWidth
 
unsigned int uFrameHeight
 
unsigned int uFrameZ
 
unsigned int uFrameW
 
WindowType eWindowType
 
union {
   void *   ptr_1C
 
   unsigned int   par1C
 
}; 
 
int field_24
 
int pNumPresenceButton
 
int pCurrentPosActiveItem
 
int field_30
 
int field_34
 
int pStartingPosActiveItem
 
int receives_keyboard_input_2
 
bool receives_keyboard_input
 
String sHint
 
std::vector< GUIButton * > vButtons
 
Mousemouse = nullptr
 
Loglog = nullptr
 

Подробное описание

См. определение в файле UIBooks.h строка 4

Конструктор(ы)

◆ GUIWindow_Book()

GUIWindow_Book::GUIWindow_Book ( )

См. определение в файле UIBooks.cpp строка 64

65  : GUIWindow(WINDOW_Book, 0, 0, window->GetWidth(), window->GetHeight(), 0) {}

◆ ~GUIWindow_Book()

virtual GUIWindow_Book::~GUIWindow_Book ( )
inlinevirtual

См. определение в файле UIBooks.h строка 7

7 {}

Методы

◆ Release()

void GUIWindow_Book::Release ( )
virtual

Переопределяет метод предка GUIWindow.

См. определение в файле UIBooks.cpp строка 41

41  {
42  // -----------------------------------------
43  // 0041C26A void GUIWindow::Release --- part
44  free(pSpellFont);
45  pSpellFont = nullptr;
46  free(pBookFont);
47  pBookFont = nullptr;
48  free(pBook2Font);
49  pBook2Font = nullptr;
50  free(pAutonoteFont);
51  pAutonoteFont = nullptr;
52 
53  if (ui_book_map_frame) {
55  ui_book_map_frame = nullptr;
56  }
57 
58  pAudioPlayer->PlaySound(SOUND_closebook, 0, 0, -1, 0, 0);
59  MapBookOpen = 0;
60 
62 }

Перекрестные ссылки MapBookOpen, pAudioPlayer, pAutonoteFont, pBook2Font, pBookFont, AudioPlayer::PlaySound(), pSpellFont, Image::Release(), GUIWindow::Release(), SOUND_closebook и ui_book_map_frame.

+ Граф вызовов:

◆ BasicBookInitialization()

void GUIWindow_Book::BasicBookInitialization ( )
protected

См. определение в файле UIBooks.cpp строка 67

67  {
68  pAudioPlayer->StopChannels(-1, -1);
70  CreateButton(475, 445, 158, 34, 1, 0, UIMSG_Escape, 0, 0,
71  localization->GetString(79)); // Close
77 }

Перекрестные ссылки books_page_number, books_primary_item_per_page, GUIWindow::CreateButton(), current_screen_type, full_num_items_in_book, Localization::GetString(), InitializeFonts(), localization, num_achieved_awards, pAudioPlayer, SCREEN_BOOKS, AudioPlayer::StopChannels() и UIMSG_Escape.

Используется в GUIWindow_AutonotesBook::GUIWindow_AutonotesBook(), GUIWindow_CalendarBook::GUIWindow_CalendarBook(), GUIWindow_JournalBook::GUIWindow_JournalBook(), GUIWindow_LloydsBook::GUIWindow_LloydsBook(), GUIWindow_MapBook::GUIWindow_MapBook(), GUIWindow_QuestBook::GUIWindow_QuestBook() и GUIWindow_TownPortalBook::GUIWindow_TownPortalBook().

+ Граф вызовов:
+ Граф вызова функции:

◆ InitializeFonts()

void GUIWindow_Book::InitializeFonts ( )
private

См. определение в файле UIBooks.cpp строка 80

80  {
81  pAudioPlayer->StopChannels(-1, -1);
82  pAudioPlayer->PlaySound(SOUND_openbook, 0, 0, -1, 0, 0);
83 
85 
86  pBookFont = GUIFont::LoadFont("book.fnt", "FONTPAL", NULL);
87  pBook2Font = GUIFont::LoadFont("book2.fnt", "FONTPAL", NULL);
88  pAutonoteFont = GUIFont::LoadFont("autonote.fnt", "FONTPAL", NULL);
89  pSpellFont = GUIFont::LoadFont("spell.fnt", "FONTPAL", NULL);
90 }

Перекрестные ссылки assets, AssetsManager::GetImage_Alpha(), GUIFont::LoadFont(), pAudioPlayer, pAutonoteFont, pBook2Font, pBookFont, AudioPlayer::PlaySound(), pSpellFont, SOUND_openbook, AudioPlayer::StopChannels() и ui_book_map_frame.

Используется в BasicBookInitialization().

+ Граф вызовов:
+ Граф вызова функции:

Объявления и описания членов классов находятся в файлах:
pAutonoteFont
GUIFont * pAutonoteFont
Definition: GUIFont.cpp:16
Localization::GetString
const char * GetString(unsigned int index) const
Definition: Localization.cpp:13
UIMSG_Escape
@ UIMSG_Escape
Definition: GUIWindow.h:96
SOUND_closebook
@ SOUND_closebook
Definition: AudioPlayer.h:94
GUIWindow::CreateButton
GUIButton * CreateButton(int x, int y, int width, int height, int a6, int a7, UIMessageType msg, unsigned int msg_param, uint8_t hotkey, const String &label, const std::vector< Image * > &textures=std::vector< Image * >())
Definition: GUIWindow.cpp:717
AudioPlayer::PlaySound
void PlaySound(SoundID eSoundID, int pid, unsigned int uNumRepeats, int x, int y, int a7)
Definition: AudioPlayer.cpp:195
num_achieved_awards
int num_achieved_awards
Definition: mm7_data.cpp:28
GUIWindow::GUIWindow
GUIWindow()
Definition: GUIWindow.cpp:765
localization
Localization * localization
Definition: Localization.cpp:11
GUIWindow::Release
virtual void Release()
Definition: GUIWindow.cpp:292
current_screen_type
enum CURRENT_SCREEN current_screen_type
Definition: GUIWindow.cpp:83
GUIWindow_Book::InitializeFonts
void InitializeFonts()
Definition: UIBooks.cpp:80
pSpellFont
GUIFont * pSpellFont
Definition: GUIFont.cpp:17
WINDOW_Book
@ WINDOW_Book
Definition: GUIWindow.h:297
MapBookOpen
int MapBookOpen
Definition: mm7_data.cpp:519
GUIFont::LoadFont
static GUIFont * LoadFont(const char *pFontFile, const char *pFontPalette,...)
Definition: GUIFont.cpp:56
pBook2Font
GUIFont * pBook2Font
Definition: GUIFont.cpp:20
AudioPlayer::StopChannels
void StopChannels(int uStartChannel, int uEndChannel)
Definition: AudioPlayer.cpp:331
window
EGLSurface EGLNativeWindowType * window
Definition: SDL_egl.h:1580
pBookFont
GUIFont * pBookFont
Definition: GUIFont.cpp:21
CURRENT_SCREEN::SCREEN_BOOKS
@ SCREEN_BOOKS
assets
AssetsManager * assets
Definition: AssetsManager.cpp:12
books_primary_item_per_page
int books_primary_item_per_page
Definition: mm7_data.cpp:521
books_page_number
int books_page_number
Definition: mm7_data.cpp:520
AssetsManager::GetImage_Alpha
Texture * GetImage_Alpha(const String &name)
Definition: AssetsManager.cpp:66
SOUND_openbook
@ SOUND_openbook
Definition: AudioPlayer.h:93
pAudioPlayer
AudioPlayer * pAudioPlayer
Definition: AudioPlayer.cpp:20
full_num_items_in_book
int full_num_items_in_book
Definition: mm7_data.cpp:29
Image::Release
bool Release()
Definition: Image.cpp:335
ui_book_map_frame
Image * ui_book_map_frame
Definition: UIBooks.cpp:36