diff GUIWindow.cpp @ 1402:a519a6a412d0

CloseSpellBook and close SpellBookPage
author Ritor1
date Fri, 19 Jul 2013 17:21:40 +0600
parents 8ea496564034
children 7cc3b01a92ac
line wrap: on
line diff
--- a/GUIWindow.cpp	Fri Jul 19 12:50:44 2013 +0600
+++ b/GUIWindow.cpp	Fri Jul 19 17:21:40 2013 +0600
@@ -326,17 +326,17 @@
 		}
 	case WINDOW_SpellBook:
 		{
-		sub_41140B();
-		sub_411473();
+		OnCloseSpellBookPage();
+		OnCloseSpellBook();
 		break;
 		}
 	case WINDOW_Book:
 		{
-		OnCloseSpellBook();
+		OnCloseBook();
 		break;
 		}
-	case WINDOW_ChangeLocation:
-		{
+      case WINDOW_ChangeLocation:
+      {
         pTexture_outside->Release();
         pTexture_Dialogue_Background->Release();
         pIcons_LOD->SyncLoadedFilesCount();
@@ -874,8 +874,8 @@
       //v4 = (12 * pPlayer->lastOpenedSpellbookPage + pSpellbookSpellIndices[pPlayer->lastOpenedSpellbookPage][i + 1]);
       CreateButton(pViewport->uViewportTL_X +  pIconPos[v4][pSpellbookSpellIndices[v4][i+1]].Xpos,
                    pViewport->uViewportTL_Y +  pIconPos[v4][pSpellbookSpellIndices[v4][i+1]].Ypos,  //dword_4E20D0
-                   dword_506408[i + 1]->uTextureWidth,
-                   dword_506408[i + 1]->uTextureHeight,
+                   SBPageSSpellsTextureList[i + 1]->uTextureWidth,
+                   SBPageSSpellsTextureList[i + 1]->uTextureHeight,
                    1, 79, UIMSG_SelectSpell, i, 0, "", 0);
       ++a2;
     //++v3;
@@ -896,10 +896,10 @@
   if (pPlayer->pActiveSkills[PLAYER_SKILL_LIGHT])  CreateButton(400, 271, 50, 36, 1, 0, UIMSG_OpenSpellbookPage, 7, 0, aSpellSchoolNames[7], 0);
   if (pPlayer->pActiveSkills[PLAYER_SKILL_DARK])   CreateButton(400, 307, 50, 36, 1, 0, UIMSG_OpenSpellbookPage, 8, 0, aSpellSchoolNames[8], 0);
 
-                            CreateButton(476, 450, pTexture_506444->uTextureWidth, pTexture_506444->uTextureHeight, 1, 78, UIMSG_ClickInstallRemoveQuickSpellBtn,     0, 0, "", 0);
-  pBtn_InstallRemoveSpell = CreateButton(476, 450, 48,                             32,                              1, 78, UIMSG_ClickInstallRemoveQuickSpellBtn,     0, 0, "", pTexture_506444, 0);
-                            CreateButton(561, 450, ptr_506440->uTextureWidth,      ptr_506440->uTextureHeight,      1,  0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[79], 0);
-  pBtn_CloseBook          = CreateButton(561, 450, 48,                             32,                              1,  0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[79], ptr_506440, 0);
+                            CreateButton(476, 450, pSBClickQuickSpellBtnTextr->uTextureWidth, pSBClickQuickSpellBtnTextr->uTextureHeight, 1, 78, UIMSG_ClickInstallRemoveQuickSpellBtn, 0, 0, "", 0);
+  pBtn_InstallRemoveSpell = CreateButton(476, 450, 48, 32, 1, 78, UIMSG_ClickInstallRemoveQuickSpellBtn, 0, 0, "", pSBClickQuickSpellBtnTextr, 0);
+                            CreateButton(561, 450, pSpellBookClickCloseBtnTextr->uTextureWidth, pSpellBookClickCloseBtnTextr->uTextureHeight, 1,  0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[79], 0);
+  pBtn_CloseBook          = CreateButton(561, 450, 48, 32, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[79], pSpellBookClickCloseBtnTextr, 0);
 }
 // 50640C: using guessed type int dword_50640C[];