mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user