Mercurial > mm7
comparison GUI/GUIWindow.cpp @ 2545:e06a3fe9ad6e
TravelUI init logic moved to GUIWindow_Travel
TransitionUI init logic moved to GUIWindow_Transition
author | a.parshin |
---|---|
date | Mon, 11 May 2015 16:43:46 +0200 |
parents | c674d547cc7c |
children | 4087cbc62706 |
comparison
equal
deleted
inserted
replaced
2544:c674d547cc7c | 2545:e06a3fe9ad6e |
---|---|
213 } | 213 } |
214 _41D08F_set_keyboard_control_group(num_menu_buttons, 1, 0, 1); | 214 _41D08F_set_keyboard_control_group(num_menu_buttons, 1, 0, 1); |
215 } | 215 } |
216 } | 216 } |
217 | 217 |
218 GUIWindow_Travel::GUIWindow_Travel(unsigned int x, unsigned int y, unsigned int width, unsigned int height, int button, const char *hint) : | |
219 GUIWindow(x, y, width, height, button, hint) | |
220 { | |
221 prev_screen_type = current_screen_type; | |
222 current_screen_type = SCREEN_CHANGE_LOCATION; | |
223 pBtn_ExitCancel = CreateButton(566, 445, 75, 33, 1, 0, UIMSG_CHANGE_LOCATION_ClickCencelBtn, 0, 'N', pGlobalTXT_LocalizationStrings[156], pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0);// Stay in this area / Остаться в этой области | |
224 pBtn_YES = CreateButton(486, 445, 75, 33, 1, 0, UIMSG_OnTravelByFoot, 0, 'Y', hint, pIcons_LOD->GetTexture(uTextureID_BUTTYES2), 0); | |
225 CreateButton(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], 63, 73, 1, 0, UIMSG_OnTravelByFoot, 1, ' ', hint, 0, 0, 0); | |
226 CreateButton(8, 8, 460, 344, 1, 0, UIMSG_OnTravelByFoot, 1, 0, hint, 0); | |
227 } | |
228 | |
229 GUIWindow_Transition::GUIWindow_Transition(unsigned int x, unsigned int y, unsigned int width, unsigned int height, int button, const char *hint) : | |
230 GUIWindow(x, y, width, height, button, hint) | |
231 { | |
232 prev_screen_type = current_screen_type; | |
233 current_screen_type = SCREEN_INPUT_BLV; | |
234 pBtn_ExitCancel = CreateButton(0x236u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, UIMSG_TransitionWindowCloseBtn, 0, 'N', pGlobalTXT_LocalizationStrings[34], pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0); // Cancel / Отмена | |
235 pBtn_YES = CreateButton(0x1E6u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, UIMSG_TransitionUI_Confirm, 0, 'Y', hint, pIcons_LOD->GetTexture(uTextureID_BUTTYES2), 0); | |
236 CreateButton(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], 0x3Fu, 0x49u, 1, 0, UIMSG_TransitionUI_Confirm, 1, 0x20u, hint, 0); | |
237 CreateButton(8, 8, 0x1CCu, 0x158u, 1, 0, UIMSG_TransitionUI_Confirm, 1u, 0, hint, 0); | |
238 } | |
239 | 218 |
240 GUIWindow_Spellbook::GUIWindow_Spellbook(unsigned int x, unsigned int y, unsigned int width, unsigned int height, int button, const char *hint) : | 219 GUIWindow_Spellbook::GUIWindow_Spellbook(unsigned int x, unsigned int y, unsigned int width, unsigned int height, int button, const char *hint) : |
241 GUIWindow(x, y, width, height, button, hint) | 220 GUIWindow(x, y, width, height, button, hint) |
242 { | 221 { |
243 InitializeBookTextures(); | 222 InitializeBookTextures(); |
420 | 399 |
421 | 400 |
422 void GUIWindow_Book::Release() | 401 void GUIWindow_Book::Release() |
423 { | 402 { |
424 OnCloseBook(); | 403 OnCloseBook(); |
425 | |
426 GUIWindow::Release(); | |
427 } | |
428 | |
429 void GUIWindow_Travel::Release() | |
430 { | |
431 pTexture_outside->Release(); | |
432 pTexture_Dialogue_Background->Release(); | |
433 pIcons_LOD->SyncLoadedFilesCount(); | |
434 current_screen_type = prev_screen_type; | |
435 | |
436 GUIWindow::Release(); | |
437 } | |
438 | |
439 void GUIWindow_Transition::Release() | |
440 { | |
441 //pVideoPlayer->Unload(); | |
442 pTexture_outside->Release(); | |
443 pTexture_Dialogue_Background->Release(); | |
444 pIcons_LOD->SyncLoadedFilesCount(); | |
445 current_screen_type = prev_screen_type; | |
446 | 404 |
447 GUIWindow::Release(); | 405 GUIWindow::Release(); |
448 } | 406 } |
449 | 407 |
450 void GUIWindow_Dialogue::Release() | 408 void GUIWindow_Dialogue::Release() |
1670 void GUIWindow_CharacterRecord::Update() | 1628 void GUIWindow_CharacterRecord::Update() |
1671 { | 1629 { |
1672 CharacterUI_CharacterScreen_Draw(pPlayers[uActiveCharacter]); | 1630 CharacterUI_CharacterScreen_Draw(pPlayers[uActiveCharacter]); |
1673 } | 1631 } |
1674 | 1632 |
1675 void GUIWindow_Options::Update() | |
1676 { | |
1677 GameMenuUI_Options_Draw(); | |
1678 } | |
1679 | |
1680 void GUIWindow_KeymappingOptions::Update() | |
1681 { | |
1682 GameMenuUI_DrawKeyBindings(); | |
1683 } | |
1684 | |
1685 void GUIWindow_VideoOptions::Update() | |
1686 { | |
1687 GameMenuUI_DrawVideoOptions(); | |
1688 } | |
1689 | |
1690 void GUIWindow_Book::Update() | 1633 void GUIWindow_Book::Update() |
1691 { | 1634 { |
1692 BookUI_Draw((WindowType)(int)ptr_1C); | 1635 BookUI_Draw((WindowType)(int)ptr_1C); |
1693 } | 1636 } |
1694 | 1637 |
1700 } | 1643 } |
1701 | 1644 |
1702 void GUIWindow_QuickReference::Update() | 1645 void GUIWindow_QuickReference::Update() |
1703 { | 1646 { |
1704 GameUI_QuickRef_Draw(); | 1647 GameUI_QuickRef_Draw(); |
1705 } | |
1706 | |
1707 void GUIWindow_Rest::Update() | |
1708 { | |
1709 RestUI_Draw(); | |
1710 } | |
1711 | |
1712 void GUIWindow_Travel::Update() | |
1713 { | |
1714 TravelUI_Draw(); | |
1715 } | |
1716 | |
1717 void GUIWindow_Transition::Update() | |
1718 { | |
1719 TransitionUI_Draw(); | |
1720 } | 1648 } |
1721 | 1649 |
1722 void GUIWindow_Dialogue::Update() | 1650 void GUIWindow_Dialogue::Update() |
1723 { | 1651 { |
1724 GameUI_DrawDialogue(); | 1652 GameUI_DrawDialogue(); |
1809 } | 1737 } |
1810 | 1738 |
1811 void GUIWindow_Modal::Update() | 1739 void GUIWindow_Modal::Update() |
1812 { | 1740 { |
1813 ModalWindow_ShowHint(); | 1741 ModalWindow_ShowHint(); |
1814 } | |
1815 | |
1816 void GUIWindow_RestWindow::Update() | |
1817 { | |
1818 __debugbreak(); // doesnt seems to get here, check stack trace & conditions | |
1819 GUIButton GUIButton2; // [sp+28h] [bp-E0h]@133 | |
1820 memset(&GUIButton2, 0, sizeof(GUIButton2)); | |
1821 GUIButton2.uZ = 197; | |
1822 GUIButton2.uW = 197; | |
1823 GUIButton2.uX = 27; | |
1824 GUIButton2.uY = 161; | |
1825 GUIButton2.uWidth = 171; | |
1826 GUIButton2.uHeight = 37; | |
1827 GUIButton2.pParent = pButton_RestUI_WaitUntilDawn->pParent; | |
1828 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); | |
1829 pRenderer->DrawTextureIndexed(uFrameX, uFrameY, *((Texture **)ptr_1C + 15)); | |
1830 viewparams->bRedrawGameUI = 1; | |
1831 GUIButton2.DrawLabel(pGlobalTXT_LocalizationStrings[183], pFontCreate, 0, 0); // Rest & Heal 8 hrs / Отдых и лечение 8 часов | |
1832 GUIButton2.pParent = 0; | |
1833 Release(); | |
1834 } | 1742 } |
1835 | 1743 |
1836 void OnButtonClick::Update() | 1744 void OnButtonClick::Update() |
1837 { | 1745 { |
1838 if (Hint != (char *)1) | 1746 if (Hint != (char *)1) |