Mercurial > mm7
annotate GUI/UI/UISaveLoad.cpp @ 2547:fed97f15d1e1
* SaveLoad
* QuickReference
* Modal
* Character
author | a.parshin |
---|---|
date | Tue, 12 May 2015 01:45:31 +0200 |
parents | c674d547cc7c |
children | d87bfbd3bb3b |
rev | line source |
---|---|
2501 | 1 #define _CRTDBG_MAP_ALLOC |
2547 | 2 #define _CRT_SECURE_NO_WARNINGS |
2501 | 3 #include <stdlib.h> |
4 #include <crtdbg.h> | |
5 #include <io.h> | |
6 | |
2541 | 7 #include "Engine/Engine.h" |
2547 | 8 #include "Engine/MapInfo.h" |
9 #include "Engine/Graphics/Render.h" | |
10 #include "Engine/LOD.h" | |
11 #include "Engine/SaveLoad.h" | |
12 #include "Engine/texts.h" | |
2501 | 13 |
2547 | 14 #include "IO/Keyboard.h" |
15 | |
16 #include "GUI/GUIFont.h" | |
17 #include "GUI/UI/UISaveLoad.h" | |
2501 | 18 |
2544
c674d547cc7c
GUIWindow switch logic refactored into behaviour classes
a.parshin
parents:
2541
diff
changeset
|
19 #include "Game/MainMenu.h" |
c674d547cc7c
GUIWindow switch logic refactored into behaviour classes
a.parshin
parents:
2541
diff
changeset
|
20 |
2547 | 21 void UI_DrawSaveLoad(bool save); |
22 | |
23 | |
24 GUIWindow_Save::GUIWindow_Save() : | |
25 GUIWindow(0, 0, window->GetWidth(), window->GetHeight(), 0, nullptr) | |
26 { | |
27 // ------------------------------------------------ | |
28 // 0045E93E SaveUI_Load(enum CURRENT_SCREEN screen) | |
29 char *v3; // eax@7 | |
30 LODWriteableFile pLODFile; // [sp+1Ch] [bp-248h]@1 | |
31 | |
32 ++pIcons_LOD->uTexturePacksCount; | |
33 if (!pIcons_LOD->uNumPrevLoadedFiles) | |
34 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; | |
35 memset(&pSavegameUsedSlots, 0, sizeof(pSavegameUsedSlots)); | |
36 memset(&pSavegameThumbnails, 0, sizeof(pSavegameThumbnails)); | |
37 uTextureID_loadsave = pIcons_LOD->LoadTexture("loadsave", TEXTURE_16BIT_PALETTE); | |
38 uTextureID_load_up = pIcons_LOD->LoadTexture("load_up", TEXTURE_16BIT_PALETTE); | |
39 uTextureID_save_up = pIcons_LOD->LoadTexture("save_up", TEXTURE_16BIT_PALETTE); | |
40 uTextureID_LS_loadU = pIcons_LOD->LoadTexture("LS_loadU", TEXTURE_16BIT_PALETTE); | |
41 uTextureID_LS_saveU = pIcons_LOD->LoadTexture("LS_saveU", TEXTURE_16BIT_PALETTE); | |
42 uTextureID_x_u = pIcons_LOD->LoadTexture("x_u", TEXTURE_16BIT_PALETTE); | |
43 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_loadsave)); | |
44 | |
45 //if (screen == SCREEN_SAVEGAME) | |
46 { | |
47 pRenderer->DrawTextureIndexed(241, 302, pIcons_LOD->GetTexture(uTextureID_LS_saveU)); | |
48 pRenderer->DrawTextureIndexed(351, 302, pIcons_LOD->GetTexture(uTextureID_x_u)); | |
49 pRenderer->DrawTextureIndexed(18, 141, pIcons_LOD->GetTexture(uTextureID_save_up)); | |
50 } | |
51 /*else | |
52 { | |
53 pRenderer->DrawTextureIndexed(241, 302, pIcons_LOD->GetTexture(uTextureID_LS_loadU)); | |
54 pRenderer->DrawTextureIndexed(351, 302, pIcons_LOD->GetTexture(uTextureID_x_u)); | |
55 pRenderer->DrawTextureIndexed(18, 141, pIcons_LOD->GetTexture(uTextureID_load_up)); | |
56 }*/ | |
57 | |
58 //pGUIWindow_CurrentMenu->DrawText(pFontSmallnum, 25, 199, 0, pGlobalTXT_LocalizationStrings[505], 0, 0, 0);//Read...(Чтение...) | |
59 pRenderer->Present(); | |
60 pSavegameList->Initialize(1); | |
61 pLODFile.AllocSubIndicesAndIO(300, 0); | |
62 for (uint i = 0; i < 40; ++i) | |
63 { | |
64 v3 = pSavegameList->pFileList[i].pSaveFileName; | |
65 if (!*pSavegameList->pFileList[i].pSaveFileName) | |
66 v3 = "1.mm7"; | |
67 sprintf(pTmpBuf.data(), "saves\\%s", v3); | |
68 if (_access(pTmpBuf.data(), 0) || _access(pTmpBuf.data(), 6)) | |
69 { | |
70 pSavegameUsedSlots[i] = 0; | |
71 strcpy(pSavegameHeader[i].pName, pGlobalTXT_LocalizationStrings[LOCSTR_EMPTY]); | |
72 } | |
73 else | |
74 { | |
75 pLODFile.LoadFile(pTmpBuf.data(), 1); | |
76 fread(&pSavegameHeader[i], 100, 1, pLODFile.FindContainer("header.bin", 1)); | |
77 if (pLODFile.FindContainer("image.pcx", 1)) | |
78 { | |
79 pSavegameThumbnails[i].LoadFromFILE(pLODFile.FindContainer("image.pcx", 1), 0, 1); | |
80 pLODFile.CloseWriteFile(); | |
81 pSavegameUsedSlots[i] = 1; | |
82 } | |
83 else | |
84 pSavegameUsedSlots[i] = 0; | |
85 } | |
86 } | |
87 pLODFile.FreeSubIndexAndIO(); | |
88 uTextureID_x_d = pIcons_LOD->LoadTexture("x_d", TEXTURE_16BIT_PALETTE); | |
89 uTextureID_LS_ = pIcons_LOD->LoadTexture("LS_saveD", TEXTURE_16BIT_PALETTE); | |
90 uTextureID_AR_UP_DN = pIcons_LOD->LoadTexture("AR_UP_DN", TEXTURE_16BIT_PALETTE); | |
91 uTextureID_AR_DN_DN = pIcons_LOD->LoadTexture("AR_DN_DN", TEXTURE_16BIT_PALETTE); | |
92 | |
93 // ----------------------------- | |
94 // GUIWindow_Save c-tor --- part | |
95 CreateButton(21, 198, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 0, 0, "", 0); | |
96 CreateButton(21, 218, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 1, 0, "", 0); | |
97 CreateButton(21, 238, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 2, 0, "", 0); | |
98 CreateButton(21, 258, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 3, 0, "", 0); | |
99 CreateButton(21, 278, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 4, 0, "", 0); | |
100 CreateButton(21, 298, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 5, 0, "", 0); | |
101 CreateButton(21, 318, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 6, 0, "", 0); | |
102 pBtnLoadSlot = CreateButton(241, 302, 105, 40, 1, 0, UIMSG_SaveLoadBtn, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_LS_), 0); | |
103 pBtnCancel = CreateButton(350, 302, 105, 40, 1, 0, UIMSG_Cancel, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_x_d), 0); | |
104 pBtnArrowUp = CreateButton(215, 199, 17, 17, 1, 0, UIMSG_ArrowUp, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_AR_UP_DN), 0); | |
105 pBtnDownArrow = CreateButton(215, 323, 17, 17, 1, 0, UIMSG_DownArrow, 34, 0, "", pIcons_LOD->GetTexture(uTextureID_AR_DN_DN), 0); | |
106 } | |
107 | |
108 | |
109 void GUIWindow_Save::Update() | |
110 { | |
111 // ----------------------------------- | |
112 // 004156F0 GUI_UpdateWindows --- part | |
113 // { | |
114 // SaveUI_Draw(); | |
115 // } | |
116 | |
117 // ----- (004606FE) -------------------------------------------------------- | |
118 // void SaveUI_Draw() | |
119 // { | |
120 UI_DrawSaveLoad(true); | |
121 } | |
122 | |
123 | |
124 | |
125 | |
126 GUIWindow_Load::GUIWindow_Load(bool ingame) : | |
127 GUIWindow(0, 0, 0, 0, 0, nullptr) | |
128 { | |
129 // ----- (0045E361) -------------------------------------------------------- | |
130 // void LoadUI_Load(unsigned int uDialogueType) | |
131 // { | |
132 current_screen_type = SCREEN_LOADGAME; | |
133 | |
134 LODWriteableFile pLODFile; // [sp+1Ch] [bp-248h]@1 | |
135 | |
136 dword_6BE138 = -1; | |
137 pIcons_LOD->_inlined_sub2(); | |
138 | |
139 memset(pSavegameUsedSlots.data(), 0, sizeof(pSavegameUsedSlots)); | |
140 memset(pSavegameThumbnails.data(), 0, 45 * sizeof(RGBTexture)); | |
141 uTextureID_loadsave = pIcons_LOD->LoadTexture("loadsave", TEXTURE_16BIT_PALETTE); | |
142 uTextureID_load_up = pIcons_LOD->LoadTexture("load_up", TEXTURE_16BIT_PALETTE); | |
143 uTextureID_save_up = pIcons_LOD->LoadTexture("save_up", TEXTURE_16BIT_PALETTE); | |
144 uTextureID_LS_loadU = pIcons_LOD->LoadTexture("LS_loadU", TEXTURE_16BIT_PALETTE); | |
145 uTextureID_LS_saveU = pIcons_LOD->LoadTexture("LS_saveU", TEXTURE_16BIT_PALETTE); | |
146 uTextureID_x_u = pIcons_LOD->LoadTexture("x_u", TEXTURE_16BIT_PALETTE); | |
147 if (ingame) | |
148 { | |
149 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_loadsave)); | |
150 if (current_screen_type == SCREEN_SAVEGAME) | |
151 { | |
152 pRenderer->DrawTextureIndexed(241, 302, pIcons_LOD->GetTexture(uTextureID_LS_saveU)); | |
153 pRenderer->DrawTextureIndexed(18, 141, pIcons_LOD->GetTexture(uTextureID_save_up)); | |
154 } | |
155 else | |
156 { | |
157 pRenderer->DrawTextureIndexed(241, 302, pIcons_LOD->GetTexture(uTextureID_LS_loadU)); | |
158 pRenderer->DrawTextureIndexed(18, 141, pIcons_LOD->GetTexture(uTextureID_load_up)); | |
159 } | |
160 pRenderer->DrawTextureIndexed(351, 302, pIcons_LOD->GetTexture(uTextureID_x_u)); | |
161 } | |
162 else | |
163 pRenderer->DrawTextureNew(0, 0, &main_menu_background); | |
164 | |
165 | |
166 /*pGUIWindow_CurrentMenu = new GUIWindow_Load( | |
167 saveload_dlg_xs[uDialogueType], | |
168 saveload_dlg_ys[uDialogueType], | |
169 saveload_dlg_zs[uDialogueType], | |
170 saveload_dlg_ws[uDialogueType], 0, 0);*/ | |
171 | |
172 // GUIWindow::GUIWindow | |
173 this->uFrameX = saveload_dlg_xs[ingame ? 1 : 0]; | |
174 this->uFrameY = saveload_dlg_ys[ingame ? 1 : 0]; | |
175 this->uFrameWidth = saveload_dlg_zs[ingame ? 1 : 0]; | |
176 this->uFrameHeight = saveload_dlg_ws[ingame ? 1 : 0]; | |
177 this->uFrameZ = uFrameX + uFrameWidth - 1; | |
178 this->uFrameW = uFrameY + uFrameHeight - 1; | |
179 | |
180 | |
181 | |
182 DrawText(pFontSmallnum, 25, 199, 0, pGlobalTXT_LocalizationStrings[505], 0, 0, 0);// "Reading..." | |
183 pRenderer->Present(); | |
184 pSavegameList->Initialize(0); | |
185 if (pSaveListPosition > (signed int)uNumSavegameFiles) | |
186 { | |
187 pSaveListPosition = 0; | |
188 uLoadGameUI_SelectedSlot = 0; | |
189 } | |
190 pLODFile.AllocSubIndicesAndIO(300, 0); | |
191 Assert(sizeof(SavegameHeader) == 100); | |
192 for (uint i = 0; i < uNumSavegameFiles; ++i) | |
193 { | |
194 sprintf(pTmpBuf.data(), "saves\\%s", pSavegameList->pFileList[i].pSaveFileName); | |
195 if (_access(pTmpBuf.data(), 6)) | |
196 { | |
197 pSavegameUsedSlots[i] = 0; | |
198 strcpy(pSavegameHeader[i].pName, pGlobalTXT_LocalizationStrings[72]); // "Empty" | |
199 continue; | |
200 } | |
201 pLODFile.LoadFile(pTmpBuf.data(), 1); | |
202 if (pLODFile.FindContainer("header.bin", true)) | |
203 fread(&pSavegameHeader[i], 100, 1, pLODFile.FindContainer("header.bin", true)); | |
204 if (!_stricmp(pSavegameList->pFileList[i].pSaveFileName, pGlobalTXT_LocalizationStrings[613]))// "AutoSave.MM7" | |
205 strcpy(pSavegameHeader[i].pName, pGlobalTXT_LocalizationStrings[16]);// "Autosave" | |
206 if (!pLODFile.FindContainer("image.pcx", true)) | |
207 { | |
208 pSavegameUsedSlots[i] = 0; | |
209 strcpy(pSavegameList->pFileList[i].pSaveFileName, ""); | |
210 } | |
211 else | |
212 { | |
213 pSavegameThumbnails[i].LoadFromFILE(pLODFile.FindContainer("image.pcx", true), 0, true); | |
214 pLODFile.CloseWriteFile(); | |
215 pSavegameUsedSlots[i] = 1; | |
216 } | |
217 } | |
218 | |
219 pLODFile.FreeSubIndexAndIO(); | |
220 if (current_screen_type == SCREEN_SAVEGAME) | |
221 { | |
222 uTextureID_x_d = pIcons_LOD->LoadTexture("x_d", TEXTURE_16BIT_PALETTE); | |
223 uTextureID_LS_ = pIcons_LOD->LoadTexture("LS_saveD", TEXTURE_16BIT_PALETTE); | |
224 } | |
225 else | |
226 { | |
227 uTextureID_x_d = pIcons_LOD->LoadTexture("x_d", TEXTURE_16BIT_PALETTE); | |
228 uTextureID_LS_ = pIcons_LOD->LoadTexture("LS_loadD", TEXTURE_16BIT_PALETTE); | |
229 } | |
230 uTextureID_AR_UP_DN = pIcons_LOD->LoadTexture("AR_UP_DN", TEXTURE_16BIT_PALETTE); | |
231 uTextureID_AR_DN_DN = pIcons_LOD->LoadTexture("AR_DN_DN", TEXTURE_16BIT_PALETTE); | |
232 CreateButton(21, 198, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 0, 0, "", 0); | |
233 CreateButton(21, 219, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 1, 0, "", 0); | |
234 CreateButton(21, 240, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 2, 0, "", 0); | |
235 CreateButton(21, 261, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 3, 0, "", 0); | |
236 CreateButton(21, 282, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 4, 0, "", 0); | |
237 CreateButton(21, 303, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 5, 0, "", 0); | |
238 CreateButton(21, 324, 191, 18, 1, 0, UIMSG_SelectLoadSlot, 6, 0, "", 0); | |
239 pBtnLoadSlot = CreateButton(241, 302, 105, 40, 1, 0, UIMSG_SaveLoadBtn, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_LS_), 0); | |
240 pBtnCancel = CreateButton(350, 302, 105, 40, 1, 0, UIMSG_Cancel, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_x_d), 0); | |
241 pBtnArrowUp = CreateButton(215, 199, 17, 17, 1, 0, UIMSG_ArrowUp, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_AR_UP_DN), 0); | |
242 pBtnDownArrow = CreateButton(215, 323, 17, 17, 1, 0, UIMSG_DownArrow, uNumSavegameFiles, 0, "", pIcons_LOD->GetTexture(uTextureID_AR_DN_DN), 0); | |
243 } | |
244 | |
245 | |
246 void GUIWindow_Load::Update() | |
247 { | |
248 // ----------------------------------- | |
249 // 004156F0 GUI_UpdateWindows --- part | |
250 // { | |
251 // LoadUI_Draw(); | |
252 // } | |
253 | |
254 // ----- (004606F7) -------------------------------------------------------- | |
255 // void LoadUI_Draw() | |
256 // { | |
257 UI_DrawSaveLoad(false); | |
258 } | |
259 | |
2501 | 260 |
261 //----- (004601B7) -------------------------------------------------------- | |
262 static void UI_DrawSaveLoad(bool save) | |
263 { | |
264 // const char *pSlotName; // edi@36 | |
265 GUIWindow save_load_window; // [sp+Ch] [bp-78h]@8 | |
266 unsigned int pSaveFiles; // [sp+70h] [bp-14h]@10 | |
267 unsigned __int64 full_hours; | |
268 unsigned __int64 full_days; | |
269 int full_weeks; | |
270 int full_month; | |
271 int current_year; | |
272 int current_month; | |
273 int current_day; | |
274 int current_hour; | |
275 int current_minutes; | |
276 | |
277 pRenderer->BeginScene(); | |
278 if ( GetCurrentMenuID() != MENU_SAVELOAD && GetCurrentMenuID() != MENU_LoadingProcInMainMenu ) | |
279 { | |
280 pRenderer->DrawTextureIndexed(8, 8, pIcons_LOD->GetTexture(uTextureID_loadsave)); | |
281 if (save) | |
282 { | |
283 pRenderer->DrawTextureIndexed(241, 302, pIcons_LOD->GetTexture(uTextureID_LS_saveU)); | |
284 pRenderer->DrawTextureIndexed( 18, 139, pIcons_LOD->GetTexture(uTextureID_save_up)); | |
285 } | |
286 else | |
287 { | |
288 pRenderer->DrawTextureIndexed(241, 302, pIcons_LOD->GetTexture(uTextureID_LS_loadU)); | |
289 pRenderer->DrawTextureIndexed( 18, 139, pIcons_LOD->GetTexture(uTextureID_load_up)); | |
290 } | |
291 pRenderer->DrawTextureIndexed(351, 302, pIcons_LOD->GetTexture(uTextureID_x_u)); | |
292 } | |
293 if ( pSavegameUsedSlots[uLoadGameUI_SelectedSlot] ) | |
294 { | |
295 memset(&save_load_window, 0, 0x54); | |
296 save_load_window.uFrameX = pGUIWindow_CurrentMenu->uFrameX + 240; | |
297 save_load_window.uFrameWidth = 220; | |
298 save_load_window.uFrameY = (pGUIWindow_CurrentMenu->uFrameY - pFontSmallnum->uFontHeight) + 157; | |
299 save_load_window.uFrameZ = save_load_window.uFrameX + 219; | |
300 save_load_window.uFrameHeight = pFontSmallnum->uFontHeight; | |
301 save_load_window.uFrameW = pFontSmallnum->uFontHeight + save_load_window.uFrameY - 1; | |
302 if ( pSavegameThumbnails[uLoadGameUI_SelectedSlot].pPixels ) | |
303 pRenderer->DrawTextureRGB(pGUIWindow_CurrentMenu->uFrameX + 276, pGUIWindow_CurrentMenu->uFrameY + 171, &pSavegameThumbnails[uLoadGameUI_SelectedSlot]); | |
304 //Draw map name | |
305 save_load_window.DrawTitleText(pFontSmallnum, 0, 0, 0, pMapStats->pInfos[pMapStats->GetMapInfo(pSavegameHeader[uLoadGameUI_SelectedSlot].pLocationName)].pName, 3); | |
306 //Draw date | |
307 full_hours = ((signed __int64)(pSavegameHeader[uLoadGameUI_SelectedSlot].uWordTime * 0.234375) / 60) / 60i64; | |
308 full_days = (unsigned int)full_hours / 24; | |
309 full_weeks = (unsigned int)(full_days / 7); | |
310 full_month = (unsigned int)full_weeks / 4; | |
311 current_year = (full_month / 12) + game_starting_year; | |
312 current_month = full_month % 12; | |
313 current_day = full_days % 28; | |
314 current_hour = full_hours % 24; | |
315 current_minutes = (((signed __int64)(pSavegameHeader[uLoadGameUI_SelectedSlot].uWordTime * 0.234375) / 60) % 60i64); | |
316 | |
317 save_load_window.uFrameY = pGUIWindow_CurrentMenu->uFrameY + 261; | |
318 int am; | |
319 if ( (signed int)current_hour >= 12 ) | |
320 { | |
321 current_hour -= 12; | |
322 if ( !current_hour ) | |
323 current_hour = 12; | |
324 am = 1; | |
325 } | |
326 else | |
327 am = 0; | |
328 const char* day = aDayNames[full_days % 7]; | |
329 const char* ampm = aAMPMNames[am]; | |
330 const char* month = aMonthNames[current_month]; | |
331 | |
332 sprintfex(pTmpBuf.data(), "%s %d:%02d %s\n%d %s %d", day, current_hour, current_minutes, aAMPMNames[am], current_day + 1, month, current_year); | |
333 save_load_window.DrawTitleText(pFontSmallnum, 0, 0, 0, pTmpBuf.data(), 3); | |
334 } | |
335 if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 == WINDOW_INPUT_CONFIRMED) | |
336 { | |
337 pGUIWindow_CurrentMenu->receives_keyboard_input_2 = WINDOW_INPUT_NONE; | |
338 strcpy((char *)&pSavegameHeader + 100 * uLoadGameUI_SelectedSlot, pKeyActionMap->pPressedKeysBuffer); | |
339 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_SaveGame, 0, 0); | |
340 } | |
341 else | |
342 { | |
343 if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 == WINDOW_INPUT_CANCELLED) | |
344 pGUIWindow_CurrentMenu->receives_keyboard_input_2 = WINDOW_INPUT_NONE; | |
345 } | |
346 if (GetCurrentMenuID() == MENU_LoadingProcInMainMenu) | |
347 { | |
348 pGUIWindow_CurrentMenu->DrawText(pFontSmallnum, pFontSmallnum->AlignText_Center(186, pGlobalTXT_LocalizationStrings[135]) + 25, | |
349 220, 0, pGlobalTXT_LocalizationStrings[135], 0, 0, 0);//Загрузка | |
350 pGUIWindow_CurrentMenu->DrawTextInRect(pFontSmallnum, pFontSmallnum->AlignText_Center(186, | |
351 pSavegameHeader[uLoadGameUI_SelectedSlot].pName) + 25, 0x106, 0, pSavegameHeader[uLoadGameUI_SelectedSlot].pName, 185, 0); | |
352 pGUIWindow_CurrentMenu->DrawText(pFontSmallnum, pFontSmallnum->AlignText_Center(186, pGlobalTXT_LocalizationStrings[165]) + 25, | |
353 304, 0, pGlobalTXT_LocalizationStrings[165], 0, 0, 0);//"Пожалуйста, пожождите" | |
354 } | |
355 else | |
356 { | |
357 if ( save ) | |
358 pSaveFiles = 40; | |
359 else | |
360 pSaveFiles = uNumSavegameFiles; | |
361 | |
362 int slot_Y = 199; | |
363 for ( uint i = pSaveListPosition; i < pSaveFiles; ++i ) | |
364 { | |
365 if ( slot_Y >= 346 ) | |
366 break; | |
367 if ( pGUIWindow_CurrentMenu->receives_keyboard_input_2 != WINDOW_INPUT_IN_PROGRESS || i != uLoadGameUI_SelectedSlot ) | |
368 pGUIWindow_CurrentMenu->DrawTextInRect(pFontSmallnum, 27, slot_Y, i == uLoadGameUI_SelectedSlot ? Color16(0xFF, 0xFF, 0x64) : 0, pSavegameHeader[i].pName, 185, 0); | |
369 else | |
370 pGUIWindow_CurrentMenu->DrawFlashingInputCursor(pGUIWindow_CurrentMenu->DrawTextInRect(pFontSmallnum, 27, slot_Y, i == uLoadGameUI_SelectedSlot ? Color16(0xFF, 0xFF, 0x64) : 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 175, 1) + 27, | |
371 slot_Y, pFontSmallnum); | |
372 slot_Y += 21; | |
373 } | |
374 } | |
375 pRenderer->EndScene(); | |
376 } |