World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
GUIButton.h
См. документацию.
1 #pragma once
2 
3 #include <array>
4 #include <vector>
5 
6 #include "Engine/Strings.h"
7 #include "GUI/GUIWindow.h"
8 
9 class Image;
10 
11 class GUIButton {
12  public:
14  pParent = nullptr;
15  }
16 
17  void DrawLabel(const String &label_text, GUIFont *pFont, int a5, int uFontShadowColor);
18  bool Contains(unsigned int x, unsigned int y);
19  void Release();
20 
21  unsigned int uX = 0;
22  unsigned int uY = 0;
23  unsigned int uWidth = 0;
24  unsigned int uHeight = 0;
25  unsigned int uZ = 0;
26  unsigned int uW = 0;
27  int uButtonType = 0;
28  int field_1C = 0; // may be pMessageType
30  unsigned int msg_param = 0;
31  int field_28 = 0;
32  bool field_2C_is_pushed = false;
33  GUIWindow *pParent = nullptr;
34  std::vector<Image*> vTextures;
36  String sLabel = "";
38 };
39 
44 extern GUIButton *pBtn_Book_6;
45 extern GUIButton *pBtn_Book_5;
46 extern GUIButton *pBtn_Book_4;
47 extern GUIButton *pBtn_Book_3;
48 extern GUIButton *pBtn_Book_2;
49 extern GUIButton *pBtn_Book_1;
50 
51 
55 extern GUIButton *pBtn_YES;
58 
59 
65 
66 
74 
75 
76 extern GUIButton *pBtn_NPCRight;
77 extern GUIButton *pBtn_NPCLeft;
81 extern GUIButton *pBtn_Rest;
82 extern GUIButton *pBtn_History;
83 extern GUIButton *pBtn_Calendar;
84 extern GUIButton *pBtn_Maps;
86 extern GUIButton *pBtn_Quests;
87 
88 
94 
95 
96 extern GUIButton *pBtn_Up;
97 extern GUIButton *pBtn_Down;
98 extern GUIButton *ptr_507BA4;
99 
100 extern GUIButton *pBtn_Resume;
101 extern GUIButton *pBtn_QuitGame;
103 extern GUIButton *pBtn_LoadGame;
104 extern GUIButton *pBtn_SaveGame;
105 extern GUIButton *pBtn_NewGame;
106 
108 extern GUIButton *pBtn_SliderLeft;
109 
110 
111 extern GUIButton *pBtnDownArrow;
112 extern GUIButton *pBtnArrowUp;
113 extern GUIButton *pBtnCancel;
114 extern GUIButton *pBtnLoadSlot;
115 
116 
117 extern std::array<GUIButton*, 4> pCreationUI_BtnPressRight2;
118 extern std::array<GUIButton*, 4> pCreationUI_BtnPressLeft2;
119 extern std::array<GUIButton*, 4> pCreationUI_BtnPressLeft;
120 extern std::array<GUIButton*, 4> pCreationUI_BtnPressRight;
121 
122 void CreateButtonInColumn(int a1, unsigned int a2);
pMMT_MainMenu_BtnExit
GUIButton * pMMT_MainMenu_BtnExit
Definition: GUIButton.cpp:67
CreateButtonInColumn
void CreateButtonInColumn(int a1, unsigned int a2)
Definition: GUIButton.cpp:117
UIMessageType
UIMessageType
Definition: GUIWindow.h:13
GUIButton::uHotkey
uint8_t uHotkey
Definition: GUIButton.h:35
pBtn_GameControls
GUIButton * pBtn_GameControls
Definition: GUIButton.cpp:76
GUIFont
Definition: GUIFont.h:8
GUIWindow
Definition: GUIWindow.h:433
pBtn_QuickReference
GUIButton * pBtn_QuickReference
Definition: GUIButton.cpp:53
pBtn_Autonotes_Instructors
GUIButton * pBtn_Autonotes_Instructors
Definition: GUIButton.cpp:16
GUIButton::field_75
String field_75
Definition: GUIButton.h:37
GUIButton::pParent
GUIWindow * pParent
Definition: GUIButton.h:33
pMMT_MainMenu_BtnMM8
GUIButton * pMMT_MainMenu_BtnMM8
Definition: GUIButton.cpp:65
pBtn_SaveGame
GUIButton * pBtn_SaveGame
Definition: GUIButton.cpp:78
pBtn_YES
GUIButton * pBtn_YES
Definition: GUIButton.cpp:29
GUIButton::field_28
int field_28
Definition: GUIButton.h:31
pBtn_Book_2
GUIButton * pBtn_Book_2
Definition: GUIButton.cpp:22
GUIButton::uZ
unsigned int uZ
Definition: GUIButton.h:25
pCreationUI_BtnPressLeft2
std::array< GUIButton *, 4 > pCreationUI_BtnPressLeft2
Definition: GUIButton.cpp:91
pBtn_SliderLeft
GUIButton * pBtn_SliderLeft
Definition: GUIButton.cpp:82
pBtn_Resume
GUIButton * pBtn_Resume
Definition: GUIButton.cpp:74
pPlayerCreationUI_BtnMinus
GUIButton * pPlayerCreationUI_BtnMinus
Definition: GUIButton.cpp:31
GUIButton
Definition: GUIButton.h:11
pBtn_Book_3
GUIButton * pBtn_Book_3
Definition: GUIButton.cpp:21
pBtnDownArrow
GUIButton * pBtnDownArrow
Definition: GUIButton.cpp:85
pCharacterScreen_StatsBtn
GUIButton * pCharacterScreen_StatsBtn
Definition: GUIButton.cpp:45
pPlayerCreationUI_BtnReset
GUIButton * pPlayerCreationUI_BtnReset
Definition: GUIButton.cpp:26
pBtn_LoadGame
GUIButton * pBtn_LoadGame
Definition: GUIButton.cpp:77
UI_CreateEndConversationButton
void UI_CreateEndConversationButton()
Definition: GUIButton.cpp:170
GUIButton::Contains
bool Contains(unsigned int x, unsigned int y)
Definition: GUIButton.cpp:113
pBtn_CloseBook
GUIButton * pBtn_CloseBook
Definition: GUIButton.cpp:14
y
EGLSurface EGLint EGLint y
Definition: SDL_egl.h:1596
UIMSG_0
@ UIMSG_0
Definition: GUIWindow.h:14
pBtn_QuitGame
GUIButton * pBtn_QuitGame
Definition: GUIButton.cpp:75
pMMT_MainMenu_BtnContinue
GUIButton * pMMT_MainMenu_BtnContinue
Definition: GUIButton.cpp:66
pButton_RestUI_WaitUntilDawn
GUIButton * pButton_RestUI_WaitUntilDawn
Definition: GUIButton.cpp:37
pBtn_Book_6
GUIButton * pBtn_Book_6
Definition: GUIButton.cpp:18
Image
Definition: Image.h:19
pBtn_SliderRight
GUIButton * pBtn_SliderRight
Definition: GUIButton.cpp:81
pBtn_Book_1
GUIButton * pBtn_Book_1
Definition: GUIButton.cpp:23
pButton_RestUI_Main
GUIButton * pButton_RestUI_Main
Definition: GUIButton.cpp:34
pCharacterScreen_DollBtn
GUIButton * pCharacterScreen_DollBtn
Definition: GUIButton.cpp:46
x
EGLSurface EGLint x
Definition: SDL_egl.h:1596
pBtn_CastSpell
GUIButton * pBtn_CastSpell
Definition: GUIButton.cpp:54
GUIButton::GUIButton
GUIButton()
Definition: GUIButton.h:13
GUIButton::field_2C_is_pushed
bool field_2C_is_pushed
Definition: GUIButton.h:32
pCharacterScreen_SkillsBtn
GUIButton * pCharacterScreen_SkillsBtn
Definition: GUIButton.cpp:44
GUIButton::vTextures
std::vector< Image * > vTextures
Definition: GUIButton.h:34
pBtn_ExitCancel
GUIButton * pBtn_ExitCancel
Definition: GUIButton.cpp:28
pPlayerCreationUI_BtnPlus
GUIButton * pPlayerCreationUI_BtnPlus
Definition: GUIButton.cpp:30
pBtn_Book_4
GUIButton * pBtn_Book_4
Definition: GUIButton.cpp:20
pBtn_Autonotes
GUIButton * pBtn_Autonotes
Definition: GUIButton.cpp:59
GUIButton::msg
UIMessageType msg
Definition: GUIButton.h:29
pBtn_History
GUIButton * pBtn_History
Definition: GUIButton.cpp:56
pCreationUI_BtnPressRight
std::array< GUIButton *, 4 > pCreationUI_BtnPressRight
Definition: GUIButton.cpp:93
pBtn_Autonotes_Misc
GUIButton * pBtn_Autonotes_Misc
Definition: GUIButton.cpp:17
GUIButton::uWidth
unsigned int uWidth
Definition: GUIButton.h:23
GUIButton::field_1C
int field_1C
Definition: GUIButton.h:28
pCharacterScreen_InventoryBtn
GUIButton * pCharacterScreen_InventoryBtn
Definition: GUIButton.cpp:43
pBtn_Rest
GUIButton * pBtn_Rest
Definition: GUIButton.cpp:55
pCharacterScreen_DetalizBtn
GUIButton * pCharacterScreen_DetalizBtn
Definition: GUIButton.cpp:47
pBtn_Quests
GUIButton * pBtn_Quests
Definition: GUIButton.cpp:60
pBtn_Maps
GUIButton * pBtn_Maps
Definition: GUIButton.cpp:58
GUIButton::uX
unsigned int uX
Definition: GUIButton.h:21
pBtn_Book_5
GUIButton * pBtn_Book_5
Definition: GUIButton.cpp:19
GUIButton::uW
unsigned int uW
Definition: GUIButton.h:26
pBtnLoadSlot
GUIButton * pBtnLoadSlot
Definition: GUIButton.cpp:88
pBtn_NewGame
GUIButton * pBtn_NewGame
Definition: GUIButton.cpp:79
uint8_t
unsigned __int8 uint8_t
Definition: SDL_config.h:35
pBtn_Calendar
GUIButton * pBtn_Calendar
Definition: GUIButton.cpp:57
pBtn_Down
GUIButton * pBtn_Down
Definition: GUIButton.cpp:71
pPlayerCreationUI_BtnOK
GUIButton * pPlayerCreationUI_BtnOK
Definition: GUIButton.cpp:27
pCharacterScreen_AwardsBtn
GUIButton * pCharacterScreen_AwardsBtn
Definition: GUIButton.cpp:42
GUIButton::msg_param
unsigned int msg_param
Definition: GUIButton.h:30
pMMT_MainMenu_BtnMM7
GUIButton * pMMT_MainMenu_BtnMM7
Definition: GUIButton.cpp:64
pBtnCancel
GUIButton * pBtnCancel
Definition: GUIButton.cpp:87
GUIButton::DrawLabel
void DrawLabel(const String &label_text, GUIFont *pFont, int a5, int uFontShadowColor)
Definition: GUIButton.cpp:104
GUIButton::uY
unsigned int uY
Definition: GUIButton.h:22
GUIButton::Release
void Release()
Definition: GUIButton.cpp:95
GUIButton::uHeight
unsigned int uHeight
Definition: GUIButton.h:24
pBtnArrowUp
GUIButton * pBtnArrowUp
Definition: GUIButton.cpp:86
pBtn_NPCLeft
GUIButton * pBtn_NPCLeft
Definition: GUIButton.cpp:51
pButton_RestUI_Wait5Minutes
GUIButton * pButton_RestUI_Wait5Minutes
Definition: GUIButton.cpp:36
ptr_507BA4
GUIButton * ptr_507BA4
Definition: GUIButton.cpp:72
pButton_RestUI_Exit
GUIButton * pButton_RestUI_Exit
Definition: GUIButton.cpp:35
GUIWindow.h
pCreationUI_BtnPressRight2
std::array< GUIButton *, 4 > pCreationUI_BtnPressRight2
Definition: GUIButton.cpp:90
pBtn_NPCRight
GUIButton * pBtn_NPCRight
Definition: GUIButton.cpp:50
pMMT_MainMenu_BtnMM6
GUIButton * pMMT_MainMenu_BtnMM6
Definition: GUIButton.cpp:63
GUIButton::sLabel
String sLabel
Definition: GUIButton.h:36
pBtn_InstallRemoveSpell
GUIButton * pBtn_InstallRemoveSpell
Definition: GUIButton.cpp:15
String
std::string String
Definition: Strings.h:10
pCreationUI_BtnPressLeft
std::array< GUIButton *, 4 > pCreationUI_BtnPressLeft
Definition: GUIButton.cpp:92
pButton_RestUI_Wait1Hour
GUIButton * pButton_RestUI_Wait1Hour
Definition: GUIButton.cpp:38
GUIButton::uButtonType
int uButtonType
Definition: GUIButton.h:27
pBtn_Up
GUIButton * pBtn_Up
Definition: GUIButton.cpp:70
pCharacterScreen_ExitBtn
GUIButton * pCharacterScreen_ExitBtn
Definition: GUIButton.cpp:41
Strings.h
pBtn_GameSettings
GUIButton * pBtn_GameSettings
Definition: GUIButton.cpp:52