0
|
1 #include "GUIWindow.h"
|
|
2 #include "GUIFont.h"
|
|
3
|
|
4
|
|
5
|
|
6
|
|
7
|
|
8
|
|
9
|
|
10 struct GUIButton *pBtn_CloseBook;
|
|
11 struct GUIButton *pBtn_InstallRemoveSpell;
|
|
12 struct GUIButton *pBtn_Autonotes_Instructors;
|
|
13 struct GUIButton *pBtn_Autonotes_Misc;
|
|
14 struct GUIButton *pBtn_Book_6;
|
|
15 struct GUIButton *pBtn_Book_5;
|
|
16 struct GUIButton *pBtn_Book_4;
|
|
17 struct GUIButton *pBtn_Book_3;
|
|
18 struct GUIButton *pBtn_Book_2;
|
|
19 struct GUIButton *pBtn_Book_1;
|
|
20
|
|
21
|
|
22 struct GUIButton *pPlayerCreationUI_BtnReset;
|
|
23 struct GUIButton *pPlayerCreationUI_BtnOK;
|
|
24 struct GUIButton *pBtn_ExitCancel;
|
|
25 struct GUIButton *pBtn_YES;
|
|
26 struct GUIButton *pPlayerCreationUI_BtnPlus;
|
|
27 struct GUIButton *pPlayerCreationUI_BtnMinus;
|
|
28
|
|
29
|
|
30 struct GUIButton *pButton_RestUI_Main;
|
|
31 struct GUIButton *pButton_RestUI_Exit;
|
|
32 struct GUIButton *pButton_RestUI_Wait5Minutes;
|
|
33 struct GUIButton *pButton_RestUI_WaitUntilDawn;
|
|
34 struct GUIButton *pButton_RestUI_Wait1Hour;
|
|
35
|
|
36
|
|
37 struct GUIButton *pCharacterScreen_ExitBtn;
|
|
38 struct GUIButton *pCharacterScreen_AwardsBtn;
|
|
39 struct GUIButton *pCharacterScreen_InventoryBtn;
|
|
40 struct GUIButton *pCharacterScreen_SkillsBtn;
|
|
41 struct GUIButton *pCharacterScreen_StatsBtn;
|
|
42 struct GUIButton *pCharacterScreen_DollBtn;
|
|
43 struct GUIButton *pCharacterScreen_DetalizBtn;
|
|
44
|
|
45
|
|
46 struct GUIButton *pBtn_NPCRight;
|
|
47 struct GUIButton *pBtn_NPCLeft;
|
|
48 struct GUIButton *pBtn_GameSettings;
|
|
49 struct GUIButton *pBtn_QuickReference;
|
|
50 struct GUIButton *pBtn_CastSpell;
|
|
51 struct GUIButton *pBtn_Rest;
|
|
52 struct GUIButton *pBtn_History;
|
|
53 struct GUIButton *pBtn_Calendar;
|
|
54 struct GUIButton *pBtn_Maps;
|
|
55 struct GUIButton *pBtn_Autonotes;
|
|
56 struct GUIButton *pBtn_Quests;
|
|
57
|
|
58
|
|
59 struct GUIButton *pMainMenu_BtnExit;
|
|
60 struct GUIButton *pMainMenu_BtnCredits;
|
|
61 struct GUIButton *pMainMenu_BtnLoad;
|
|
62 struct GUIButton *pMainMenu_BtnNew;
|
|
63
|
|
64
|
|
65 struct GUIButton *pBtn_Up;
|
|
66 struct GUIButton *pBtn_Down;
|
|
67 struct GUIButton *ptr_507BA4;
|
|
68
|
|
69
|
|
70 struct GUIWindow *pPrimaryWindow;
|
|
71 struct GUIWindow *pChestWindow;
|
|
72 struct GUIWindow *pDialogueWindow;
|
336
|
73 struct GUIWindow *window_SpeakInHouse;
|
0
|
74 struct GUIWindow *pGUIWindow_ScrollWindow;
|
|
75 struct GUIWindow *ptr_507BC8;
|
|
76 struct GUIWindow *pGUIWindow_CurrentMenu;
|
|
77 struct GUIWindow *ptr_507BD0;
|
|
78 struct GUIWindow *pGUIWindow_Settings;
|
|
79 struct GUIWindow *ptr_507BDC;
|
|
80 struct GUIWindow *pGUIWindow_EscMessageWindow;
|
|
81 struct GUIWindow *pBooksWindow;
|
|
82 struct GUIWindow *pGUIWindow2;
|
|
83
|
|
84
|
|
85 struct GUIButton *pBtn_Resume;
|
|
86 struct GUIButton *pBtn_QuitGame;
|
|
87 struct GUIButton *pBtn_GameControls;
|
|
88 struct GUIButton *pBtn_LoadGame;
|
|
89 struct GUIButton *pBtn_SaveGame;
|
|
90 struct GUIButton *pBtn_NewGame;
|
|
91
|
|
92 struct GUIButton *pBtn_SliderRight;
|
|
93 struct GUIButton *pBtn_SliderLeft;
|
|
94
|
|
95
|
2
|
96 struct GUIButton *pBtnDownArrow;
|
|
97 struct GUIButton *pBtnArrowUp;
|
|
98 struct GUIButton *pBtnCancel;
|
|
99 struct GUIButton *pBtnLoadSlot;
|
0
|
100
|
|
101
|
1202
|
102 std::array<GUIButton*, 4> pCreationUI_BtnPressRight2;
|
|
103 std::array<GUIButton*, 4> pCreationUI_BtnPressLeft2;
|
|
104 std::array<GUIButton*, 4> pCreationUI_BtnPressLeft;
|
|
105 std::array<GUIButton*, 4> pCreationUI_BtnPressRight;
|
0
|
106
|
|
107
|
|
108
|
|
109
|
|
110
|
|
111
|
|
112 //----- (0041D0D8) --------------------------------------------------------
|
697
|
113 void GUIButton::Release()
|
0
|
114 {
|
|
115 GUIWindow *v1; // eax@2
|
|
116 GUIButton *v2; // edx@2
|
|
117 GUIButton *v3; // eax@6
|
697
|
118 GUIButton *ptr;
|
0
|
119
|
697
|
120 ptr=this;
|
0
|
121 if ( ptr )
|
|
122 {
|
|
123 v1 = ptr->pParent;
|
|
124 v2 = ptr->pNext;
|
|
125 if ( ptr == v1->pControlsHead )
|
|
126 {
|
|
127 if ( v2 )
|
|
128 {
|
|
129 v1->pControlsHead = v2;
|
|
130 ptr->pNext->pPrev = 0;
|
|
131 }
|
|
132 else
|
|
133 {
|
|
134 v1->pControlsHead = 0;
|
|
135 ptr->pParent->pControlsTail = 0;
|
|
136 }
|
|
137 }
|
|
138 else
|
|
139 {
|
|
140 v3 = ptr->pPrev;
|
|
141 if ( v2 )
|
|
142 {
|
|
143 v3->pNext = v2;
|
|
144 ptr->pNext->pPrev = v3;
|
|
145 }
|
|
146 else
|
|
147 {
|
|
148 v3->pNext = 0;
|
|
149 ptr->pParent->pControlsTail = v3;
|
|
150 }
|
|
151 }
|
|
152 --ptr->pParent->uNumControls;
|
|
153 }
|
|
154 }
|
|
155
|
|
156
|
|
157 //----- (00415180) --------------------------------------------------------
|
1006
|
158 void GUIButton::DrawLabel( const char *label_text, struct GUIFont *pFont, int a5, int uFontShadowColor )
|
|
159 {
|
0
|
160 const char *v5; // ebx@1
|
|
161 GUIButton *v6; // esi@1
|
|
162 int v7; // eax@1
|
|
163
|
1006
|
164 v5 = label_text;
|
0
|
165 v6 = this;
|
|
166 //strlen(edx0);
|
1006
|
167 v7 = pFont->GetLineWidth(label_text);
|
0
|
168 return pParent->DrawText(
|
|
169 pFont,
|
|
170 v6->uX + (signed int)(v6->uWidth - v7) / 2,
|
1006
|
171 v6->uY + (signed int)(v6->uHeight - pFont->uFontHeight) / 2,
|
0
|
172 a5,
|
1006
|
173 label_text,
|
0
|
174 0,
|
|
175 0,
|
1006
|
176 uFontShadowColor);
|
0
|
177 }
|
1295
|
178 //----- (004B36CC) --------------------------------------------------------
|
|
179 void CreateButtonInColumn( int column_pos, unsigned int control_id )
|
|
180 {
|
|
181 pDialogueWindow->CreateButton( 480, 30 * column_pos + 146, 140, 30, 1, 0, UIMSG_SelectShopDialogueOption, control_id, 0, "", 0);
|
|
182 } |