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

#include <UIQuickReference.h>

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

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

 GUIWindow_QuickReference ()
 
virtual ~GUIWindow_QuickReference ()
 
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
 

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

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

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

◆ GUIWindow_QuickReference()

GUIWindow_QuickReference::GUIWindow_QuickReference ( )

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

20  : GUIWindow(WINDOW_QuickReference, 0, 0, window->GetWidth(), window->GetHeight(), 5) {
21  // 004304E7 Game_EventLoop --- part
22  pEventTimer->Pause();
23  pAudioPlayer->StopChannels(-1, -1);
25 
26  // paperdoll_dbrds[2] = assets->GetImage_16BitAlpha(L"BUTTEXI1");
27 
30  assets->GetImage_ColorKey("quikref", 0x7FF);
31 
33  CreateButton(0x187u, 0x13Cu, 0x4Bu, 0x21u, 1, 0, UIMSG_Escape, 0, 0,
34  localization->GetString(79), // "Exit"
35  {{ui_buttdesc2}}); //, v179);
36 }

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

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

◆ ~GUIWindow_QuickReference()

virtual GUIWindow_QuickReference::~GUIWindow_QuickReference ( )
inlinevirtual

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

6 {}

Методы

◆ Update()

void GUIWindow_QuickReference::Update ( )
virtual

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

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

38  {
39  // -----------------------------------
40  // 004156F0 GUI_UpdateWindows --- part
41  // {
42  // GameUI_QuickRef_Draw();
43  // }
44 
45  //----- (0041A57E) --------------------------------------------------------
46  // void GameUI_QuickRef_Draw()
47 
48  unsigned int pTextColor; // eax@7
49  unsigned int pX; // [sp+14h] [bp-18h]@2
50  unsigned int pY; // edi@9
51  int pSkillsCount; // ecx@27
52  const char *pText; // eax@38
53  int pFontHeight; // [sp+18h] [bp-14h]@1
54  String pTempString;
55 
56  render->DrawTextureAlphaNew(8 / 640.0f, 8 / 480.0f,
58 
59  pFontHeight = pFontArrus->GetHeight() + 1;
60  for (uint i = 0; i < 4; ++i) {
61  Player *player = &pParty->pPlayers[i];
62  pX = 94 * i + 89;
63  if (i == 0)
65  localization->GetString(149),
66  60, 0); // Name
69  player->pName, 84, 0);
70 
71  if (i == 0)
73  localization->GetString(131),
74  60, 0); //Уров.
75  if (player->GetActualLevel() <= player->GetBaseLevel())
76  pTextColor = player->GetExperienceDisplayColor();
77  else
78  pTextColor = ui_character_bonus_text_color;
79  pTempString = StringPrintf("%lu", player->GetActualLevel());
81  pFontArrus, pX, 47, pTextColor,
82  pTempString, 84, 0);
83 
84  pY = pFontHeight + 47;
85  if (i == 0)
87  pFontArrus, 22, pFontHeight + 47, 0,
88  localization->GetString(41), 60, 0); //Класс
90  pFontArrus, pX, pY, 0,
91  localization->GetClassName(player->classType), 84, 0);
92  pY = pFontHeight + pY;
93 
94  if (i == 0)
96  localization->GetString(107),
97  60, 0); //Здор.
99  player->sHealth, player->GetMaxHealth());
100  pTempString = StringPrintf("%d", player->sHealth);
102  pFontArrus, pX, pY, pTextColor, pTempString,
103  84, 0);
104  pY = pFontHeight + pY;
105 
106  if (i == 0)
108  localization->GetString(209),
109  60, 0); //Мана
111  player->sMana, player->GetMaxMana());
112  pTempString = StringPrintf("%d", player->sMana);
114  pFontArrus, pX, pY, pTextColor, pTempString,
115  84, 0);
116  pY = pFontHeight + pY;
117 
118  if (i == 0)
121  60, 0); //Класс брони
123  player->GetActualAC(), player->GetBaseAC());
124  pTempString = StringPrintf("%d", player->GetActualAC());
126  pFontArrus, pX, pY, pTextColor,
127  pTempString, 84, 0);
128  pY = pFontHeight + pY;
129 
130  if (!i)
132  localization->GetString(18),
133  60, 0); //Атака
134  pTempString = StringPrintf("%+d", player->GetActualAttack(false));
136  pFontArrus, pX, pY, 0,
137  pTempString, 84, 0);
138  pY = pFontHeight + pY;
139 
140  if (!i)
142  localization->GetString(66),
143  60, 0); // Damage Повр.
144  pTempString = player->GetMeleeDamageString();
146  pFontArrus, pX, pY, 0, pTempString, 84, 0);
147  pY = pFontHeight + pY;
148 
149  if (!i)
151  localization->GetString(203),
152  60, 0); // Стрелять
153  pTempString = StringPrintf("%+d", player->GetRangedAttack());
155  pFontArrus, pX, pY, 0,
156  pTempString, 84, 0);
157  pY = pFontHeight + pY;
158 
159  if (!i)
161  localization->GetString(66),
162  60, 0); //Повр.
163  pTempString = player->GetRangedDamageString();
165  pFontArrus, pX, pY, 0, pTempString, 84, 0);
166  pY = pFontHeight + pY;
167 
168  if (!i)
170  localization->GetString(205),
171  60, 0); //Навыки
172  pSkillsCount = 0;
173  for (uint j = 0; j <= 36; ++j) {
174  if (player->pActiveSkills[j]) ++pSkillsCount;
175  }
176  pTempString = StringPrintf("%lu", pSkillsCount);
178  pFontArrus, pX, pY, 0, pTempString, 84, 0);
179  pY = pFontHeight + pY;
180 
181  if (!i)
183  localization->GetString(168),
184  60, 0); //Очки
185  pTempString = StringPrintf("%lu", player->uSkillPoints);
187  pFontArrus, pX, pY,
190  pTempString, 84, 0);
191  pY = pFontHeight + pY;
192 
193  if (!i)
195  localization->GetString(45),
196  60, 0); //Сост.
198  pFontArrus, pX, pY, pTextColor,
200  player->GetMajorConditionIdx()),
201  84, 0);
202  pY = pFontHeight + pY;
203 
204  if (!i)
206  localization->GetString(170),
207  60, 0); //Б.Прим.
208  if (player->uQuickSpell)
209  pText = pSpellStats->pInfos[player->uQuickSpell].pShortName;
210  else
211  pText = localization->GetString(153); //Нет
212  pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, pX, pY, 0, pText, 84,
213  0);
214  }
215 
216  if (pParty->GetPartyReputation() >= 0) {
217  if (pParty->GetPartyReputation() <= 5)
218  pTextColor = ui_character_default_text_color;
219  else
221  } else {
222  pTextColor = ui_character_bonus_text_color;
223  }
224 
225  auto str1 = StringPrintf("%s: \f%05d%s\f00000",
226  localization->GetString(180), pTextColor,
228  .c_str()); // Reputation
229  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 22, 323, 0, str1, 0, 0, 0);
230  auto str2 = StringPrintf("\r261%s: %d", localization->GetString(84),
231  pParty->GetPartyFame()); // Fame Слава
232  pGUIWindow_CurrentMenu->DrawText(pFontArrus, 0, 323, 0, str2, 0, 0, 0);
233 }

Перекрестные ссылки Player::classType, GUIWindow::DrawText(), GUIWindow::DrawTextInRect(), Player::GetActualAC(), Player::GetActualAttack(), Player::GetActualLevel(), Player::GetBaseAC(), Player::GetBaseLevel(), Localization::GetCharacterConditionName(), Localization::GetClassName(), Player::GetExperienceDisplayColor(), GUIFont::GetHeight(), Player::GetMajorConditionIdx(), Player::GetMaxHealth(), Player::GetMaxMana(), Player::GetMeleeDamageString(), Party::GetPartyFame(), Party::GetPartyReputation(), Player::GetRangedAttack(), Player::GetRangedDamageString(), GetReputationString(), Localization::GetString(), localization, Player::pActiveSkills, pFontArrus, pGUIWindow_CurrentMenu, SpellStats::pInfos, Player::pName, pParty, Party::pPlayers, SpellInfo::pShortName, pSpellStats, render, Player::sHealth, Player::sMana, StringPrintf(), ui_character_bonus_text_color, ui_character_bonus_text_color_neg, ui_character_default_text_color, ui_character_header_text_color, ui_game_quickref_background, UI_GetHealthManaAndOtherQualitiesStringColor(), Player::uQuickSpell и Player::uSkillPoints.

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

Объявления и описания членов классов находятся в файлах:
Player
Definition: Player.h:401
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
Player::GetRangedDamageString
String GetRangedDamageString()
Definition: Player.cpp:1441
Localization::GetString
const char * GetString(unsigned int index) const
Definition: Localization.cpp:13
Localization::GetCharacterConditionName
const char * GetCharacterConditionName(unsigned int index) const
Definition: Localization.h:75
UIMSG_Escape
@ UIMSG_Escape
Definition: GUIWindow.h:96
Player::GetActualAttack
int GetActualAttack(bool onlyMainHandDmg)
Definition: Player.cpp:1156
pGUIWindow_CurrentMenu
GUIWindow * pGUIWindow_CurrentMenu
Definition: GUIWindow.cpp:54
SpellStats::pInfos
SpellInfo pInfos[100]
Definition: Spells.h:192
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
GetReputationString
String GetReputationString(int reputation)
Definition: UIGame.cpp:2360
Player::GetBaseLevel
int GetBaseLevel()
Definition: Player.cpp:1068
GUIWindow::GUIWindow
GUIWindow()
Definition: GUIWindow.cpp:765
localization
Localization * localization
Definition: Localization.cpp:11
CURRENT_SCREEN::SCREEN_QUICK_REFERENCE
@ SCREEN_QUICK_REFERENCE
ui_character_bonus_text_color_neg
unsigned int ui_character_bonus_text_color_neg
Definition: UICharacter.cpp:47
Party::pPlayers
std::array< Player, 4 > pPlayers
Definition: Party.h:310
GUIFont::GetHeight
unsigned int GetHeight() const
Definition: GUIFont.cpp:84
Player::GetActualAC
int GetActualAC()
Definition: Player.cpp:2452
Player::uSkillPoints
unsigned int uSkillPoints
Definition: Player.h:765
ui_character_bonus_text_color
unsigned int ui_character_bonus_text_color
Definition: UICharacter.cpp:46
Player::pActiveSkills
std::array< unsigned __int16, 37 > pActiveSkills
Definition: Player.h:711
Player::GetBaseAC
int GetBaseAC()
Definition: Player.cpp:2439
current_screen_type
enum CURRENT_SCREEN current_screen_type
Definition: GUIWindow.cpp:83
Party::GetPartyFame
unsigned int GetPartyFame()
Definition: Party.cpp:302
UI_GetHealthManaAndOtherQualitiesStringColor
unsigned int UI_GetHealthManaAndOtherQualitiesStringColor(int current_pos, int base_pos)
Definition: UIGame.cpp:2307
pBtn_ExitCancel
GUIButton * pBtn_ExitCancel
Definition: GUIButton.cpp:28
pParty
Party * pParty
Definition: Party.cpp:30
GUIWindow::DrawTextInRect
int DrawTextInRect(GUIFont *font, unsigned int x, unsigned int y, unsigned int color, const char *text, int rect_width, int reverse_text)
Definition: GUIWindow.cpp:702
ui_character_default_text_color
unsigned int ui_character_default_text_color
Definition: UICharacter.cpp:43
pFontArrus
GUIFont * pFontArrus
Definition: GUIFont.cpp:18
Player::GetMeleeDamageString
String GetMeleeDamageString()
Definition: Player.cpp:1413
AssetsManager::GetImage_ColorKey
Texture * GetImage_ColorKey(const String &name, uint16_t colorkey)
Definition: AssetsManager.cpp:34
AudioPlayer::StopChannels
void StopChannels(int uStartChannel, int uEndChannel)
Definition: AudioPlayer.cpp:331
Player::GetMaxMana
int GetMaxMana()
Definition: Player.cpp:2369
window
EGLSurface EGLNativeWindowType * window
Definition: SDL_egl.h:1580
Player::pName
char pName[16]
Definition: Player.h:637
f
GLfloat f
Definition: SDL_opengl_glext.h:1873
Player::sMana
int sMana
Definition: Player.h:767
WINDOW_QuickReference
@ WINDOW_QuickReference
Definition: GUIWindow.h:299
Timer::Pause
void Pause()
Definition: Time.cpp:19
Player::GetMaxHealth
int GetMaxHealth()
Definition: Player.cpp:2354
pSpellStats
struct SpellStats * pSpellStats
Definition: Spells.cpp:32
Party::GetPartyReputation
int GetPartyReputation()
Definition: Party.cpp:922
ui_game_quickref_background
Image * ui_game_quickref_background
Definition: UIQuickReference.cpp:17
Player::classType
PLAYER_CLASS_TYPE classType
Definition: Player.h:639
Player::GetMajorConditionIdx
unsigned int GetMajorConditionIdx()
Definition: Player.cpp:2614
assets
AssetsManager * assets
Definition: AssetsManager.cpp:12
uint
unsigned int uint
Definition: MM7.h:4
ui_character_header_text_color
unsigned int ui_character_header_text_color
Definition: UICharacter.cpp:45
Player::sHealth
int sHealth
Definition: Player.h:766
Player::GetExperienceDisplayColor
unsigned int GetExperienceDisplayColor()
Definition: Player.cpp:1481
Player::GetActualLevel
int GetActualLevel()
Definition: Player.cpp:1073
SpellInfo::pShortName
char * pShortName
Definition: Spells.h:177
pAudioPlayer
AudioPlayer * pAudioPlayer
Definition: AudioPlayer.cpp:20
Localization::GetClassName
const char * GetClassName(unsigned int index) const
Definition: Localization.h:35
Player::uQuickSpell
unsigned __int8 uQuickSpell
Definition: Player.h:774
StringPrintf
String StringPrintf(const char *fmt,...)
Definition: Strings.cpp:9
String
std::string String
Definition: Strings.h:10
pEventTimer
Timer * pEventTimer
Definition: Time.cpp:8
Player::GetRangedAttack
int GetRangedAttack()
Definition: Player.cpp:1311
render
std::shared_ptr< IRender > render
Definition: RenderOpenGL.cpp:52