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

#include <UIGame.h>

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

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

 GUIWindow_GameMenu ()
 
virtual ~GUIWindow_GameMenu ()
 
virtual void Update ()
 
- Открытые члены унаследованные от 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 Release ()
 
void DeleteButtons ()
 

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

- Открытые статические члены унаследованные от 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
 

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

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

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

◆ GUIWindow_GameMenu()

GUIWindow_GameMenu::GUIWindow_GameMenu ( )

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

124  : GUIWindow(WINDOW_GameMenu, 0, 0, window->GetWidth(), window->GetHeight(), 0) {
125  game_ui_menu_options = assets->GetImage_ColorKey("options", 0x7FF);
126  game_ui_menu_new = assets->GetImage_ColorKey("new1", 0x7FF);
127  game_ui_menu_load = assets->GetImage_ColorKey("load1", 0x7FF);
128  game_ui_menu_save = assets->GetImage_ColorKey("save1", 0x7FF);
129  game_ui_menu_controls = assets->GetImage_ColorKey("controls1", 0x7FF);
130  game_ui_menu_resume = assets->GetImage_ColorKey("resume1", 0x7FF);
131  game_ui_menu_quit = assets->GetImage_ColorKey("quit1", 0x7FF);
132 
133  pBtn_NewGame = CreateButton(0x13u, 0x9Bu, 0xD6u, 0x28u, 1, 0,
134  UIMSG_StartNewGame, 0, 0x4Eu,
135  localization->GetString(614), // "New Game"
136  {{game_ui_menu_new}});
137  pBtn_SaveGame = CreateButton(0x13u, 0xD1u, 0xD6u, 0x28u, 1, 0,
139  localization->GetString(615), // "Save Game"
140  {{game_ui_menu_save}});
141  pBtn_LoadGame = CreateButton(19, 263, 0xD6u, 0x28u, 1, 0,
143  localization->GetString(616), // "Load Game"
144  {{game_ui_menu_load}});
146  241, 155, 214, 40, 1, 0, UIMSG_Game_OpenOptionsDialog, 0, 0x43u,
147  localization->GetString(617), // ""Sound, Keyboard, Game Options:""
148  {{game_ui_menu_controls}});
149  pBtn_QuitGame = CreateButton(241, 209, 214, 40, 1, 0, UIMSG_Quit, 0, 0x51u,
150  localization->GetString(618), // "Quit"
151  {{game_ui_menu_quit}});
153  241, 263, 214, 40, 1, 0, UIMSG_GameMenu_ReturnToGame, 0, 0x52u,
154  localization->GetString(619), // "Return to Game"
155  {{game_ui_menu_resume}});
157 }

Перекрестные ссылки assets, GUIWindow::CreateButton(), game_ui_menu_controls, game_ui_menu_load, game_ui_menu_new, game_ui_menu_options, game_ui_menu_quit, game_ui_menu_resume, game_ui_menu_save, AssetsManager::GetImage_ColorKey(), Localization::GetString(), localization, pBtn_NewGame и UIMSG_StartNewGame.

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

◆ ~GUIWindow_GameMenu()

virtual GUIWindow_GameMenu::~GUIWindow_GameMenu ( )
inlinevirtual

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

15 {}

Методы

◆ Update()

void GUIWindow_GameMenu::Update ( )
virtual

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

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

159  {
160  // -----------------------------------
161  // 004156F0 GUI_UpdateWindows --- part
162  render->DrawTextureAlphaNew(pViewport->uViewportTL_X / 640.0f,
163  pViewport->uViewportTL_Y / 480.0f,
165 
166  viewparams->bRedrawGameUI = true;
167 }

Перекрестные ссылки ViewingParams::bRedrawGameUI, game_ui_menu_options, pViewport, render, Viewport::uViewportTL_X, Viewport::uViewportTL_Y и viewparams.


Объявления и описания членов классов находятся в файлах:
pBtn_NewGame
GUIButton * pBtn_NewGame
Definition: GUIButton.cpp:79
Localization::GetString
const char * GetString(unsigned int index) const
Definition: Localization.cpp:13
UIMSG_Quit
@ UIMSG_Quit
Definition: GUIWindow.h:114
Viewport::uViewportTL_Y
int uViewportTL_Y
Definition: Viewport.h:23
game_ui_menu_controls
Image * game_ui_menu_controls
Definition: UIGame.cpp:74
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
GUIWindow::GUIWindow
GUIWindow()
Definition: GUIWindow.cpp:765
localization
Localization * localization
Definition: Localization.cpp:11
GUIWindow::_41D08F_set_keyboard_control_group
void _41D08F_set_keyboard_control_group(int num_buttons, int a3, int a4, int a5)
Definition: GUIWindow.cpp:273
WINDOW_GameMenu
@ WINDOW_GameMenu
Definition: GUIWindow.h:293
UIMSG_StartNewGame
@ UIMSG_StartNewGame
Definition: GUIWindow.h:107
viewparams
struct ViewingParams * viewparams
Definition: mm7_data.cpp:22
UIMSG_Game_OpenSaveGameDialog
@ UIMSG_Game_OpenSaveGameDialog
Definition: GUIWindow.h:109
AssetsManager::GetImage_ColorKey
Texture * GetImage_ColorKey(const String &name, uint16_t colorkey)
Definition: AssetsManager.cpp:34
UIMSG_Game_OpenOptionsDialog
@ UIMSG_Game_OpenOptionsDialog
Definition: GUIWindow.h:110
window
EGLSurface EGLNativeWindowType * window
Definition: SDL_egl.h:1580
UIMSG_Game_OpenLoadGameDialog
@ UIMSG_Game_OpenLoadGameDialog
Definition: GUIWindow.h:108
pBtn_Resume
GUIButton * pBtn_Resume
Definition: GUIButton.cpp:74
pViewport
struct Viewport * pViewport
Definition: mm7_data.cpp:21
assets
AssetsManager * assets
Definition: AssetsManager.cpp:12
ViewingParams::bRedrawGameUI
int bRedrawGameUI
Definition: Viewport.h:74
game_ui_menu_save
Image * game_ui_menu_save
Definition: UIGame.cpp:75
game_ui_menu_quit
Image * game_ui_menu_quit
Definition: UIGame.cpp:72
game_ui_menu_new
Image * game_ui_menu_new
Definition: UIGame.cpp:77
game_ui_menu_resume
Image * game_ui_menu_resume
Definition: UIGame.cpp:73
pBtn_LoadGame
GUIButton * pBtn_LoadGame
Definition: GUIButton.cpp:77
game_ui_menu_options
Image * game_ui_menu_options
Definition: UIGame.cpp:78
Viewport::uViewportTL_X
int uViewportTL_X
Definition: Viewport.h:22
UIMSG_GameMenu_ReturnToGame
@ UIMSG_GameMenu_ReturnToGame
Definition: GUIWindow.h:106
game_ui_menu_load
Image * game_ui_menu_load
Definition: UIGame.cpp:76
pBtn_SaveGame
GUIButton * pBtn_SaveGame
Definition: GUIButton.cpp:78
pBtn_GameControls
GUIButton * pBtn_GameControls
Definition: GUIButton.cpp:76
pBtn_QuitGame
GUIButton * pBtn_QuitGame
Definition: GUIButton.cpp:75
render
std::shared_ptr< IRender > render
Definition: RenderOpenGL.cpp:52