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

#include <UIHouses.h>

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

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

 GUIWindow_House (unsigned int x, unsigned int y, unsigned int width, unsigned int height, int button, const String &hint=String())
 
virtual ~GUIWindow_House ()
 
virtual void Update ()
 
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 ()
 
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
 

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

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

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

◆ GUIWindow_House()

GUIWindow_House::GUIWindow_House ( unsigned int  x,
unsigned int  y,
unsigned int  width,
unsigned int  height,
int  button,
const String hint = String() 
)

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

4349  :
4350  GUIWindow(WINDOW_HouseInterior, x, y, width, height, button, hint) {
4351  pEventTimer->Pause(); // pause timer so not attacked
4352  pAudioPlayer->StopChannels(-1, -1);
4353 
4355  pBtn_ExitCancel = CreateButton(471, 445, 169, 35, 1, 0, UIMSG_Escape, 0, 0, localization->GetString(80), // Quit building
4356  { { ui_exit_cancel_button_background } });
4357  for (int v26 = 0; v26 < uNumDialogueNPCPortraits; ++v26) {
4358  const char *v29;
4359  String v30;
4360  if (v26 + 1 == uNumDialogueNPCPortraits && uHouse_ExitPic) {
4362  v29 = localization->GetString(411); // Enter %s
4363  } else {
4364  if (v26 || !dword_591080)
4365  v30 = HouseNPCData[v26 + 1 - ((dword_591080 != 0) ? 1 : 0)]->pName;
4366  else
4367  v30 = p2DEvents[button - 1].pProprieterName;
4368  v29 = localization->GetString(435);
4369  }
4370  sprintf(byte_591180[v26].data(), v29, v30.c_str());
4373  63, 73, 1, 0, UIMSG_ClickHouseNPCPortrait, v26, 0, byte_591180[v26].data());
4374  }
4375  if (uNumDialogueNPCPortraits == 1) {
4376  window_SpeakInHouse = this;
4378  }
4379 }

Перекрестные ссылки GUIWindow::CreateButton(), current_screen_type, Localization::GetString(), localization, pAudioPlayer, Timer::Pause(), pBtn_ExitCancel, pEventTimer, SCREEN_HOUSE, AudioPlayer::StopChannels() и UIMSG_Escape.

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

◆ ~GUIWindow_House()

virtual GUIWindow_House::~GUIWindow_House ( )
inlinevirtual

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

158 {}

Методы

◆ Update()

void GUIWindow_House::Update ( )
virtual

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

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

4381  {
4383  if (!window_SpeakInHouse)
4384  return;
4385  if (window_SpeakInHouse->par1C >= 53)
4386  return;
4388  if (window_SpeakInHouse->par1C < 53)
4390  return;
4391  }
4392  // dialog_menu_id = HOUSE_DIALOGUE_MAIN;
4393  pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Escape, 0, 0); // banned from shop so leaving
4394 }

Перекрестные ссылки PartyTimeStruct::_shop_ban_times, Party::GetPlayingTime(), GUIWindow::HouseDialogManager(), GUIWindow::par1C, Party::PartyTimes, pMessageQueue_50CBD0, pParty, UIMSG_Escape и window_SpeakInHouse.

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

◆ Release()

void GUIWindow_House::Release ( )
virtual

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

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

4396  {
4397  for (int i = 0; i < uNumDialogueNPCPortraits; ++i) {
4398  if (pDialogueNPCPortraits[i]) {
4399  pDialogueNPCPortraits[i]->Release();
4400  pDialogueNPCPortraits[i] = nullptr;
4401  }
4402  }
4404 
4407  game_ui_dialogue_background = nullptr;
4408  }
4409 
4410  dword_5C35D4 = 0;
4411  if (engine->config->flip_on_exit) {
4414  }
4415  pParty->uFlags |= 2u;
4416 
4418 }

Перекрестные ссылки dword_5C35D4, engine, game_ui_dialogue_background, pDialogueNPCPortraits, pIndoorCameraD3D, pParty, Image::Release(), GUIWindow::Release(), IndoorCameraD3D::sRotationY, Party::sRotationY, stru_5C6E00, Party::uFlags, stru193_math::uIntegerDoublePi, stru193_math::uIntegerPi и uNumDialogueNPCPortraits.

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

Объявления и описания членов классов находятся в файлах:
uNumDialogueNPCPortraits
int uNumDialogueNPCPortraits
Definition: NPC.cpp:28
Localization::GetString
const char * GetString(unsigned int index) const
Definition: Localization.cpp:13
stru193_math::uIntegerDoublePi
static const unsigned int uIntegerDoublePi
Definition: OurMath.h:90
UIMSG_Escape
@ UIMSG_Escape
Definition: GUIWindow.h:96
IndoorCameraD3D::sRotationY
int sRotationY
Definition: IndoorCameraD3D.h:247
MapStats::pInfos
MapInfo pInfos[77]
Definition: MapInfo.h:79
Party::GetPlayingTime
GameTime & GetPlayingTime()
Definition: Party.h:230
WINDOW_HouseInterior
@ WINDOW_HouseInterior
Definition: GUIWindow.h:309
HouseNPCData
std::array< struct NPCData *, 7 > HouseNPCData
Definition: mm7_data.cpp:617
byte_591180
std::array< std::array< char, 100 >, 6 > byte_591180
Definition: mm7_data.cpp:615
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
height
EGLSurface EGLint EGLint EGLint EGLint height
Definition: SDL_egl.h:1596
UIMSG_ClickHouseNPCPortrait
@ UIMSG_ClickHouseNPCPortrait
Definition: GUIWindow.h:197
engine
std::shared_ptr< Engine > engine
Definition: Engine.cpp:130
GUIWindow::GUIWindow
GUIWindow()
Definition: GUIWindow.cpp:765
localization
Localization * localization
Definition: Localization.cpp:11
pNPCPortraits_y
std::array< std::array< int, 6 >, 6 > pNPCPortraits_y
Definition: mm7_data.cpp:290
pNPCPortraits_x
std::array< std::array< int, 6 >, 6 > pNPCPortraits_x
Definition: mm7_data.cpp:282
GUIWindow::Release
virtual void Release()
Definition: GUIWindow.cpp:292
HouseNPCPortraitsButtonsList
GUIButton * HouseNPCPortraitsButtonsList[6]
Definition: mm7_data.cpp:618
dword_591080
int dword_591080
Definition: UIHouses.cpp:47
current_screen_type
enum CURRENT_SCREEN current_screen_type
Definition: GUIWindow.cpp:83
Party::PartyTimes
PartyTimeStruct PartyTimes
Definition: Party.h:249
dword_5C35D4
int dword_5C35D4
Definition: mm7_data.cpp:645
p2DEvents
_2devent p2DEvents[525]
Definition: Events.cpp:57
pMapStats
struct MapStats * pMapStats
Definition: mm7_data.cpp:20
uHouse_ExitPic
int uHouse_ExitPic
Definition: UIHouses.cpp:45
y
EGLSurface EGLint EGLint y
Definition: SDL_egl.h:1596
window_SpeakInHouse
GUIWindow * window_SpeakInHouse
Definition: GUIWindow.cpp:51
pBtn_ExitCancel
GUIButton * pBtn_ExitCancel
Definition: GUIButton.cpp:28
pParty
Party * pParty
Definition: Party.cpp:30
x
EGLSurface EGLint x
Definition: SDL_egl.h:1596
CURRENT_SCREEN::SCREEN_HOUSE
@ SCREEN_HOUSE
width
EGLSurface EGLint EGLint EGLint width
Definition: SDL_egl.h:1596
AudioPlayer::StopChannels
void StopChannels(int uStartChannel, int uEndChannel)
Definition: AudioPlayer.cpp:331
Party::uFlags
unsigned int uFlags
Definition: Party.h:313
MapInfo::pName
String pName
Definition: MapInfo.h:38
Timer::Pause
void Pause()
Definition: Time.cpp:19
_4B4224_UpdateNPCTopics
void _4B4224_UpdateNPCTopics(int _this)
Definition: NPC.cpp:1110
GUIWindow::HouseDialogManager
void HouseDialogManager()
Definition: GUIWindow.cpp:397
pDialogueNPCPortraits
std::array< class Image *, 6 > pDialogueNPCPortraits
Definition: NPC.cpp:27
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1974
GUIWindow::par1C
unsigned int par1C
Definition: GUIWindow.h:477
stru_5C6E00
struct stru193_math * stru_5C6E00
Definition: mm7_data.cpp:19
PartyTimeStruct::_shop_ban_times
std::array< GameTime, 53 > _shop_ban_times
Definition: Party.h:144
_2devent::pProprieterName
const char * pProprieterName
Definition: Events2D.h:44
game_ui_dialogue_background
Image * game_ui_dialogue_background
Definition: UIGame.cpp:93
pAudioPlayer
AudioPlayer * pAudioPlayer
Definition: AudioPlayer.cpp:20
pMessageQueue_50CBD0
struct GUIMessageQueue * pMessageQueue_50CBD0
Definition: GUIWindow.cpp:86
pIndoorCameraD3D
IndoorCameraD3D * pIndoorCameraD3D
Definition: IndoorCameraD3D.cpp:21
Party::sRotationY
int sRotationY
Definition: Party.h:251
stru193_math::uIntegerPi
static const unsigned int uIntegerPi
Definition: OurMath.h:88
String
std::string String
Definition: Strings.h:10
pEventTimer
Timer * pEventTimer
Definition: Time.cpp:8
GameTime
Definition: Time.h:14
Image::Release
bool Release()
Definition: Image.cpp:335