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

#include <UIDialogue.h>

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

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

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

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

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

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

◆ GUIWindow_GenericDialogue()

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

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

Перекрестные ссылки current_screen_type, KeyboardActionMapping::EnterText(), pKeyActionMap, prev_screen_type и SCREEN_BRANCHLESS_NPC_DIALOG.

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

◆ ~GUIWindow_GenericDialogue()

virtual GUIWindow_GenericDialogue::~GUIWindow_GenericDialogue ( )
inlinevirtual

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

19 {}

Методы

◆ Update()

void GUIWindow_GenericDialogue::Update ( )
virtual

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

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

552  {
553  int pTextHeight; // esi@4
554  GUIWindow BranchlessDlg_window; // [sp+D4h] [bp-58h]@4
555  GUIFont *pFont; // [sp+128h] [bp-4h]@1
556 
557  pFont = pFontArrus;
558  if (current_npc_text.length() > 0 && branchless_dialogue_str.empty())
560 
561  BranchlessDlg_window.uFrameWidth = game_viewport_width;
562  BranchlessDlg_window.uFrameZ = 452;
563  pTextHeight =
565  BranchlessDlg_window.uFrameWidth, 12) +
566  7;
567  if (352 - pTextHeight < 8) {
568  pFont = pFontCreate;
569  pTextHeight =
571  BranchlessDlg_window.uFrameWidth, 12) +
572  7;
573  }
574 
575  render->DrawTextureCustomHeight(8 / 640.0f, (352 - pTextHeight) / 480.0f,
576  ui_leather_mm7, pTextHeight);
577  render->DrawTextureAlphaNew(8 / 640.0f, (347 - pTextHeight) / 480.0f,
580  pFont, 12, 354 - pTextHeight, 0,
582  BranchlessDlg_window.uFrameWidth, 12),
583  0, 0, 0);
584  render->DrawTextureNew(0, 352 / 480.0f, game_ui_statusbar);
585  if (pGUIWindow2->receives_keyboard_input_2 != WINDOW_INPUT_IN_PROGRESS) {
586  if (pGUIWindow2->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED) {
587  pGUIWindow2->receives_keyboard_input_2 = WINDOW_INPUT_NONE;
589  sub_4452BB();
590  return;
591  }
592  if (pGUIWindow2->receives_keyboard_input_2 != WINDOW_INPUT_CANCELLED)
593  return;
594  pGUIWindow2->receives_keyboard_input_2 = WINDOW_INPUT_NONE;
596  sub_4452BB();
597  return;
598  }
599  if (pGUIWindow2->ptr_1C == (void *)26) {
600  auto str = StringPrintf("%s %s", GameUI_StatusBar_GetInput().c_str(),
602  pGUIWindow2->DrawText(pFontLucida, 13, 357, 0, str, 0, 0, 0);
604  pFontLucida->GetLineWidth(str) + 13, 357, pFontLucida);
605  return;
606  }
608  pKeyActionMap->SetWindowInputStatus(WINDOW_INPUT_NONE);
610  sub_4452BB();
611  return;
612  }
613 }

Перекрестные ссылки _591428_endcap, branchless_dialogue_str, GUIFont::CalcTextHeight(), current_npc_text, GUIWindow::DrawFlashingInputCursor(), GUIWindow::DrawText(), GUIFont::FitTextInAWindow(), game_ui_statusbar, game_viewport_width, GameUI_StatusBar_ClearInputString(), GameUI_StatusBar_GetInput(), GameUI_StatusBar_OnInput(), GUIFont::GetLineWidth(), pFontArrus, pFontCreate, pFontLucida, pGUIWindow2, pKeyActionMap, KeyboardActionMapping::pPressedKeysBuffer, GUIWindow::ptr_1C, GUIWindow::receives_keyboard_input_2, render, KeyboardActionMapping::SetWindowInputStatus(), StringPrintf(), sub_4452BB(), GUIWindow::uFrameWidth, GUIWindow::uFrameZ и ui_leather_mm7.

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

◆ Release()

void GUIWindow_GenericDialogue::Release ( )
virtual

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

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

545  {
547  pKeyActionMap->SetWindowInputStatus(WINDOW_INPUT_CANCELLED);
548 
550 }

Перекрестные ссылки current_screen_type, pKeyActionMap, prev_screen_type, GUIWindow::Release() и KeyboardActionMapping::SetWindowInputStatus().

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

Объявления и описания членов классов находятся в файлах:
GUIWindow::DrawText
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)
Definition: GUIWindow.cpp:694
ui_leather_mm7
Image * ui_leather_mm7
Definition: GUIWindow.cpp:106
KeyboardActionMapping::EnterText
void EnterText(int a2, int max_string_len, GUIWindow *pWindow)
Definition: Keyboard.cpp:181
GUIFont
Definition: GUIFont.h:8
GUIWindow
Definition: GUIWindow.h:433
sub_4452BB
void sub_4452BB()
Definition: Engine.cpp:2445
height
EGLSurface EGLint EGLint EGLint EGLint height
Definition: SDL_egl.h:1596
game_viewport_width
unsigned int game_viewport_width
Definition: mm7_data.cpp:194
GUIWindow::GUIWindow
GUIWindow()
Definition: GUIWindow.cpp:765
GUIFont::GetLineWidth
unsigned int GetLineWidth(const String &str)
Definition: GUIFont.cpp:278
GUIWindow::Release
virtual void Release()
Definition: GUIWindow.cpp:292
GameUI_StatusBar_ClearInputString
void GameUI_StatusBar_ClearInputString()
Definition: UIStatusBar.cpp:52
pFontCreate
GUIFont * pFontCreate
Definition: GUIFont.cpp:22
GUIWindow::uFrameWidth
unsigned int uFrameWidth
Definition: GUIWindow.h:470
GUIWindow::receives_keyboard_input_2
int receives_keyboard_input_2
Definition: GUIWindow.h:486
GUIWindow::uFrameZ
unsigned int uFrameZ
Definition: GUIWindow.h:472
current_screen_type
enum CURRENT_SCREEN current_screen_type
Definition: GUIWindow.cpp:83
y
EGLSurface EGLint EGLint y
Definition: SDL_egl.h:1596
pGUIWindow2
GUIWindow * pGUIWindow2
Definition: GUIWindow.cpp:60
CURRENT_SCREEN::SCREEN_BRANCHLESS_NPC_DIALOG
@ SCREEN_BRANCHLESS_NPC_DIALOG
GameUI_StatusBar_GetInput
String GameUI_StatusBar_GetInput()
Definition: UIStatusBar.cpp:50
pFontArrus
GUIFont * pFontArrus
Definition: GUIFont.cpp:18
current_npc_text
String current_npc_text
Definition: mm7_data.cpp:780
prev_screen_type
enum CURRENT_SCREEN prev_screen_type
Definition: GUIWindow.cpp:84
x
EGLSurface EGLint x
Definition: SDL_egl.h:1596
KeyboardActionMapping::pPressedKeysBuffer
char pPressedKeysBuffer[257]
Definition: Keyboard.h:66
width
EGLSurface EGLint EGLint EGLint width
Definition: SDL_egl.h:1596
GUIFont::CalcTextHeight
unsigned int CalcTextHeight(const String &str, unsigned int width, int x_offset, bool return_on_carriage=false)
Definition: GUIFont.cpp:246
branchless_dialogue_str
String branchless_dialogue_str
Definition: mm7_data.cpp:619
f
GLfloat f
Definition: SDL_opengl_glext.h:1873
GameUI_StatusBar_OnInput
void GameUI_StatusBar_OnInput(const String &str)
Definition: UIStatusBar.cpp:46
KeyboardActionMapping::SetWindowInputStatus
void SetWindowInputStatus(int a2)
Definition: Keyboard.cpp:195
GUIWindow::DrawFlashingInputCursor
void DrawFlashingInputCursor(int uX, int uY, GUIFont *a2)
Definition: GUIWindow.cpp:759
WINDOW_GreetingNPC
@ WINDOW_GreetingNPC
Definition: GUIWindow.h:304
pKeyActionMap
struct KeyboardActionMapping * pKeyActionMap
Definition: Keyboard.cpp:35
game_ui_statusbar
Image * game_ui_statusbar
Definition: UIGame.cpp:55
GUIFont::FitTextInAWindow
String FitTextInAWindow(const String &inString, unsigned int width, int uX, bool return_on_carriage=false)
Definition: GUIFont.cpp:311
GUIWindow::ptr_1C
void * ptr_1C
Definition: GUIWindow.h:476
pFontLucida
GUIFont * pFontLucida
Definition: GUIFont.cpp:19
StringPrintf
String StringPrintf(const char *fmt,...)
Definition: Strings.cpp:9
_591428_endcap
Image * _591428_endcap
Definition: UIHouses.cpp:52
render
std::shared_ptr< IRender > render
Definition: RenderOpenGL.cpp:52