comparison GUIWindow.cpp @ 151:9abdd40a107b

pCurrentScreen
author Ritor1
date Tue, 12 Feb 2013 15:28:08 +0600
parents 8b8fd4d83fdc
children f4ebd13c2a8e
comparison
equal deleted inserted replaced
150:d92c78ab54fe 151:9abdd40a107b
472 472
473 v1 = this; 473 v1 = this;
474 pAudioPlayer->StopChannels(-1, -1); 474 pAudioPlayer->StopChannels(-1, -1);
475 InitializeBookFonts(); 475 InitializeBookFonts();
476 v1->CreateButton(0x1DBu, 0x1BDu, 0x9Eu, 0x22u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[79], 0); 476 v1->CreateButton(0x1DBu, 0x1BDu, 0x9Eu, 0x22u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[79], 0);
477 pCurrentScreen = 3; 477 pCurrentScreen = SCREEN_BOOKS;
478 dword_506524 = 0; 478 dword_506524 = 0;
479 dword_506528 = 0; 479 dword_506528 = 0;
480 dword_50651C = 0; 480 dword_50651C = 0;
481 dword_506520 = 0; 481 dword_506520 = 0;
482 if ( v1->ptr_1C == (void *)177 ) 482 if ( v1->ptr_1C == (void *)177 )
1154 v11 = v19; 1154 v11 = v19;
1155 v10 = v9; 1155 v10 = v9;
1156 goto LABEL_56; 1156 goto LABEL_56;
1157 } 1157 }
1158 v4 = (char *)array_5913D8[6] - 1; 1158 v4 = (char *)array_5913D8[6] - 1;
1159 pRenderer->DrawTextureIndexed( 1159 pRenderer->DrawTextureIndexed(_4E5E50_transui_x - 4, _4E5EE0_transui_y - 4,
1160 _4E5E50_transui_x - 4,
1161 _4E5EE0_transui_y - 4,
1162 (Texture *)(uTextureID_50795C != -1 ? &pIcons_LOD->pTextures[uTextureID_50795C] : 0)); 1160 (Texture *)(uTextureID_50795C != -1 ? &pIcons_LOD->pTextures[uTextureID_50795C] : 0));
1163 pRenderer->DrawTextureIndexed(_4E5E50_transui_x, _4E5EE0_transui_y, pDialogueNPCPortraits[(signed int)v4]); 1161 pRenderer->DrawTextureIndexed(_4E5E50_transui_x, _4E5EE0_transui_y, pDialogueNPCPortraits[(signed int)v4]);
1164 if ( pCurrentScreen == 14 ) 1162 if ( pCurrentScreen == SCREEN_E )
1165 { 1163 {
1166 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); 1164 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1);
1167 goto LABEL_58; 1165 goto LABEL_58;
1168 } 1166 }
1169 if ( v4 || !dword_591080 ) 1167 if ( v4 || !dword_591080 )
1857 case WINDOW_Book: 1855 case WINDOW_Book:
1858 pWindow->InitializeBookView(); 1856 pWindow->InitializeBookView();
1859 break; 1857 break;
1860 case WINDOW_A: 1858 case WINDOW_A:
1861 pMainScreenNum = pCurrentScreen; 1859 pMainScreenNum = pCurrentScreen;
1862 pCurrentScreen = 4; 1860 pCurrentScreen = SCREEN_NPC_DIALOGUE;
1863 pBtn_ExitCancel = pWindow->CreateButton(0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[79], //"Exit" 1861 pBtn_ExitCancel = pWindow->CreateButton(0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[79], //"Exit"
1864 (Texture *)(uTextureID_506438 != -1 ? &pIcons_LOD->pTextures[uTextureID_506438] : 0), 0); 1862 (Texture *)(uTextureID_506438 != -1 ? &pIcons_LOD->pTextures[uTextureID_506438] : 0), 0);
1865 if ( pWindow->ptr_1C != (void *)1 ) 1863 if ( pWindow->ptr_1C != (void *)1 )
1866 { 1864 {
1867 a4a = 0; 1865 a4a = 0;
1955 pWindow->_41D08F(a4a, 1, 0, 1); 1953 pWindow->_41D08F(a4a, 1, 0, 1);
1956 } 1954 }
1957 break; 1955 break;
1958 case WINDOW_ChangeLocation: 1956 case WINDOW_ChangeLocation:
1959 pMainScreenNum = pCurrentScreen; 1957 pMainScreenNum = pCurrentScreen;
1960 pCurrentScreen = 17; 1958 pCurrentScreen = SCREEN_CHANGE_LOCATION;
1961 pBtn_ExitCancel = pWindow->CreateButton(0x236u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, 0x5Bu, 0, 0x4Eu, pGlobalTXT_LocalizationStrings[156],//Остаться в этой области 1959 pBtn_ExitCancel = pWindow->CreateButton(0x236u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, 0x5Bu, 0, 0x4Eu, pGlobalTXT_LocalizationStrings[156],//Остаться в этой области
1962 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), 0); 1960 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), 0);
1963 pBtn_YES = pWindow->CreateButton(0x1E6u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, 0x5Au, 0, 0x59u, pWindow->Hint, 1961 pBtn_YES = pWindow->CreateButton(0x1E6u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, 0x5Au, 0, 0x59u, pWindow->Hint,
1964 (Texture *)(uTextureID_BUTTYES2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTYES2] : 0), 0); 1962 (Texture *)(uTextureID_BUTTYES2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTYES2] : 0), 0);
1965 pWindow->CreateButton(_4E5E50_transui_x, _4E5EE0_transui_y, 0x3Fu, 0x49u, 1, 0, 0x5Au, 1u, 0x20u, pWindow->Hint, 0, 0, 0); 1963 pWindow->CreateButton(_4E5E50_transui_x, _4E5EE0_transui_y, 0x3Fu, 0x49u, 1, 0, 0x5Au, 1u, 0x20u, pWindow->Hint, 0, 0, 0);
1970 pWindow->OpenSpellBook(); 1968 pWindow->OpenSpellBook();
1971 break; 1969 break;
1972 case WINDOW_GreetingNPC: // окно приветствия НПС 1970 case WINDOW_GreetingNPC: // окно приветствия НПС
1973 pMainScreenNum = pCurrentScreen; 1971 pMainScreenNum = pCurrentScreen;
1974 pKeyActionMap->EnterText(0, 15, pWindow); 1972 pKeyActionMap->EnterText(0, 15, pWindow);
1975 pCurrentScreen = 19; 1973 pCurrentScreen = SCREEN_BRANCHLESS_NPC_DIALOG;
1976 break; 1974 break;
1977 } 1975 }
1978 return pWindow; 1976 return pWindow;
1979 } 1977 }
1980 //LABEL_62: 1978 //LABEL_62:
1985 pWindow->CreateButton(0, 0, 0, 0, 1, 0, 0xB0u, 0, 9u, "", 0); 1983 pWindow->CreateButton(0, 0, 0, 0, 1, 0, 0xB0u, 0, 9u, "", 0);
1986 return pWindow; 1984 return pWindow;
1987 } 1985 }
1988 if (eWindowType == WINDOW_HouseInterior) 1986 if (eWindowType == WINDOW_HouseInterior)
1989 { 1987 {
1990 pCurrentScreen = 13; 1988 pCurrentScreen = SCREEN_HOUSE;
1991 pBtn_ExitCancel = pWindow->CreateButton(0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[80],//Выйти из здания 1989 pBtn_ExitCancel = pWindow->CreateButton(0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[80],//Выйти из здания
1992 (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0), 0); 1990 (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0), 0);
1993 v25 = uNumDialogueNPCPortraits; 1991 v25 = uNumDialogueNPCPortraits;
1994 v26 = 0; 1992 v26 = 0;
1995 if ( uNumDialogueNPCPortraits > 0 ) 1993 if ( uNumDialogueNPCPortraits > 0 )
2030 else 2028 else
2031 { 2029 {
2032 if (eWindowType == WINDOW_1A) 2030 if (eWindowType == WINDOW_1A)
2033 { 2031 {
2034 pMainScreenNum = pCurrentScreen; 2032 pMainScreenNum = pCurrentScreen;
2035 pCurrentScreen = 18; 2033 pCurrentScreen = SCREEN_INPUT_BLV;
2036 pBtn_ExitCancel = pWindow->CreateButton(0x236u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, 0x19Cu, 0, 0x4Eu, pGlobalTXT_LocalizationStrings[34],//Отмена 2034 pBtn_ExitCancel = pWindow->CreateButton(0x236u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, 0x19Cu, 0, 0x4Eu, pGlobalTXT_LocalizationStrings[34],//Отмена
2037 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), 0); 2035 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), 0);
2038 pBtn_YES = pWindow->CreateButton(0x1E6u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, 0x19Bu, 0, 0x59u, pWindow->Hint, 2036 pBtn_YES = pWindow->CreateButton(0x1E6u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, 0x19Bu, 0, 0x59u, pWindow->Hint,
2039 (Texture *)(uTextureID_BUTTYES2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTYES2] : 0), 0); 2037 (Texture *)(uTextureID_BUTTYES2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTYES2] : 0), 0);
2040 pWindow->CreateButton(_4E5E50_transui_x, _4E5EE0_transui_y, 0x3Fu, 0x49u, 1, 0, 0x19Bu, 1, 0x20u, pWindow->Hint, 0); 2038 pWindow->CreateButton(_4E5E50_transui_x, _4E5EE0_transui_y, 0x3Fu, 0x49u, 1, 0, 0x19Bu, 1, 0x20u, pWindow->Hint, 0);
2065 pBtn_ExitCancel = pWindow->CreateButton(0x188u, 0x13Eu, 0x4Bu, 0x21u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[34],//Отмена 2063 pBtn_ExitCancel = pWindow->CreateButton(0x188u, 0x13Eu, 0x4Bu, 0x21u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[34],//Отмена
2066 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), 0); 2064 (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), 0);
2067 ShowStatusBarString(pGlobalTXT_LocalizationStrings[39], 2);//Выбрать цель 2065 ShowStatusBarString(pGlobalTXT_LocalizationStrings[39], 2);//Выбрать цель
2068 ++pIcons_LOD->uTexturePacksCount; 2066 ++pIcons_LOD->uTexturePacksCount;
2069 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103; 2067 pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103;
2070 pCurrentScreen = 23; 2068 pCurrentScreen = SCREEN_CASTING;
2071 if ( !pIcons_LOD->uNumPrevLoadedFiles ) 2069 if ( !pIcons_LOD->uNumPrevLoadedFiles )
2072 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; 2070 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
2073 } 2071 }
2074 } 2072 }
2075 return pWindow; 2073 return pWindow;