Mercurial > mm7
comparison GUI/UI/UIHouses.cpp @ 2544:c674d547cc7c
GUIWindow switch logic refactored into behaviour classes
author | a.parshin |
---|---|
date | Mon, 11 May 2015 09:51:04 +0200 |
parents | b6140dfeac27 |
children | d87bfbd3bb3b |
comparison
equal
deleted
inserted
replaced
2543:b6140dfeac27 | 2544:c674d547cc7c |
---|---|
1021 if (pPlayers[uActiveCharacter]->uLevel < pMaxLevelPerTrainingHallType[(unsigned int)window_SpeakInHouse->ptr_1C - 89] && | 1021 if (pPlayers[uActiveCharacter]->uLevel < pMaxLevelPerTrainingHallType[(unsigned int)window_SpeakInHouse->ptr_1C - 89] && |
1022 (signed __int64)pPlayers[uActiveCharacter]->uExperience < 1000 * experience_for_next_level)//test experience | 1022 (signed __int64)pPlayers[uActiveCharacter]->uExperience < 1000 * experience_for_next_level)//test experience |
1023 return; | 1023 return; |
1024 } | 1024 } |
1025 pDialogueWindow->Release(); | 1025 pDialogueWindow->Release(); |
1026 pDialogueWindow = GUIWindow::Create(0, 0, window->GetWidth(), 345, WINDOW_MainMenu, 0, 0); | 1026 pDialogueWindow = new GUIWindow(0, 0, window->GetWidth(), 345, 0, 0); |
1027 pBtn_ExitCancel = pDialogueWindow->CreateButton(526, 445, 75, 33, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[74],// "End Conversation" | 1027 pBtn_ExitCancel = pDialogueWindow->CreateButton(526, 445, 75, 33, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[74],// "End Conversation" |
1028 pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0); | 1028 pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0); |
1029 pDialogueWindow->CreateButton(8, 8, 450, 320, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", nullptr); | 1029 pDialogueWindow->CreateButton(8, 8, 450, 320, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", nullptr); |
1030 } | 1030 } |
1031 if ( in_current_building_type != BuildingType_Training ) | 1031 if ( in_current_building_type != BuildingType_Training ) |
1033 if ((in_current_building_type == BuildingType_Stables || in_current_building_type == BuildingType_Boats) && | 1033 if ((in_current_building_type == BuildingType_Stables || in_current_building_type == BuildingType_Boats) && |
1034 transport_schedule[transport_routes[(unsigned int)window_SpeakInHouse->ptr_1C - HOUSE_STABLES_HARMONDALE][uMessageParam - HOUSE_DIALOGUE_TRANSPORT_SCHEDULE_1]].pSchedule[pParty->uDaysPlayed % 7] | 1034 transport_schedule[transport_routes[(unsigned int)window_SpeakInHouse->ptr_1C - HOUSE_STABLES_HARMONDALE][uMessageParam - HOUSE_DIALOGUE_TRANSPORT_SCHEDULE_1]].pSchedule[pParty->uDaysPlayed % 7] |
1035 || in_current_building_type != BuildingType_Temple || uMessageParam != BuildingType_MindGuild ) | 1035 || in_current_building_type != BuildingType_Temple || uMessageParam != BuildingType_MindGuild ) |
1036 { | 1036 { |
1037 pDialogueWindow->Release(); | 1037 pDialogueWindow->Release(); |
1038 pDialogueWindow = GUIWindow::Create(0, 0, window->GetWidth(), 345, WINDOW_MainMenu, 0, 0); | 1038 pDialogueWindow = new GUIWindow(0, 0, window->GetWidth(), 345, 0, 0); |
1039 pBtn_ExitCancel = pDialogueWindow->CreateButton(526, 445, 75, 33, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[74],// "End Conversation" | 1039 pBtn_ExitCancel = pDialogueWindow->CreateButton(526, 445, 75, 33, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[74],// "End Conversation" |
1040 pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0); | 1040 pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0); |
1041 pDialogueWindow->CreateButton(8, 8, 450, 320, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", nullptr); | 1041 pDialogueWindow->CreateButton(8, 8, 450, 320, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", nullptr); |
1042 } | 1042 } |
1043 else if (uActiveCharacter) | 1043 else if (uActiveCharacter) |
3403 window_SpeakInHouse->Release(); | 3403 window_SpeakInHouse->Release(); |
3404 pParty->uFlags &= 0xFFFFFFFD; | 3404 pParty->uFlags &= 0xFFFFFFFD; |
3405 if ( EnterHouse(HOUSE_BODY_GUILD_ERATHIA) ) | 3405 if ( EnterHouse(HOUSE_BODY_GUILD_ERATHIA) ) |
3406 { | 3406 { |
3407 pAudioPlayer->PlaySound(SOUND_Invalid, 0, 0, -1, 0, 0, 0, 0); | 3407 pAudioPlayer->PlaySound(SOUND_Invalid, 0, 0, -1, 0, 0, 0, 0); |
3408 window_SpeakInHouse = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_HouseInterior, 165, 0); | 3408 window_SpeakInHouse = new GUIWindow_House(0, 0, window->GetWidth(), window->GetHeight(), 165, 0); |
3409 window_SpeakInHouse->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 1, 0x31, "", 0); | 3409 window_SpeakInHouse->CreateButton(0x3Du, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 1, 0x31, "", 0); |
3410 window_SpeakInHouse->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 2, 0x32, "", 0); | 3410 window_SpeakInHouse->CreateButton(0xB1u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 2, 0x32, "", 0); |
3411 window_SpeakInHouse->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 3, 0x33, "", 0); | 3411 window_SpeakInHouse->CreateButton(0x124u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 3, 0x33, "", 0); |
3412 window_SpeakInHouse->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 4, 0x34, "", 0); | 3412 window_SpeakInHouse->CreateButton(0x197u, 0x1A8u, 0x1Fu, 0, 2, 94, UIMSG_SelectCharacter, 4, 0x34, "", 0); |
3413 } | 3413 } |