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

#include <UIGame.h>

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

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

 GUIWindow_GameVideoOptions ()
 
virtual ~GUIWindow_GameVideoOptions ()
 
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 строка 38

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

◆ GUIWindow_GameVideoOptions()

GUIWindow_GameVideoOptions::GUIWindow_GameVideoOptions ( )

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

515  : GUIWindow(WINDOW_VideoOptions, 0, 0, window->GetWidth(), window->GetHeight(), 0) {
516  // -------------------------------------
517  // GameMenuUI_OptionsVideo_Load --- part
519  assets->GetImage_ColorKey("optvid", 0x7FF);
521  assets->GetImage_ColorKey("opvdH-bs", 0x7FF);
523  assets->GetImage_ColorKey("opvdH-cl", 0x7FF);
525  assets->GetImage_ColorKey("opvdH-tn", 0x7FF);
526 
528  assets->GetImage_ColorKey("convol10", 0x7FF);
530  assets->GetImage_ColorKey("convol20", 0x7FF);
532  assets->GetImage_ColorKey("convol30", 0x7FF);
534  assets->GetImage_ColorKey("convol40", 0x7FF);
536  assets->GetImage_ColorKey("convol50", 0x7FF);
538  assets->GetImage_ColorKey("convol60", 0x7FF);
540  assets->GetImage_ColorKey("convol70", 0x7FF);
542  assets->GetImage_ColorKey("convol80", 0x7FF);
544  assets->GetImage_ColorKey("convol90", 0x7FF);
546  assets->GetImage_ColorKey("convol00", 0x7FF);
547  // not_available_bloodsplats_texture_id =
548  // pIcons_LOD->LoadTexture("opvdG-bs", TEXTURE_16BIT_PALETTE);
549  // not_available_us_colored_lights_texture_id =
550  // pIcons_LOD->LoadTexture("opvdG-cl", TEXTURE_16BIT_PALETTE);
551  // not_available_tinting_texture_id = pIcons_LOD->LoadTexture("opvdG-tn",
552  // TEXTURE_16BIT_PALETTE);
553 
554  CreateButton(0xF1u, 0x12Eu, 0xD6u, 0x28u, 1, 0, UIMSG_Escape, 0, 0, "");
555  // if ( render->pRenderD3D )
556  {
557  CreateButton(0x13u, 0x118u, 0xD6u, 0x12u, 1, 0, UIMSG_ToggleBloodsplats,
558  0, 0, "");
559  CreateButton(0x13u, 0x12Eu, 0xD6u, 0x12u, 1, 0,
560  UIMSG_ToggleColoredLights, 0, 0, "");
561  CreateButton(0x13u, 0x144u, 0xD6u, 0x12u, 1, 0, UIMSG_ToggleTint, 0, 0,
562  "");
563  }
564 }

Перекрестные ссылки assets, GUIWindow::CreateButton(), game_ui_menu_options_video_background, game_ui_menu_options_video_bloodsplats, game_ui_menu_options_video_coloredlights, game_ui_menu_options_video_gamma_positions, game_ui_menu_options_video_tinting, AssetsManager::GetImage_ColorKey(), UIMSG_Escape, UIMSG_ToggleBloodsplats, UIMSG_ToggleColoredLights и UIMSG_ToggleTint.

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

◆ ~GUIWindow_GameVideoOptions()

virtual GUIWindow_GameVideoOptions::~GUIWindow_GameVideoOptions ( )
inlinevirtual

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

41 {}

Методы

◆ Update()

void GUIWindow_GameVideoOptions::Update ( )
virtual

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

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

567  {
568  // -----------------------------------
569  // 004156F0 GUI_UpdateWindows --- part
570  GUIWindow msg_window; // [sp+8h] [bp-54h]@3
571 
572  render->DrawTextureAlphaNew(
573  8 / 640.0f, 8 / 480.0f,
574  game_ui_menu_options_video_background); // draw base texture
575  // if ( !render->bWindowMode && render->IsGammaSupported() )
576  {
577  render->DrawTextureAlphaNew(
578  (17 * uGammaPos + 42) / 640.0f, 162 / 480.0f,
580 
581  render->DrawTextureNew(274 / 640.0f, 169 / 480.0f, gamma_preview_image);
582  msg_window.uFrameX = 22;
583  msg_window.uFrameY = 190;
584  msg_window.uFrameWidth = 211;
585  msg_window.uFrameHeight = 79;
586  msg_window.uFrameZ = 232;
587  msg_window.uFrameW = 268;
588  msg_window.DrawTitleText(
590  localization->GetString(226),
591  3); // "Gamma controls the relative ""brightness"" of the game. May
592  // vary depending on your monitor."
593  }
594 
595  if (!engine->config->NoBloodsplats())
596  render->DrawTextureAlphaNew(20 / 640.0f, 281 / 480.0f,
598  if (render->config->is_using_colored_lights)
599  render->DrawTextureAlphaNew(20 / 640.0f, 303 / 480.0f,
601  if (render->config->is_tinting)
602  render->DrawTextureAlphaNew(20 / 640.0f, 325 / 480.0f,
604 }

Перекрестные ссылки GUIWindow::DrawTitleText(), engine, game_ui_menu_options_video_background, game_ui_menu_options_video_bloodsplats, game_ui_menu_options_video_coloredlights, game_ui_menu_options_video_gamma_positions, game_ui_menu_options_video_tinting, gamma_preview_image, Localization::GetString(), localization, pFontSmallnum, render, GUIWindow::uFrameHeight, GUIWindow::uFrameW, GUIWindow::uFrameWidth, GUIWindow::uFrameX, GUIWindow::uFrameY, GUIWindow::uFrameZ, uGammaPos и ui_gamemenu_video_gamma_title_color.

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

Объявления и описания членов классов находятся в файлах:
GUIWindow::uFrameW
unsigned int uFrameW
Definition: GUIWindow.h:473
Localization::GetString
const char * GetString(unsigned int index) const
Definition: Localization.cpp:13
UIMSG_Escape
@ UIMSG_Escape
Definition: GUIWindow.h:96
GUIWindow
Definition: GUIWindow.h:433
uGammaPos
unsigned int uGammaPos
Definition: mm7_data.cpp:214
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
engine
std::shared_ptr< Engine > engine
Definition: Engine.cpp:130
GUIWindow::GUIWindow
GUIWindow()
Definition: GUIWindow.cpp:765
localization
Localization * localization
Definition: Localization.cpp:11
game_ui_menu_options_video_gamma_positions
std::array< Image *, 10 > game_ui_menu_options_video_gamma_positions
Definition: UIGame.cpp:99
GUIWindow::DrawTitleText
void DrawTitleText(GUIFont *font, int horizontal_margin, int vertical_margin, unsigned __int16 uDefaultColor, const char *pInString, int line_spacing)
Definition: GUIWindow.cpp:665
GUIWindow::uFrameWidth
unsigned int uFrameWidth
Definition: GUIWindow.h:470
GUIWindow::uFrameZ
unsigned int uFrameZ
Definition: GUIWindow.h:472
ui_gamemenu_video_gamma_title_color
unsigned int ui_gamemenu_video_gamma_title_color
Definition: UICharacter.cpp:71
gamma_preview_image
Image * gamma_preview_image
Definition: Game.cpp:242
UIMSG_ToggleColoredLights
@ UIMSG_ToggleColoredLights
Definition: GUIWindow.h:209
game_ui_menu_options_video_bloodsplats
Image * game_ui_menu_options_video_bloodsplats
Definition: UIGame.cpp:96
game_ui_menu_options_video_coloredlights
Image * game_ui_menu_options_video_coloredlights
Definition: UIGame.cpp:97
AssetsManager::GetImage_ColorKey
Texture * GetImage_ColorKey(const String &name, uint16_t colorkey)
Definition: AssetsManager.cpp:34
GUIWindow::uFrameHeight
unsigned int uFrameHeight
Definition: GUIWindow.h:471
window
EGLSurface EGLNativeWindowType * window
Definition: SDL_egl.h:1580
f
GLfloat f
Definition: SDL_opengl_glext.h:1873
WINDOW_VideoOptions
@ WINDOW_VideoOptions
Definition: GUIWindow.h:333
GUIWindow::uFrameY
unsigned int uFrameY
Definition: GUIWindow.h:469
game_ui_menu_options_video_background
Image * game_ui_menu_options_video_background
Definition: UIGame.cpp:95
UIMSG_ToggleTint
@ UIMSG_ToggleTint
Definition: GUIWindow.h:210
game_ui_menu_options_video_tinting
Image * game_ui_menu_options_video_tinting
Definition: UIGame.cpp:98
assets
AssetsManager * assets
Definition: AssetsManager.cpp:12
UIMSG_ToggleBloodsplats
@ UIMSG_ToggleBloodsplats
Definition: GUIWindow.h:208
GUIWindow::uFrameX
unsigned int uFrameX
Definition: GUIWindow.h:468
pFontSmallnum
GUIFont * pFontSmallnum
Definition: GUIFont.cpp:25
render
std::shared_ptr< IRender > render
Definition: RenderOpenGL.cpp:52