Merged from revision: 6812

Reworked Sectory actions menu (CTRL + .) (by Sevenfm)
- Also added support for 16 medium size buttons dialog.
- see: http://www.bears-pit.com/board/ubbthreads.php/topics/329932.html#Post329932

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6813 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2014-01-22 13:28:48 +00:00
parent 8cca415daa
commit e3bc68948e
6 changed files with 116 additions and 19 deletions
+4 -3
View File
@@ -316,7 +316,7 @@ MercPopUpBox * GetPopUpBoxIndex( INT32 iId )
INT32 PrepareMercPopupBox( INT32 iBoxId, UINT8 ubBackgroundIndex, UINT8 ubBorderIndex, STR16 pString,
UINT16 usWidth, UINT16 usMarginX, UINT16 usMarginTopY, UINT16 usMarginBottomY,
UINT16 *pActualWidth, UINT16 *pActualHeight)
UINT16 *pActualWidth, UINT16 *pActualHeight, BOOLEAN bFixedWidth)
{
UINT16 usNumberVerticalPixels, usNumberOfLines;
UINT16 usTextWidth, usHeight;
@@ -391,9 +391,10 @@ INT32 PrepareMercPopupBox( INT32 iBoxId, UINT8 ubBackgroundIndex, UINT8 ubBorder
// reset flags
guiFlags = 0;
usStringPixLength = WFStringPixLength( pString, TEXT_POPUP_FONT);
usStringPixLength = WFStringPixLength( pString, TEXT_POPUP_FONT);
if( usStringPixLength < ( usWidth - ( MERC_TEXT_POPUP_WINDOW_TEXT_OFFSET_X ) * 2 ) )
// sevenfm: change messagbebox width only if bFixedWidth = FALSE
if( !bFixedWidth && ( usStringPixLength < ( usWidth - ( MERC_TEXT_POPUP_WINDOW_TEXT_OFFSET_X ) * 2 ) ) )
{
usWidth = usStringPixLength + MERC_TEXT_POPUP_WINDOW_TEXT_OFFSET_X * 2;
usTextWidth = usWidth - ( MERC_TEXT_POPUP_WINDOW_TEXT_OFFSET_X ) * 2 + 1;