Mercurial > mm7
diff UIHouses.cpp @ 648:35ce4761382c
Fixed numbers in tavern dialogue ui
author | Nomad |
---|---|
date | Mon, 11 Mar 2013 23:32:27 +0200 |
parents | 2f778a5dc27e |
children | 2bf48d11d742 |
line wrap: on
line diff
--- a/UIHouses.cpp Tue Mar 12 01:24:07 2013 +0600 +++ b/UIHouses.cpp Mon Mar 11 23:32:27 2013 +0200 @@ -1038,29 +1038,23 @@ { if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) return; - pColorText = pColorYellow; - if ( pDialogueWindow->pCurrentPosActiveItem != 2 ) - pColorText = pColorWhite; - sprintf(Dest, format_4E2DC8, pColorText); - sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[178], pOutString); + + sprintf(Dest, "\xC" "%05d", pDialogueWindow->pCurrentPosActiveItem == 2 ? pColorYellow : pColorWhite); + sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[178], pOutString); // Rent room for %d gold strcat(Dest, pTmpBuf2); pTextHeight = pFontArrus->CalcTextHeight(Dest, &dialog_window, 0, 0); strcat(Dest, "\n \n"); - pColorText = pColorYellow; - if ( pDialogueWindow->pCurrentPosActiveItem != 3 ) - pColorText = pColorWhite; - sprintf(a1, format_4E2DC8, pColorText); - sprintf(pTmpBuf2, pGlobalTXT_LocalizationStrings[86], - (signed __int64)p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier, + + sprintf(a1, "\xC" "%05d", pDialogueWindow->pCurrentPosActiveItem == 3 ? pColorYellow : pColorWhite); + sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[86], // Buy food for %d days for %d gold + (unsigned int)p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier, v83); strcat(a1, pTmpBuf2); v88 = pFontArrus->CalcTextHeight(a1, &dialog_window, 0, 0); strcat(a1, "\n \n"); - pColorText = pColorYellow; - if ( pDialogueWindow->pCurrentPosActiveItem != 4 ) - pColorText = pColorWhite; - sprintf(v77, format_4E2DC8, pColorText); - strcat(v77, pGlobalTXT_LocalizationStrings[160]); + + sprintf(v77, "\xC" "%05d", pDialogueWindow->pCurrentPosActiveItem == 4 ? pColorYellow : pColorWhite); + strcat(v77, pGlobalTXT_LocalizationStrings[160]); // Learn Skills v82 = pFontArrus->CalcTextHeight(v77, &dialog_window, 0, 0); strcat(v77, "\n \n"); v75[0] = 0; @@ -1068,11 +1062,8 @@ v31 = (signed int)window_SpeakInHouse->ptr_1C; if ( v31 >= 108 && v31 <= 120 ) { - pColorText = pColorYellow; - if ( pDialogueWindow->pCurrentPosActiveItem != 5 ) - pColorText = pColorWhite; - sprintf(v75, format_4E2DC8, pColorText); - strcat(v75, pGlobalTXT_LocalizationStrings[611]); + sprintf(v75, "\xC" "%05d", pDialogueWindow->pCurrentPosActiveItem == 5 ? pColorYellow : pColorWhite); + strcat(v75, pGlobalTXT_LocalizationStrings[611]); // Play Arcomage pTextHeight = pFontArrus->CalcTextHeight(v75, &dialog_window, 0, 0); } v34 = pDialogueWindow->pStartingPosActiveItem; @@ -1082,7 +1073,7 @@ pOutString = (GUIFont *)pDialogueWindow->pStartingPosActiveItem; if ( !(v37 ^ v34 < v35) ) { - sprintf(pTmpBuf, "%s%s%s%s", &Dest, &a1, &v77, &v75); + sprintf(pTmpBuf, "%s%s%s%s", Dest, a1, v77, v75); dialog_window.DrawTitleText(pFontArrus, 0, 146, 0, pTmpBuf, 3); return; }