Mercurial > mm7
comparison GUIWindow.cpp @ 2215:e9625ad08541
fog fix and change 640,480 - window->GetWidth(), window->GetHeight()
author | Ritor1 |
---|---|
date | Fri, 14 Feb 2014 18:08:30 +0600 |
parents | d28d3c006077 |
children | 3f375342de12 |
comparison
equal
deleted
inserted
replaced
2214:20995bb8895a | 2215:e9625ad08541 |
---|---|
184 { | 184 { |
185 pMessageQueue_50CBD0->AddMessage(result->msg, result->msg_param, 0); | 185 pMessageQueue_50CBD0->AddMessage(result->msg, result->msg_param, 0); |
186 return result; | 186 return result; |
187 } | 187 } |
188 } | 188 } |
189 if ( !v4->uFrameX && !v4->uFrameY && (v4->uFrameWidth == 640 && v4->uFrameHeight == 480) ) | 189 if ( !v4->uFrameX && !v4->uFrameY && (v4->uFrameWidth == window->GetWidth() && v4->uFrameHeight == window->GetWidth()) ) |
190 break; | 190 break; |
191 } | 191 } |
192 return 0; | 192 return 0; |
193 } | 193 } |
194 // 5075E0: using guessed type int pVisibleWindowsIdxs[20]; | 194 // 5075E0: using guessed type int pVisibleWindowsIdxs[20]; |
678 v22 = pViewport->uViewportBR_Y; | 678 v22 = pViewport->uViewportBR_Y; |
679 } | 679 } |
680 else | 680 else |
681 { | 681 { |
682 v4 = 0; | 682 v4 = 0; |
683 v5 = 640; | 683 v5 = window->GetWidth(); |
684 v22 = 480; | 684 v22 = window->GetHeight(); |
685 } | 685 } |
686 v6 = this->uFrameX; | 686 v6 = this->uFrameX; |
687 if ( (signed int)this->uFrameX >= v4 ) | 687 if ( (signed int)this->uFrameX >= v4 ) |
688 { | 688 { |
689 v7 = this->uFrameWidth; | 689 v7 = this->uFrameWidth; |
1144 if ( !Stra ) | 1144 if ( !Stra ) |
1145 break; | 1145 break; |
1146 v13 = (signed int)(v8 - pFont->GetLineWidth(Stra)) >> 1; | 1146 v13 = (signed int)(v8 - pFont->GetLineWidth(Stra)) >> 1; |
1147 if ( v13 < 0 ) | 1147 if ( v13 < 0 ) |
1148 v13 = 0; | 1148 v13 = 0; |
1149 pFont->DrawTextLine(uDefaultColor, v11 + v13, v12, Stra, 640); | 1149 pFont->DrawTextLine(uDefaultColor, v11 + v13, v12, Stra, window->GetWidth()); |
1150 v12 += pFont->uFontHeight - uLineSpacing; | 1150 v12 += pFont->uFontHeight - uLineSpacing; |
1151 Stra = strtok(0, "\n"); | 1151 Stra = strtok(0, "\n"); |
1152 } | 1152 } |
1153 } | 1153 } |
1154 // 5C6DB4: using guessed type int ui_current_text_color; | 1154 // 5C6DB4: using guessed type int ui_current_text_color; |
1787 { | 1787 { |
1788 uDialogueType = 81;//enum JoinGuildDialog | 1788 uDialogueType = 81;//enum JoinGuildDialog |
1789 current_npc_text = (char *)pNPCTopics[pEventCode + 99].pText; | 1789 current_npc_text = (char *)pNPCTopics[pEventCode + 99].pText; |
1790 ContractSelectText(pEventCode); | 1790 ContractSelectText(pEventCode); |
1791 pDialogueWindow->Release(); | 1791 pDialogueWindow->Release(); |
1792 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x15E, WINDOW_MainMenu, pEventCode, 0); | 1792 pDialogueWindow = GUIWindow::Create(0, 0, window->GetWidth(), 350, WINDOW_MainMenu, pEventCode, 0); |
1793 pBtn_ExitCancel = pDialogueWindow->CreateButton(471, 445, 169, 35, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[34], pIcons_LOD->GetTexture(uExitCancelTextureId), 0); // Cancel | 1793 pBtn_ExitCancel = pDialogueWindow->CreateButton(471, 445, 169, 35, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[34], pIcons_LOD->GetTexture(uExitCancelTextureId), 0); // Cancel |
1794 pDialogueWindow->CreateButton( 0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); | 1794 pDialogueWindow->CreateButton( 0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); |
1795 pDialogueWindow->CreateButton(480, 160, 140, 30, 1, 0, UIMSG_ClickNPCTopic, 0x52u, 0, pGlobalTXT_LocalizationStrings[122], 0); | 1795 pDialogueWindow->CreateButton(480, 160, 140, 30, 1, 0, UIMSG_ClickNPCTopic, 0x52u, 0, pGlobalTXT_LocalizationStrings[122], 0); |
1796 pDialogueWindow->_41D08F_set_keyboard_control_group(1, 1, 0, 2); | 1796 pDialogueWindow->_41D08F_set_keyboard_control_group(1, 1, 0, 2); |
1797 dialog_menu_id = HOUSE_DIALOGUE_OTHER; | 1797 dialog_menu_id = HOUSE_DIALOGUE_OTHER; |
2027 case WINDOW_PressedButton2: | 2027 case WINDOW_PressedButton2: |
2028 { | 2028 { |
2029 if ( pWindow->Hint != (char *)1 ) | 2029 if ( pWindow->Hint != (char *)1 ) |
2030 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); | 2030 pAudioPlayer->PlaySound((SoundID)75, 0, 0, -1, 0, 0, 0, 0); |
2031 pButton = (GUIButton *)pWindow->ptr_1C; | 2031 pButton = (GUIButton *)pWindow->ptr_1C; |
2032 if ( pButton->uX >= 0 && pButton->uX <= 640 ) | 2032 if ( pButton->uX >= 0 && pButton->uX <= window->GetWidth() ) |
2033 { | 2033 { |
2034 if ( pButton->uY >= 0 && pButton->uY <= 480 ) | 2034 if ( pButton->uY >= 0 && pButton->uY <= window->GetHeight() ) |
2035 { | 2035 { |
2036 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[0]); | 2036 pRenderer->DrawTextureIndexed(pWindow->uFrameX, pWindow->uFrameY, pButton->pTextures[0]); |
2037 viewparams->bRedrawGameUI = 1; | 2037 viewparams->bRedrawGameUI = 1; |
2038 if ( pWindow->Hint ) | 2038 if ( pWindow->Hint ) |
2039 { | 2039 { |
2262 //----- (004141CA) -------------------------------------------------------- | 2262 //----- (004141CA) -------------------------------------------------------- |
2263 void ModalWindow(const char *pStrHint, UIMessageType OnRelease_message) | 2263 void ModalWindow(const char *pStrHint, UIMessageType OnRelease_message) |
2264 { | 2264 { |
2265 pEventTimer->Pause(); | 2265 pEventTimer->Pause(); |
2266 modal_window_prev_screen = pCurrentScreen; | 2266 modal_window_prev_screen = pCurrentScreen; |
2267 pModalWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_ModalWindow, OnRelease_message, pStrHint); | 2267 pModalWindow = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_ModalWindow, OnRelease_message, pStrHint); |
2268 pCurrentScreen = SCREEN_MODAL_WINDOW; | 2268 pCurrentScreen = SCREEN_MODAL_WINDOW; |
2269 } | 2269 } |
2270 | 2270 |
2271 //----- (0041420D) -------------------------------------------------------- | 2271 //----- (0041420D) -------------------------------------------------------- |
2272 void ModalWindow_ShowHint() | 2272 void ModalWindow_ShowHint() |
2350 if ( !pGUIWindow_ScrollWindow && mscroll_id >= 700 ) | 2350 if ( !pGUIWindow_ScrollWindow && mscroll_id >= 700 ) |
2351 { | 2351 { |
2352 if ( mscroll_id <= 782 ) | 2352 if ( mscroll_id <= 782 ) |
2353 { | 2353 { |
2354 uTextureID_720980 = pIcons_LOD->LoadTexture("leather", TEXTURE_16BIT_PALETTE); | 2354 uTextureID_720980 = pIcons_LOD->LoadTexture("leather", TEXTURE_16BIT_PALETTE); |
2355 pGUIWindow_ScrollWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Scroll, v1 - 700, 0); | 2355 pGUIWindow_ScrollWindow = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_Scroll, v1 - 700, 0); |
2356 } | 2356 } |
2357 } | 2357 } |
2358 } | 2358 } |
2359 //----- (00467F9F) -------------------------------------------------------- | 2359 //----- (00467F9F) -------------------------------------------------------- |
2360 void free_book_subwindow() | 2360 void free_book_subwindow() |