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

#include <UIGame.h>

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

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

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

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

◆ GUIWindow_GameOptions()

GUIWindow_GameOptions::GUIWindow_GameOptions ( )

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

645  : GUIWindow(WINDOW_GameOptions, 0, 0, window->GetWidth(), window->GetHeight(), 0) {
647  assets->GetImage_ColorKey("ControlBG", 0x7FF);
649  assets->GetImage_ColorKey("con_16x", 0x7FF);
651  assets->GetImage_ColorKey("con_32x", 0x7FF);
653  assets->GetImage_ColorKey("con_Smoo", 0x7FF);
656  assets->GetImage_Alpha("con_ArrR");
658  assets->GetImage_ColorKey("convol10", 0x7FF);
660  assets->GetImage_ColorKey("convol20", 0x7FF);
662  assets->GetImage_ColorKey("convol30", 0x7FF);
664  assets->GetImage_ColorKey("convol40", 0x7FF);
666  assets->GetImage_ColorKey("convol50", 0x7FF);
668  assets->GetImage_ColorKey("convol60", 0x7FF);
670  assets->GetImage_ColorKey("convol70", 0x7FF);
672  assets->GetImage_ColorKey("convol80", 0x7FF);
674  assets->GetImage_ColorKey("convol90", 0x7FF);
676  assets->GetImage_ColorKey("convol00", 0x7FF);
678  assets->GetImage_ColorKey("option04", 0x7FF);
680  assets->GetImage_ColorKey("option03", 0x7FF);
682  assets->GetImage_ColorKey("option02", 0x7FF);
684  assets->GetImage_ColorKey("option01", 0x7FF);
685 
688  UIMSG_SetTurnSpeed, 0x80, 0, "");
691  UIMSG_SetTurnSpeed, 0x40u, 0, "");
692  CreateButton(164, 270,
695  UIMSG_SetTurnSpeed, 0, 0, "");
696 
699  UIMSG_ToggleWalkSound, 0, 0, "");
702  UIMSG_ToggleShowDamage, 0, 0, "");
705  UIMSG_ToggleAlwaysRun, 0, 0, "");
708  UIMSG_ToggleFlipOnExit, 0, 0, "");
709 
711  CreateButton(243, 162, 16, 16, 1, 0, UIMSG_ChangeSoundVolume, 4, 0, "",
714  CreateButton(435, 162, 16, 16, 1, 0, UIMSG_ChangeSoundVolume, 5, 0, "",
716  CreateButton(263, 162, 172, 17, 1, 0, UIMSG_ChangeSoundVolume, 0, 0, "");
717 
719  CreateButton(243, 216, 16, 16, 1, 0, UIMSG_ChangeMusicVolume, 4, 0, "",
722  CreateButton(435, 216, 16, 16, 1, 0, UIMSG_ChangeMusicVolume, 5, 0, "",
724  CreateButton(263, 216, 172, 17, 1, 0, UIMSG_ChangeMusicVolume, 0, 0, "");
725 
727  CreateButton(243, 270, 16, 16, 1, 0, UIMSG_ChangeVoiceVolume, 4, 0, "",
730  CreateButton(435, 270, 16, 16, 1, 0, UIMSG_ChangeVoiceVolume, 5, 0, "",
732  CreateButton(263, 270, 172, 17, 1, 0, UIMSG_ChangeVoiceVolume, 0, 0, "");
733 
734  CreateButton(241, 302, 214, 40, 1, 0, UIMSG_Escape, 0, 0,
735  localization->GetString(619)); // "Return to Game"
736  CreateButton(19, 140, 214, 40, 1, 0, UIMSG_OpenKeyMappingOptions, 0, 0x4Bu,
737  "");
738  CreateButton(19, 194, 214, 40, 1, 0, UIMSG_OpenVideoOptions, 0, 86, "");
739 }

Перекрестные ссылки assets, GUIWindow::CreateButton(), Image::GetHeight(), AssetsManager::GetImage_Alpha(), AssetsManager::GetImage_ColorKey(), Localization::GetString(), Image::GetWidth(), localization, options_menu_skin, pBtn_SliderLeft, pBtn_SliderRight, UIMSG_ChangeMusicVolume, UIMSG_ChangeSoundVolume, UIMSG_ChangeVoiceVolume, UIMSG_Escape, UIMSG_OpenKeyMappingOptions, UIMSG_OpenVideoOptions, UIMSG_SetTurnSpeed, UIMSG_ToggleAlwaysRun, UIMSG_ToggleFlipOnExit, UIMSG_ToggleShowDamage, UIMSG_ToggleWalkSound, OptionsMenuSkin::uTextureID_AlwaysRun, OptionsMenuSkin::uTextureID_ArrowLeft, OptionsMenuSkin::uTextureID_ArrowRight, OptionsMenuSkin::uTextureID_Background, OptionsMenuSkin::uTextureID_FlipOnExit, OptionsMenuSkin::uTextureID_ShowDamage, OptionsMenuSkin::uTextureID_SoundLevels, OptionsMenuSkin::uTextureID_TurnSpeed и OptionsMenuSkin::uTextureID_WalkSound.

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

◆ ~GUIWindow_GameOptions()

virtual GUIWindow_GameOptions::~GUIWindow_GameOptions ( )
inlinevirtual

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

23 {}

Методы

◆ Update()

void GUIWindow_GameOptions::Update ( )
virtual

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

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

741  {
742  render->DrawTextureAlphaNew(8 / 640.0f, 8 / 480.0f, game_ui_menu_options);
743  render->DrawTextureAlphaNew(8 / 640.0f, 132 / 480.0f,
745 
746  switch (engine->config->turn_speed) {
747  case 64:
748  render->DrawTextureAlphaNew(
749  BtnTurnCoord[1] / 640.0f, 270 / 480.0f,
751  break;
752  case 128:
753  render->DrawTextureAlphaNew(
754  BtnTurnCoord[2] / 640.0f, 270 / 480.0f,
756  break;
757  default:
758  render->DrawTextureAlphaNew(
759  BtnTurnCoord[0] / 640.0f, 270 / 480.0f,
761  break;
762  }
763 
764  if (!engine->config->no_walk_sound) {
765  render->DrawTextureAlphaNew(
766  20 / 640.0f, 303 / 480.0f,
768  }
769  if (engine->config->show_damage) {
770  render->DrawTextureAlphaNew(
771  128 / 640.0f, 303 / 480.0f,
773  }
774  if (engine->config->flip_on_exit) {
775  render->DrawTextureAlphaNew(
776  128 / 640.0f, 325 / 480.0f,
778  }
779  if (engine->config->always_run) {
780  render->DrawTextureAlphaNew(
781  20 / 640.0f, 325 / 480.0f,
783  }
784 
785  render->DrawTextureAlphaNew(
786  (265 + 17 * engine->config->sound_level) / 640.0f, 162 / 480.0f,
787  options_menu_skin.uTextureID_SoundLevels[engine->config->sound_level]);
788  render->DrawTextureAlphaNew(
789  (265 + 17 * engine->config->music_level) / 640.0f, 216 / 480.0f,
790  options_menu_skin.uTextureID_SoundLevels[engine->config->music_level]);
791  render->DrawTextureAlphaNew(
792  (265 + 17 * engine->config->voice_level) / 640.0f, 270 / 480.0f,
793  options_menu_skin.uTextureID_SoundLevels[engine->config->voice_level]);
794 }

Перекрестные ссылки BtnTurnCoord, engine, game_ui_menu_options, options_menu_skin, render, OptionsMenuSkin::uTextureID_AlwaysRun, OptionsMenuSkin::uTextureID_Background, OptionsMenuSkin::uTextureID_FlipOnExit, OptionsMenuSkin::uTextureID_ShowDamage, OptionsMenuSkin::uTextureID_SoundLevels, OptionsMenuSkin::uTextureID_TurnSpeed и OptionsMenuSkin::uTextureID_WalkSound.


Объявления и описания членов классов находятся в файлах:
Localization::GetString
const char * GetString(unsigned int index) const
Definition: Localization.cpp:13
UIMSG_SetTurnSpeed
@ UIMSG_SetTurnSpeed
Definition: GUIWindow.h:151
UIMSG_Escape
@ UIMSG_Escape
Definition: GUIWindow.h:96
OptionsMenuSkin::uTextureID_SoundLevels
Image * uTextureID_SoundLevels[10]
Definition: Image.h:161
Image::GetHeight
unsigned int GetHeight()
Definition: Image.cpp:230
UIMSG_ToggleAlwaysRun
@ UIMSG_ToggleAlwaysRun
Definition: GUIWindow.h:187
OptionsMenuSkin::uTextureID_ArrowLeft
Image * uTextureID_ArrowLeft
Definition: Image.h:155
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
UIMSG_ChangeMusicVolume
@ UIMSG_ChangeMusicVolume
Definition: GUIWindow.h:95
options_menu_skin
OptionsMenuSkin options_menu_skin
Definition: UIGame.cpp:606
GUIWindow::GUIWindow
GUIWindow()
Definition: GUIWindow.cpp:765
localization
Localization * localization
Definition: Localization.cpp:11
OptionsMenuSkin::uTextureID_ArrowRight
Image * uTextureID_ArrowRight
Definition: Image.h:156
OptionsMenuSkin::uTextureID_TurnSpeed
Image * uTextureID_TurnSpeed[3]
Definition: Image.h:154
BtnTurnCoord
std::array< int, 8 > BtnTurnCoord
Definition: mm7_data.cpp:215
UIMSG_ChangeVoiceVolume
@ UIMSG_ChangeVoiceVolume
Definition: GUIWindow.h:153
Image::GetWidth
unsigned int GetWidth()
Definition: Image.cpp:217
OptionsMenuSkin::uTextureID_ShowDamage
Image * uTextureID_ShowDamage
Definition: Image.h:164
WINDOW_GameOptions
@ WINDOW_GameOptions
Definition: GUIWindow.h:331
AssetsManager::GetImage_ColorKey
Texture * GetImage_ColorKey(const String &name, uint16_t colorkey)
Definition: AssetsManager.cpp:34
window
EGLSurface EGLNativeWindowType * window
Definition: SDL_egl.h:1580
f
GLfloat f
Definition: SDL_opengl_glext.h:1873
UIMSG_OpenKeyMappingOptions
@ UIMSG_OpenKeyMappingOptions
Definition: GUIWindow.h:201
UIMSG_ToggleFlipOnExit
@ UIMSG_ToggleFlipOnExit
Definition: GUIWindow.h:188
UIMSG_ToggleShowDamage
@ UIMSG_ToggleShowDamage
Definition: GUIWindow.h:154
UIMSG_ChangeSoundVolume
@ UIMSG_ChangeSoundVolume
Definition: GUIWindow.h:94
UIMSG_OpenVideoOptions
@ UIMSG_OpenVideoOptions
Definition: GUIWindow.h:207
assets
AssetsManager * assets
Definition: AssetsManager.cpp:12
pBtn_SliderLeft
GUIButton * pBtn_SliderLeft
Definition: GUIButton.cpp:82
pBtn_SliderRight
GUIButton * pBtn_SliderRight
Definition: GUIButton.cpp:81
OptionsMenuSkin::uTextureID_AlwaysRun
Image * uTextureID_AlwaysRun
Definition: Image.h:162
AssetsManager::GetImage_Alpha
Texture * GetImage_Alpha(const String &name)
Definition: AssetsManager.cpp:66
UIMSG_ToggleWalkSound
@ UIMSG_ToggleWalkSound
Definition: GUIWindow.h:152
game_ui_menu_options
Image * game_ui_menu_options
Definition: UIGame.cpp:78
OptionsMenuSkin::uTextureID_Background
Image * uTextureID_Background
Definition: Image.h:153
OptionsMenuSkin::uTextureID_WalkSound
Image * uTextureID_WalkSound
Definition: Image.h:163
OptionsMenuSkin::uTextureID_FlipOnExit
Image * uTextureID_FlipOnExit
Definition: Image.h:160
render
std::shared_ptr< IRender > render
Definition: RenderOpenGL.cpp:52