Merged New Inventory Project into main branch

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1871 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
lalien
2008-03-08 15:15:25 +00:00
parent e16d166277
commit 43ca24dda8
649 changed files with 93359 additions and 82507 deletions
+190 -190
View File
@@ -6,14 +6,14 @@
#endif
#define BORDER_WIDTH 16
#define BORDER_HEIGHT 8
#define TOP_LEFT_CORNER 0
#define TOP_EDGE 4
#define TOP_RIGHT_CORNER 1
#define SIDE_EDGE 5
#define BOTTOM_LEFT_CORNER 2
#define BOTTOM_EDGE 4
#define BORDER_WIDTH 16
#define BORDER_HEIGHT 8
#define TOP_LEFT_CORNER 0
#define TOP_EDGE 4
#define TOP_RIGHT_CORNER 1
#define SIDE_EDGE 5
#define BOTTOM_LEFT_CORNER 2
#define BOTTOM_EDGE 4
#define BOTTOM_RIGHT_CORNER 3
@@ -74,7 +74,7 @@ void SpecifyBoxMinWidth( INT32 hBoxHandle, INT32 iMinWidth )
Assert( PopUpBoxList[ hBoxHandle ] );
PopUpBoxList[hBoxHandle]->uiBoxMinWidth = iMinWidth;
// check if the box is currently too small
if( PopUpBoxList[hBoxHandle]->Dimensions.iRight < iMinWidth )
{
@@ -105,7 +105,7 @@ BOOLEAN CreatePopUpBox(INT32 *phBoxHandle, SGPRect Dimensions, SGPPoint Position
iCount=iCounter;
*phBoxHandle=iCount;
pBox= (PopUpBoxPt) MemAlloc(sizeof(PopUpBo));
pBox= (PopUpBoxPt) MemAlloc(sizeof(PopUpBo));
if (pBox == NULL)
{
return FALSE;
@@ -119,8 +119,8 @@ BOOLEAN CreatePopUpBox(INT32 *phBoxHandle, SGPRect Dimensions, SGPPoint Position
for(iCounter=0; iCounter < MAX_POPUP_BOX_STRING_COUNT; iCounter++)
{
PopUpBoxList[iCount]->Text[iCounter]=NULL;
PopUpBoxList[iCount]->pSecondColumnString[iCounter]=NULL;
PopUpBoxList[iCount]->Text[iCounter]=NULL;
PopUpBoxList[iCount]->pSecondColumnString[iCounter]=NULL;
}
SetCurrentBox(iCount);
@@ -130,7 +130,7 @@ BOOLEAN CreatePopUpBox(INT32 *phBoxHandle, SGPRect Dimensions, SGPPoint Position
PopUpBoxList[iCount]->fUpdated = FALSE;
return TRUE;
return TRUE;
}
@@ -141,8 +141,8 @@ void SetBoxFlags( INT32 hBoxHandle, UINT32 uiFlags)
Assert( PopUpBoxList[ hBoxHandle ] );
PopUpBoxList[hBoxHandle]->uiFlags=uiFlags;
PopUpBoxList[hBoxHandle]->fUpdated = FALSE;
PopUpBoxList[hBoxHandle]->uiFlags=uiFlags;
PopUpBoxList[hBoxHandle]->fUpdated = FALSE;
return;
}
@@ -155,12 +155,12 @@ void SetMargins(INT32 hBoxHandle, UINT32 uiLeft, UINT32 uiTop, UINT32 uiBottom,
Assert( PopUpBoxList[ hBoxHandle ] );
PopUpBoxList[hBoxHandle]->uiLeftMargin=uiLeft;
PopUpBoxList[hBoxHandle]->uiRightMargin=uiRight;
PopUpBoxList[hBoxHandle]->uiTopMargin=uiTop;
PopUpBoxList[hBoxHandle]->uiBottomMargin=uiBottom;
PopUpBoxList[hBoxHandle]->uiLeftMargin=uiLeft;
PopUpBoxList[hBoxHandle]->uiRightMargin=uiRight;
PopUpBoxList[hBoxHandle]->uiTopMargin=uiTop;
PopUpBoxList[hBoxHandle]->uiBottomMargin=uiBottom;
PopUpBoxList[hBoxHandle]-> fUpdated = FALSE;
PopUpBoxList[hBoxHandle]->fUpdated = FALSE;
return;
}
@@ -188,8 +188,8 @@ void ShadeStringInBox( INT32 hBoxHandle, INT32 iLineNumber )
Assert( PopUpBoxList[ hBoxHandle ] );
if( PopUpBoxList[hBoxHandle]->Text[iLineNumber]!=NULL)
{
if( PopUpBoxList[hBoxHandle]->Text[iLineNumber]!=NULL)
{
// set current box
SetCurrentBox( hBoxHandle );
@@ -210,7 +210,7 @@ void UnShadeStringInBox( INT32 hBoxHandle, INT32 iLineNumber )
Assert( PopUpBoxList[ hBoxHandle ] );
if( PopUpBoxList[hBoxHandle]->Text[iLineNumber]!=NULL)
{
{
// set current box
SetCurrentBox( hBoxHandle );
@@ -231,8 +231,8 @@ void SecondaryShadeStringInBox( INT32 hBoxHandle, INT32 iLineNumber )
Assert( PopUpBoxList[ hBoxHandle ] );
if( PopUpBoxList[hBoxHandle]->Text[iLineNumber]!=NULL)
{
if( PopUpBoxList[hBoxHandle]->Text[iLineNumber]!=NULL)
{
// set current box
SetCurrentBox( hBoxHandle );
@@ -253,7 +253,7 @@ void UnSecondaryShadeStringInBox( INT32 hBoxHandle, INT32 iLineNumber )
Assert( PopUpBoxList[ hBoxHandle ] );
if( PopUpBoxList[hBoxHandle]->Text[iLineNumber]!=NULL)
{
{
// set current box
SetCurrentBox( hBoxHandle );
@@ -275,7 +275,7 @@ void SetBoxBuffer(INT32 hBoxHandle, UINT32 uiBuffer)
PopUpBoxList[hBoxHandle]->uiBuffer=uiBuffer;
PopUpBoxList[hBoxHandle]-> fUpdated = FALSE;
PopUpBoxList[hBoxHandle]->fUpdated = FALSE;
return;
}
@@ -291,9 +291,9 @@ void SetBoxPosition( INT32 hBoxHandle,SGPPoint Position )
PopUpBoxList[hBoxHandle]->Position.iX=Position.iX;
PopUpBoxList[hBoxHandle]->Position.iY=Position.iY;
PopUpBoxList[hBoxHandle]-> fUpdated = FALSE;
PopUpBoxList[hBoxHandle]->fUpdated = FALSE;
return;
return;
}
@@ -304,8 +304,8 @@ void GetBoxPosition( INT32 hBoxHandle, SGPPoint *Position )
Assert( PopUpBoxList[ hBoxHandle ] );
Position -> iX = PopUpBoxList[hBoxHandle]->Position.iX;
Position -> iY = PopUpBoxList[hBoxHandle]->Position.iY;
Position->iX = PopUpBoxList[hBoxHandle]->Position.iX;
Position->iY = PopUpBoxList[hBoxHandle]->Position.iY;
return;
}
@@ -322,7 +322,7 @@ void SetBoxSize(INT32 hBoxHandle,SGPRect Dimensions)
PopUpBoxList[hBoxHandle]->Dimensions.iRight=Dimensions.iRight;
PopUpBoxList[hBoxHandle]->Dimensions.iTop=Dimensions.iTop;
PopUpBoxList[hBoxHandle]-> fUpdated = FALSE;
PopUpBoxList[hBoxHandle]->fUpdated = FALSE;
return;
}
@@ -335,15 +335,15 @@ void GetBoxSize( INT32 hBoxHandle, SGPRect *Dimensions )
Assert( PopUpBoxList[ hBoxHandle ] );
Dimensions -> iLeft = PopUpBoxList[hBoxHandle]->Dimensions.iLeft;
Dimensions -> iBottom = PopUpBoxList[hBoxHandle]->Dimensions.iBottom;
Dimensions -> iRight = PopUpBoxList[hBoxHandle]->Dimensions.iRight;
Dimensions -> iTop = PopUpBoxList[hBoxHandle]->Dimensions.iTop;
Dimensions->iLeft = PopUpBoxList[hBoxHandle]->Dimensions.iLeft;
Dimensions->iBottom = PopUpBoxList[hBoxHandle]->Dimensions.iBottom;
Dimensions->iRight = PopUpBoxList[hBoxHandle]->Dimensions.iRight;
Dimensions->iTop = PopUpBoxList[hBoxHandle]->Dimensions.iTop;
return;
}
void SetBorderType(INT32 hBoxHandle, INT32 iBorderObjectIndex)
{
if ( ( hBoxHandle < 0 ) || ( hBoxHandle >= MAX_POPUP_BOX_COUNT ) )
@@ -408,8 +408,8 @@ void AddMonoString(UINT32 *hStringHandle, STR16 pString)
PopUpBoxList[guiCurrentBox]->Text[iCounter]->fSecondaryShadeFlag = FALSE;
*hStringHandle=iCounter;
PopUpBoxList[guiCurrentBox]-> fUpdated = FALSE;
PopUpBoxList[guiCurrentBox]->fUpdated = FALSE;
return;
}
@@ -438,25 +438,25 @@ void AddSecondColumnMonoString( UINT32 *hStringHandle, STR16 pString )
return;
}
pStringSt=(POPUPSTRING *)(MemAlloc(sizeof(POPUPSTRING)));
pStringSt=(POPUPSTRING *)(MemAlloc(sizeof(POPUPSTRING)));
if (pStringSt == NULL)
return;
pLocalString=(STR16)MemAlloc((wcslen(pString)+1)*sizeof(CHAR16));
pLocalString=(STR16)MemAlloc((wcslen(pString)+1)*sizeof(CHAR16));
if (pLocalString == NULL)
return;
wcscpy(pLocalString, pString);
wcscpy(pLocalString, pString);
RemoveCurrentBoxSecondaryText( iCounter );
PopUpBoxList[guiCurrentBox]->pSecondColumnString[iCounter]=pStringSt;
PopUpBoxList[guiCurrentBox]->pSecondColumnString[iCounter]->fColorFlag=FALSE;
PopUpBoxList[guiCurrentBox]->pSecondColumnString[iCounter]->pString=pLocalString;
PopUpBoxList[guiCurrentBox]->pSecondColumnString[iCounter]->fShadeFlag = FALSE;
PopUpBoxList[guiCurrentBox]->pSecondColumnString[iCounter]->fHighLightFlag = FALSE;
PopUpBoxList[guiCurrentBox]->pSecondColumnString[iCounter]->fColorFlag=FALSE;
PopUpBoxList[guiCurrentBox]->pSecondColumnString[iCounter]->pString=pLocalString;
PopUpBoxList[guiCurrentBox]->pSecondColumnString[iCounter]->fShadeFlag = FALSE;
PopUpBoxList[guiCurrentBox]->pSecondColumnString[iCounter]->fHighLightFlag = FALSE;
*hStringHandle=iCounter;
*hStringHandle=iCounter;
return;
}
@@ -503,7 +503,7 @@ void AddColorString(INT32 *hStringHandle, STR16 pString)
*hStringHandle=iCounter;
PopUpBoxList[guiCurrentBox]-> fUpdated = FALSE;
PopUpBoxList[guiCurrentBox]->fUpdated = FALSE;
return;
}
@@ -575,14 +575,14 @@ void SetBoxFont(INT32 hBoxHandle, UINT32 uiFont)
{
if ( PopUpBoxList[hBoxHandle]->Text[uiCounter] != NULL)
{
PopUpBoxList[hBoxHandle]->Text[uiCounter]->uiFont=uiFont;
PopUpBoxList[hBoxHandle]->Text[uiCounter]->uiFont=uiFont;
}
}
// set up the 2nd column font
SetBoxSecondColumnFont( hBoxHandle, uiFont );
PopUpBoxList[hBoxHandle]-> fUpdated = FALSE;
PopUpBoxList[hBoxHandle]->fUpdated = FALSE;
return;
}
@@ -614,13 +614,13 @@ void SetBoxSecondColumnFont(INT32 hBoxHandle, UINT32 uiFont)
for( iCounter = 0; iCounter < MAX_POPUP_BOX_STRING_COUNT; iCounter++ )
{
if( PopUpBoxList[hBoxHandle]->pSecondColumnString[iCounter] )
{
if( PopUpBoxList[hBoxHandle]->pSecondColumnString[iCounter] )
{
PopUpBoxList[hBoxHandle]->pSecondColumnString[iCounter]->uiFont=uiFont;
}
}
}
PopUpBoxList[hBoxHandle]-> fUpdated = FALSE;
PopUpBoxList[hBoxHandle]->fUpdated = FALSE;
return;
}
@@ -825,7 +825,7 @@ void SetBoxForeground(INT32 hBoxHandle, UINT8 ubColor)
{
if (PopUpBoxList[hBoxHandle]->Text[uiCounter]!=NULL)
{
PopUpBoxList[hBoxHandle]->Text[uiCounter]->ubForegroundColor=ubColor;
PopUpBoxList[hBoxHandle]->Text[uiCounter]->ubForegroundColor=ubColor;
}
}
return;
@@ -844,7 +844,7 @@ void SetBoxBackground(INT32 hBoxHandle, UINT8 ubColor)
{
if (PopUpBoxList[hBoxHandle]->Text[uiCounter]!=NULL)
{
PopUpBoxList[hBoxHandle]->Text[uiCounter]->ubBackgroundColor=ubColor;
PopUpBoxList[hBoxHandle]->Text[uiCounter]->ubBackgroundColor=ubColor;
}
}
return;
@@ -863,7 +863,7 @@ void SetBoxHighLight(INT32 hBoxHandle, UINT8 ubColor)
{
if (PopUpBoxList[hBoxHandle]->Text[uiCounter]!=NULL)
{
PopUpBoxList[hBoxHandle]->Text[uiCounter]->ubHighLight=ubColor;
PopUpBoxList[hBoxHandle]->Text[uiCounter]->ubHighLight=ubColor;
}
}
return;
@@ -882,7 +882,7 @@ void SetBoxShade(INT32 hBoxHandle, UINT8 ubColor)
{
if (PopUpBoxList[hBoxHandle]->Text[uiCounter]!=NULL)
{
PopUpBoxList[hBoxHandle]->Text[uiCounter]->ubShade=ubColor;
PopUpBoxList[hBoxHandle]->Text[uiCounter]->ubShade=ubColor;
}
}
return;
@@ -891,7 +891,7 @@ void SetBoxShade(INT32 hBoxHandle, UINT8 ubColor)
void SetBoxSecondColumnForeground(INT32 hBoxHandle, UINT8 ubColor)
{
UINT32 iCounter=0;
if ( ( hBoxHandle < 0 ) || ( hBoxHandle >= MAX_POPUP_BOX_COUNT ) )
return;
@@ -899,10 +899,10 @@ void SetBoxSecondColumnForeground(INT32 hBoxHandle, UINT8 ubColor)
for( iCounter = 0; iCounter < MAX_POPUP_BOX_STRING_COUNT; iCounter++ )
{
if( PopUpBoxList[hBoxHandle]->pSecondColumnString[iCounter] )
{
PopUpBoxList[hBoxHandle]->pSecondColumnString[iCounter]->ubForegroundColor=ubColor;
}
if( PopUpBoxList[hBoxHandle]->pSecondColumnString[iCounter] )
{
PopUpBoxList[hBoxHandle]->pSecondColumnString[iCounter]->ubForegroundColor=ubColor;
}
}
return;
@@ -919,10 +919,10 @@ void SetBoxSecondColumnBackground(INT32 hBoxHandle, UINT8 ubColor)
for( iCounter = 0; iCounter < MAX_POPUP_BOX_STRING_COUNT; iCounter++ )
{
if( PopUpBoxList[hBoxHandle]->pSecondColumnString[iCounter] )
{
PopUpBoxList[hBoxHandle]->pSecondColumnString[iCounter]->ubBackgroundColor=ubColor;
}
if( PopUpBoxList[hBoxHandle]->pSecondColumnString[iCounter] )
{
PopUpBoxList[hBoxHandle]->pSecondColumnString[iCounter]->ubBackgroundColor=ubColor;
}
}
return;
@@ -939,10 +939,10 @@ void SetBoxSecondColumnHighLight(INT32 hBoxHandle, UINT8 ubColor)
for( iCounter = 0; iCounter < MAX_POPUP_BOX_STRING_COUNT; iCounter++ )
{
if( PopUpBoxList[hBoxHandle]->pSecondColumnString[iCounter] )
{
if( PopUpBoxList[hBoxHandle]->pSecondColumnString[iCounter] )
{
PopUpBoxList[hBoxHandle]->pSecondColumnString[iCounter]->ubHighLight=ubColor;
}
}
}
return;
@@ -959,10 +959,10 @@ void SetBoxSecondColumnShade(INT32 hBoxHandle, UINT8 ubColor)
for( iCounter = 0; iCounter < MAX_POPUP_BOX_STRING_COUNT; iCounter++ )
{
if( PopUpBoxList[hBoxHandle]->pSecondColumnString[iCounter] )
{
if( PopUpBoxList[hBoxHandle]->pSecondColumnString[iCounter] )
{
PopUpBoxList[hBoxHandle]->pSecondColumnString[iCounter]->ubShade=ubColor;
}
}
}
return;
}
@@ -976,7 +976,7 @@ void HighLightLine(INT32 hStringHandle)
Assert( PopUpBoxList[guiCurrentBox] != NULL );
if(!PopUpBoxList[guiCurrentBox]->Text[hStringHandle])
return;
return;
PopUpBoxList[guiCurrentBox]->Text[hStringHandle]->fHighLightFlag=TRUE;
return;
}
@@ -989,7 +989,7 @@ BOOLEAN GetShadeFlag( INT32 hStringHandle )
Assert( PopUpBoxList[guiCurrentBox] != NULL );
if(!PopUpBoxList[guiCurrentBox]->Text[hStringHandle])
return( FALSE );
return( FALSE );
return( PopUpBoxList[guiCurrentBox]->Text[hStringHandle]->fShadeFlag);
}
@@ -1002,7 +1002,7 @@ BOOLEAN GetSecondaryShadeFlag( INT32 hStringHandle )
Assert( PopUpBoxList[guiCurrentBox] != NULL );
if(!PopUpBoxList[guiCurrentBox]->Text[hStringHandle])
return( FALSE );
return( FALSE );
return( PopUpBoxList[guiCurrentBox]->Text[hStringHandle]->fSecondaryShadeFlag );
}
@@ -1015,8 +1015,8 @@ void HighLightBoxLine( INT32 hBoxHandle, INT32 iLineNumber )
// highlight iLineNumber Line in box indexed by hBoxHandle
if( PopUpBoxList[hBoxHandle]->Text[iLineNumber]!=NULL)
{
if( PopUpBoxList[hBoxHandle]->Text[iLineNumber]!=NULL)
{
// set current box
SetCurrentBox( hBoxHandle );
@@ -1033,8 +1033,8 @@ BOOLEAN GetBoxShadeFlag( INT32 hBoxHandle, INT32 iLineNumber )
return(FALSE);
if( PopUpBoxList[hBoxHandle]->Text[iLineNumber]!=NULL)
{
return( PopUpBoxList[hBoxHandle]->Text[iLineNumber]->fShadeFlag );
{
return( PopUpBoxList[hBoxHandle]->Text[iLineNumber]->fShadeFlag );
}
@@ -1047,8 +1047,8 @@ BOOLEAN GetBoxSecondaryShadeFlag( INT32 hBoxHandle, INT32 iLineNumber )
return(FALSE);
if( PopUpBoxList[hBoxHandle]->Text[iLineNumber]!=NULL)
{
return( PopUpBoxList[hBoxHandle]->Text[iLineNumber]->fSecondaryShadeFlag );
{
return( PopUpBoxList[hBoxHandle]->Text[iLineNumber]->fSecondaryShadeFlag );
}
@@ -1063,7 +1063,7 @@ void UnHighLightLine(INT32 hStringHandle)
Assert( PopUpBoxList[guiCurrentBox] != NULL );
if(!PopUpBoxList[guiCurrentBox]->Text[hStringHandle])
return;
return;
PopUpBoxList[guiCurrentBox]->Text[hStringHandle]->fHighLightFlag=FALSE;
return;
}
@@ -1078,7 +1078,7 @@ void UnHighLightBox(INT32 hBoxHandle)
for(iCounter=0; iCounter <MAX_POPUP_BOX_STRING_COUNT;iCounter++)
{
if(PopUpBoxList[hBoxHandle]->Text[iCounter])
PopUpBoxList[hBoxHandle]->Text[iCounter]->fHighLightFlag=FALSE;
PopUpBoxList[hBoxHandle]->Text[iCounter]->fHighLightFlag=FALSE;
}
}
@@ -1090,7 +1090,7 @@ void UnHighLightSecondColumnLine(INT32 hStringHandle)
Assert( PopUpBoxList[guiCurrentBox] != NULL );
if(!PopUpBoxList[guiCurrentBox]->pSecondColumnString[hStringHandle])
return;
return;
PopUpBoxList[guiCurrentBox]->pSecondColumnString[hStringHandle]->fHighLightFlag=FALSE;
return;
@@ -1106,7 +1106,7 @@ void UnHighLightSecondColumnBox(INT32 hBoxHandle)
for(iCounter=0; iCounter <MAX_POPUP_BOX_STRING_COUNT;iCounter++)
{
if(PopUpBoxList[hBoxHandle]->pSecondColumnString[iCounter])
PopUpBoxList[hBoxHandle]->pSecondColumnString[iCounter]->fHighLightFlag=FALSE;
PopUpBoxList[hBoxHandle]->pSecondColumnString[iCounter]->fHighLightFlag=FALSE;
}
}
@@ -1132,8 +1132,8 @@ void RemoveOneCurrentBoxString(INT32 hStringHandle, BOOLEAN fFillGaps)
PopUpBoxList[guiCurrentBox]->pSecondColumnString[uiCounter]=PopUpBoxList[guiCurrentBox]->pSecondColumnString[uiCounter+1];
}
}
PopUpBoxList[guiCurrentBox]-> fUpdated = FALSE;
PopUpBoxList[guiCurrentBox]->fUpdated = FALSE;
}
@@ -1167,7 +1167,7 @@ void RemoveBox(INT32 hBoxHandle)
PopUpBoxList[hBoxHandle]=NULL;
if(hOldBoxHandle !=hBoxHandle)
SetCurrentBox(hOldBoxHandle);
SetCurrentBox(hOldBoxHandle);
return;
}
@@ -1211,7 +1211,7 @@ void SetCurrentBox(INT32 hBoxHandle)
if ( ( hBoxHandle < 0 ) || ( hBoxHandle >= MAX_POPUP_BOX_COUNT ) )
return;
guiCurrentBox = hBoxHandle;
guiCurrentBox = hBoxHandle;
}
@@ -1224,13 +1224,13 @@ void GetCurrentBox(INT32 *hBoxHandle)
void DisplayBoxes(UINT32 uiBuffer)
{
UINT32 uiCounter;
UINT32 uiCounter;
for( uiCounter=0; uiCounter < MAX_POPUP_BOX_COUNT; uiCounter++ )
{
DisplayOnePopupBox( uiCounter, uiBuffer );
}
return;
}
return;
}
@@ -1241,10 +1241,10 @@ void DisplayOnePopupBox( UINT32 uiIndex, UINT32 uiBuffer )
if ( PopUpBoxList[ uiIndex ] != NULL )
{
if( ( PopUpBoxList[ uiIndex ]->uiBuffer == uiBuffer) && ( PopUpBoxList[ uiIndex ]->fShowBox ) )
if( ( PopUpBoxList[ uiIndex ]->uiBuffer == uiBuffer) && ( PopUpBoxList[ uiIndex ]->fShowBox ) )
{
DrawBox( uiIndex );
DrawBoxText( uiIndex );
DrawBox( uiIndex );
DrawBoxText( uiIndex );
}
}
}
@@ -1267,18 +1267,18 @@ void ForceUpDateOfBox( UINT32 uiIndex )
BOOLEAN DrawBox(UINT32 uiCounter)
{
// will build pop up box in usTopX, usTopY with dimensions usWidth and usHeight
UINT32 uiNumTilesWide;
// will build pop up box in usTopX, usTopY with dimensions usWidth and usHeight
UINT32 uiNumTilesWide;
UINT32 uiNumTilesHigh;
UINT32 uiCount=0;
HVOBJECT hBoxHandle;
HVSURFACE hSrcVSurface;
UINT32 uiDestPitchBYTES;
HVOBJECT hBoxHandle;
HVSURFACE hSrcVSurface;
UINT32 uiDestPitchBYTES;
UINT32 uiSrcPitchBYTES;
UINT16 *pDestBuf;
UINT8 *pSrcBuf;
UINT16 *pDestBuf;
UINT8 *pSrcBuf;
SGPRect clip;
UINT16 usTopX, usTopY;
UINT16 usTopX, usTopY;
UINT16 usWidth, usHeight;
@@ -1290,12 +1290,12 @@ BOOLEAN DrawBox(UINT32 uiCounter)
// only update if we need to
if( PopUpBoxList[uiCounter]-> fUpdated == TRUE )
if( PopUpBoxList[uiCounter]->fUpdated == TRUE )
{
return( FALSE );
}
PopUpBoxList[uiCounter]-> fUpdated = TRUE;
PopUpBoxList[uiCounter]->fUpdated = TRUE;
if( PopUpBoxList[uiCounter]->uiFlags & POPUP_BOX_FLAG_RESIZE )
{
@@ -1314,7 +1314,7 @@ BOOLEAN DrawBox(UINT32 uiCounter)
}
// make sure it will fit on screen!
Assert( usTopX + usWidth <= SCREEN_WIDTH );
Assert( usTopX + usWidth <= SCREEN_WIDTH );
Assert( usTopY + usHeight <= SCREEN_HEIGHT );
// subtract 4 because the 2 2-pixel corners are handled separately
@@ -1322,58 +1322,58 @@ BOOLEAN DrawBox(UINT32 uiCounter)
uiNumTilesHigh=((usHeight-4)/BORDER_HEIGHT);
clip.iLeft=0;
clip.iRight=clip.iLeft+usWidth;
clip.iRight=clip.iLeft+usWidth;
clip.iTop=0;
clip.iBottom=clip.iTop+usHeight;
// blit in texture first, then borders
// blit in surface
pDestBuf = (UINT16*)LockVideoSurface(PopUpBoxList[uiCounter]->uiBuffer, &uiDestPitchBYTES);
CHECKF( GetVideoSurface( &hSrcVSurface, PopUpBoxList[uiCounter]->iBackGroundSurface) );
// blit in surface
pDestBuf = (UINT16*)LockVideoSurface(PopUpBoxList[uiCounter]->uiBuffer, &uiDestPitchBYTES);
CHECKF( GetVideoSurface( &hSrcVSurface, PopUpBoxList[uiCounter]->iBackGroundSurface) );
pSrcBuf = LockVideoSurface( PopUpBoxList[uiCounter]->iBackGroundSurface, &uiSrcPitchBYTES);
Blt8BPPDataSubTo16BPPBuffer( pDestBuf, uiDestPitchBYTES, hSrcVSurface, pSrcBuf,uiSrcPitchBYTES,usTopX,usTopY, &clip);
Blt8BPPDataSubTo16BPPBuffer( pDestBuf, uiDestPitchBYTES, hSrcVSurface, pSrcBuf,uiSrcPitchBYTES,usTopX,usTopY, &clip);
UnLockVideoSurface( PopUpBoxList[uiCounter]->iBackGroundSurface);
UnLockVideoSurface(PopUpBoxList[uiCounter]->uiBuffer);
UnLockVideoSurface(PopUpBoxList[uiCounter]->uiBuffer);
GetVideoObject(&hBoxHandle, PopUpBoxList[uiCounter]->iBorderObjectIndex);
// blit in 4 corners (they're 2x2 pixels)
// blit in 4 corners (they're 2x2 pixels)
BltVideoObject(PopUpBoxList[uiCounter]->uiBuffer, hBoxHandle, TOP_LEFT_CORNER,usTopX,usTopY, VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject(PopUpBoxList[uiCounter]->uiBuffer, hBoxHandle, TOP_RIGHT_CORNER,usTopX+usWidth-2,usTopY, VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject(PopUpBoxList[uiCounter]->uiBuffer, hBoxHandle, TOP_RIGHT_CORNER,usTopX+usWidth-2,usTopY, VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject(PopUpBoxList[uiCounter]->uiBuffer, hBoxHandle, BOTTOM_RIGHT_CORNER,usTopX+usWidth-2,usTopY+usHeight-2, VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject(PopUpBoxList[uiCounter]->uiBuffer, hBoxHandle, BOTTOM_LEFT_CORNER,usTopX,usTopY+usHeight-2, VO_BLT_SRCTRANSPARENCY, NULL );
// blit in edges
// blit in edges
if (uiNumTilesWide > 0)
{
// full pieces
for (uiCount=0; uiCount <uiNumTilesWide; uiCount++)
for (uiCount=0; uiCount <uiNumTilesWide; uiCount++)
{
BltVideoObject(PopUpBoxList[uiCounter]->uiBuffer, hBoxHandle, TOP_EDGE, usTopX+2+(uiCount*BORDER_WIDTH),usTopY, VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject(PopUpBoxList[uiCounter]->uiBuffer, hBoxHandle, BOTTOM_EDGE,usTopX+2+(uiCount*BORDER_WIDTH),usTopY+usHeight-2, VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject(PopUpBoxList[uiCounter]->uiBuffer, hBoxHandle, TOP_EDGE, usTopX+2+(uiCount*BORDER_WIDTH),usTopY, VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject(PopUpBoxList[uiCounter]->uiBuffer, hBoxHandle, BOTTOM_EDGE,usTopX+2+(uiCount*BORDER_WIDTH),usTopY+usHeight-2, VO_BLT_SRCTRANSPARENCY, NULL );
}
// partial pieces
BltVideoObject(PopUpBoxList[uiCounter]->uiBuffer, hBoxHandle, TOP_EDGE, usTopX+usWidth-2-BORDER_WIDTH,usTopY, VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject(PopUpBoxList[uiCounter]->uiBuffer, hBoxHandle, TOP_EDGE, usTopX+usWidth-2-BORDER_WIDTH,usTopY, VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject(PopUpBoxList[uiCounter]->uiBuffer, hBoxHandle, BOTTOM_EDGE,usTopX+usWidth-2-BORDER_WIDTH,usTopY+usHeight-2, VO_BLT_SRCTRANSPARENCY, NULL );
}
if (uiNumTilesHigh > 0)
if (uiNumTilesHigh > 0)
{
// full pieces
for (uiCount=0; uiCount <uiNumTilesHigh; uiCount++)
for (uiCount=0; uiCount <uiNumTilesHigh; uiCount++)
{
BltVideoObject(PopUpBoxList[uiCounter]->uiBuffer, hBoxHandle, SIDE_EDGE,usTopX, usTopY+2+(uiCount*BORDER_HEIGHT), VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject(PopUpBoxList[uiCounter]->uiBuffer, hBoxHandle, SIDE_EDGE,usTopX+usWidth-2,usTopY+2+(uiCount*BORDER_HEIGHT), VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject(PopUpBoxList[uiCounter]->uiBuffer, hBoxHandle, SIDE_EDGE,usTopX, usTopY+2+(uiCount*BORDER_HEIGHT), VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject(PopUpBoxList[uiCounter]->uiBuffer, hBoxHandle, SIDE_EDGE,usTopX+usWidth-2,usTopY+2+(uiCount*BORDER_HEIGHT), VO_BLT_SRCTRANSPARENCY, NULL );
}
// partial pieces
BltVideoObject(PopUpBoxList[uiCounter]->uiBuffer, hBoxHandle, SIDE_EDGE,usTopX, usTopY+usHeight-2-BORDER_HEIGHT, VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject(PopUpBoxList[uiCounter]->uiBuffer, hBoxHandle, SIDE_EDGE,usTopX, usTopY+usHeight-2-BORDER_HEIGHT, VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject(PopUpBoxList[uiCounter]->uiBuffer, hBoxHandle, SIDE_EDGE,usTopX+usWidth-2,usTopY+usHeight-2-BORDER_HEIGHT, VO_BLT_SRCTRANSPARENCY, NULL );
}
}
InvalidateRegion( usTopX, usTopY, usTopX + usWidth, usTopY + usHeight );
return TRUE;
}
BOOLEAN DrawBoxText(UINT32 uiCounter)
@@ -1382,7 +1382,7 @@ BOOLEAN DrawBoxText(UINT32 uiCounter)
INT16 uX, uY;
CHAR16 sString[100];
if ( ( uiCounter < 0 ) || ( uiCounter >= MAX_POPUP_BOX_COUNT ) )
return(FALSE);
@@ -1399,112 +1399,112 @@ BOOLEAN DrawBoxText(UINT32 uiCounter)
{
// there is text in this line?
if(PopUpBoxList[uiCounter]->Text[uiCount])
{
{
// set font
SetFont(PopUpBoxList[uiCounter]->Text[uiCount]->uiFont);
SetFont(PopUpBoxList[uiCounter]->Text[uiCount]->uiFont);
// are we highlighting?...shading?..or neither
if( ( PopUpBoxList[ uiCounter ] -> Text[ uiCount ] -> fHighLightFlag == FALSE )&&( PopUpBoxList[ uiCounter ] -> Text[ uiCount ] -> fShadeFlag == FALSE) &&( PopUpBoxList[ uiCounter ] -> Text[ uiCount ] -> fSecondaryShadeFlag == FALSE ) )
if( ( PopUpBoxList[ uiCounter ]->Text[ uiCount ]->fHighLightFlag == FALSE )&&( PopUpBoxList[ uiCounter ]->Text[ uiCount ]->fShadeFlag == FALSE) &&( PopUpBoxList[ uiCounter ]->Text[ uiCount ]->fSecondaryShadeFlag == FALSE ) )
{
// neither
SetFontForeground(PopUpBoxList[uiCounter]->Text[uiCount]->ubForegroundColor);
SetFontForeground(PopUpBoxList[uiCounter]->Text[uiCount]->ubForegroundColor);
}
else if( ( PopUpBoxList[ uiCounter ] -> Text[ uiCount ] -> fHighLightFlag == TRUE ) )
else if( ( PopUpBoxList[ uiCounter ]->Text[ uiCount ]->fHighLightFlag == TRUE ) )
{
// highlight
SetFontForeground(PopUpBoxList[uiCounter]->Text[uiCount]->ubHighLight);
SetFontForeground(PopUpBoxList[uiCounter]->Text[uiCount]->ubHighLight);
}
else if( ( PopUpBoxList[ uiCounter ] -> Text[ uiCount ] -> fSecondaryShadeFlag == TRUE ) )
else if( ( PopUpBoxList[ uiCounter ]->Text[ uiCount ]->fSecondaryShadeFlag == TRUE ) )
{
SetFontForeground(PopUpBoxList[uiCounter]->Text[uiCount]->ubSecondaryShade);
}
else
else
{
//shading
SetFontForeground(PopUpBoxList[uiCounter]->Text[uiCount]->ubShade);
}
// set background
SetFontBackground(PopUpBoxList[uiCounter]->Text[uiCount]->ubBackgroundColor);
SetFontBackground(PopUpBoxList[uiCounter]->Text[uiCount]->ubBackgroundColor);
// copy string
wcsncpy(sString, PopUpBoxList[uiCounter]->Text[uiCount]->pString, wcslen(PopUpBoxList[uiCounter]->Text[uiCount]->pString)+1);
wcsncpy(sString, PopUpBoxList[uiCounter]->Text[uiCount]->pString, wcslen(PopUpBoxList[uiCounter]->Text[uiCount]->pString)+1);
// cnetering?
if(PopUpBoxList[uiCounter]->uiFlags & POPUP_BOX_FLAG_CENTER_TEXT)
if(PopUpBoxList[uiCounter]->uiFlags & POPUP_BOX_FLAG_CENTER_TEXT)
{
FindFontCenterCoordinates(((INT16)(PopUpBoxList[uiCounter]->Position.iX+PopUpBoxList[uiCounter]->uiLeftMargin)),((INT16)(PopUpBoxList[uiCounter]->Position.iY+uiCount*GetFontHeight(PopUpBoxList[uiCounter]->Text[uiCount]->uiFont)+PopUpBoxList[uiCounter]->uiTopMargin+uiCount*PopUpBoxList[uiCounter]->uiLineSpace)),((INT16)(PopUpBoxList[uiCounter]->Dimensions.iRight-(PopUpBoxList[uiCounter]->uiRightMargin+PopUpBoxList[uiCounter]->uiLeftMargin+2))),((INT16)GetFontHeight(PopUpBoxList[uiCounter]->Text[uiCount]->uiFont)),(sString),((INT32)PopUpBoxList[uiCounter]->Text[uiCount]->uiFont) ,&uX, &uY);
}
else
{
uX=((INT16)(PopUpBoxList[uiCounter]->Position.iX+PopUpBoxList[uiCounter]->uiLeftMargin));
uY=((INT16)(PopUpBoxList[uiCounter]->Position.iY+uiCount*GetFontHeight(PopUpBoxList[uiCounter]->Text[uiCount]->uiFont)+PopUpBoxList[uiCounter]->uiTopMargin+uiCount*PopUpBoxList[uiCounter]->uiLineSpace));
FindFontCenterCoordinates(((INT16)(PopUpBoxList[uiCounter]->Position.iX+PopUpBoxList[uiCounter]->uiLeftMargin)),((INT16)(PopUpBoxList[uiCounter]->Position.iY+uiCount*GetFontHeight(PopUpBoxList[uiCounter]->Text[uiCount]->uiFont)+PopUpBoxList[uiCounter]->uiTopMargin+uiCount*PopUpBoxList[uiCounter]->uiLineSpace)),((INT16)(PopUpBoxList[uiCounter]->Dimensions.iRight-(PopUpBoxList[uiCounter]->uiRightMargin+PopUpBoxList[uiCounter]->uiLeftMargin+2))),((INT16)GetFontHeight(PopUpBoxList[uiCounter]->Text[uiCount]->uiFont)),(sString),((INT32)PopUpBoxList[uiCounter]->Text[uiCount]->uiFont) ,&uX, &uY);
}
else
{
uX=((INT16)(PopUpBoxList[uiCounter]->Position.iX+PopUpBoxList[uiCounter]->uiLeftMargin));
uY=((INT16)(PopUpBoxList[uiCounter]->Position.iY+uiCount*GetFontHeight(PopUpBoxList[uiCounter]->Text[uiCount]->uiFont)+PopUpBoxList[uiCounter]->uiTopMargin+uiCount*PopUpBoxList[uiCounter]->uiLineSpace));
}
// print
//gprintfdirty(uX,uY,PopUpBoxList[uiCounter]->Text[uiCount]->pString );
mprintf(uX,uY,PopUpBoxList[uiCounter]->Text[uiCount]->pString);
//gprintfdirty(uX,uY,PopUpBoxList[uiCounter]->Text[uiCount]->pString );
mprintf(uX,uY,PopUpBoxList[uiCounter]->Text[uiCount]->pString);
}
// there is secondary text in this line?
if(PopUpBoxList[uiCounter]->pSecondColumnString[uiCount])
{
{
// set font
SetFont(PopUpBoxList[uiCounter]->pSecondColumnString[uiCount]->uiFont);
SetFont(PopUpBoxList[uiCounter]->pSecondColumnString[uiCount]->uiFont);
// are we highlighting?...shading?..or neither
if( ( PopUpBoxList[ uiCounter ] -> pSecondColumnString[ uiCount ] -> fHighLightFlag == FALSE )&&( PopUpBoxList[ uiCounter ] -> pSecondColumnString[ uiCount ] -> fShadeFlag == FALSE) )
if( ( PopUpBoxList[ uiCounter ]->pSecondColumnString[ uiCount ]->fHighLightFlag == FALSE )&&( PopUpBoxList[ uiCounter ]->pSecondColumnString[ uiCount ]->fShadeFlag == FALSE) )
{
// neither
SetFontForeground(PopUpBoxList[uiCounter]->pSecondColumnString[uiCount]->ubForegroundColor);
SetFontForeground(PopUpBoxList[uiCounter]->pSecondColumnString[uiCount]->ubForegroundColor);
}
else if( ( PopUpBoxList[ uiCounter ] -> pSecondColumnString[ uiCount ] -> fHighLightFlag == TRUE ) )
else if( ( PopUpBoxList[ uiCounter ]->pSecondColumnString[ uiCount ]->fHighLightFlag == TRUE ) )
{
// highlight
SetFontForeground(PopUpBoxList[uiCounter]->pSecondColumnString[uiCount]->ubHighLight);
SetFontForeground(PopUpBoxList[uiCounter]->pSecondColumnString[uiCount]->ubHighLight);
}
else
else
{
//shading
SetFontForeground(PopUpBoxList[uiCounter]->pSecondColumnString[uiCount]->ubShade);
}
// set background
SetFontBackground(PopUpBoxList[uiCounter]->pSecondColumnString[uiCount]->ubBackgroundColor);
SetFontBackground(PopUpBoxList[uiCounter]->pSecondColumnString[uiCount]->ubBackgroundColor);
// copy string
wcsncpy(sString, PopUpBoxList[uiCounter]->pSecondColumnString[uiCount]->pString, wcslen(PopUpBoxList[uiCounter]->pSecondColumnString[uiCount]->pString)+1);
wcsncpy(sString, PopUpBoxList[uiCounter]->pSecondColumnString[uiCount]->pString, wcslen(PopUpBoxList[uiCounter]->pSecondColumnString[uiCount]->pString)+1);
// cnetering?
if(PopUpBoxList[uiCounter]->uiFlags & POPUP_BOX_FLAG_CENTER_TEXT)
if(PopUpBoxList[uiCounter]->uiFlags & POPUP_BOX_FLAG_CENTER_TEXT)
{
FindFontCenterCoordinates(((INT16)(PopUpBoxList[uiCounter]->Position.iX+PopUpBoxList[uiCounter]->uiLeftMargin)),((INT16)(PopUpBoxList[uiCounter]->Position.iY+uiCount*GetFontHeight(PopUpBoxList[uiCounter]->pSecondColumnString[uiCount]->uiFont)+PopUpBoxList[uiCounter]->uiTopMargin+uiCount*PopUpBoxList[uiCounter]->uiLineSpace)),((INT16)(PopUpBoxList[uiCounter]->Dimensions.iRight-(PopUpBoxList[uiCounter]->uiRightMargin+PopUpBoxList[uiCounter]->uiLeftMargin+2))),((INT16)GetFontHeight(PopUpBoxList[uiCounter]->pSecondColumnString[uiCount]->uiFont)),(sString),((INT32)PopUpBoxList[uiCounter]->pSecondColumnString[uiCount]->uiFont) ,&uX, &uY);
}
else
{
uX=((INT16)(PopUpBoxList[uiCounter]->Position.iX+PopUpBoxList[uiCounter]->uiLeftMargin + PopUpBoxList[uiCounter]->uiSecondColumnCurrentOffset ) );
uY=((INT16)(PopUpBoxList[uiCounter]->Position.iY+uiCount*GetFontHeight(PopUpBoxList[uiCounter]->pSecondColumnString[uiCount]->uiFont)+PopUpBoxList[uiCounter]->uiTopMargin+uiCount*PopUpBoxList[uiCounter]->uiLineSpace));
FindFontCenterCoordinates(((INT16)(PopUpBoxList[uiCounter]->Position.iX+PopUpBoxList[uiCounter]->uiLeftMargin)),((INT16)(PopUpBoxList[uiCounter]->Position.iY+uiCount*GetFontHeight(PopUpBoxList[uiCounter]->pSecondColumnString[uiCount]->uiFont)+PopUpBoxList[uiCounter]->uiTopMargin+uiCount*PopUpBoxList[uiCounter]->uiLineSpace)),((INT16)(PopUpBoxList[uiCounter]->Dimensions.iRight-(PopUpBoxList[uiCounter]->uiRightMargin+PopUpBoxList[uiCounter]->uiLeftMargin+2))),((INT16)GetFontHeight(PopUpBoxList[uiCounter]->pSecondColumnString[uiCount]->uiFont)),(sString),((INT32)PopUpBoxList[uiCounter]->pSecondColumnString[uiCount]->uiFont) ,&uX, &uY);
}
else
{
uX=((INT16)(PopUpBoxList[uiCounter]->Position.iX+PopUpBoxList[uiCounter]->uiLeftMargin + PopUpBoxList[uiCounter]->uiSecondColumnCurrentOffset ) );
uY=((INT16)(PopUpBoxList[uiCounter]->Position.iY+uiCount*GetFontHeight(PopUpBoxList[uiCounter]->pSecondColumnString[uiCount]->uiFont)+PopUpBoxList[uiCounter]->uiTopMargin+uiCount*PopUpBoxList[uiCounter]->uiLineSpace));
}
// print
//gprintfdirty(uX,uY,PopUpBoxList[uiCounter]->Text[uiCount]->pString );
mprintf(uX,uY,PopUpBoxList[uiCounter]->pSecondColumnString[uiCount]->pString);
}
//gprintfdirty(uX,uY,PopUpBoxList[uiCounter]->Text[uiCount]->pString );
mprintf(uX,uY,PopUpBoxList[uiCounter]->pSecondColumnString[uiCount]->pString);
}
}
if( PopUpBoxList[uiCounter]->uiBuffer != guiSAVEBUFFER )
if( PopUpBoxList[uiCounter]->uiBuffer != guiSAVEBUFFER )
{
InvalidateRegion( PopUpBoxList[uiCounter]->Position.iX+PopUpBoxList[uiCounter]->uiLeftMargin-1, PopUpBoxList[uiCounter]->Position.iY+PopUpBoxList[uiCounter]->uiTopMargin, PopUpBoxList[uiCounter]->Position.iX+PopUpBoxList[uiCounter]->Dimensions.iRight-PopUpBoxList[uiCounter]->uiRightMargin,PopUpBoxList[uiCounter]->Position.iY+PopUpBoxList[uiCounter]->Dimensions.iBottom-PopUpBoxList[uiCounter]->uiBottomMargin );
}
SetFontDestBuffer(FRAME_BUFFER, 0,0,SCREEN_WIDTH, SCREEN_HEIGHT,FALSE);
SetFontDestBuffer(FRAME_BUFFER, 0,0,SCREEN_WIDTH, SCREEN_HEIGHT,FALSE);
return TRUE;
}
@@ -1528,7 +1528,7 @@ void ResizeBoxToText(INT32 hBoxHandle)
ResizeBoxForSecondStrings( hBoxHandle );
iHeight=PopUpBoxList[hBoxHandle]->uiTopMargin+PopUpBoxList[hBoxHandle]->uiBottomMargin;
for ( iCurrString = 0; iCurrString < MAX_POPUP_BOX_STRING_COUNT; iCurrString++ )
{
if ( PopUpBoxList[hBoxHandle]->Text[iCurrString] != NULL)
@@ -1536,14 +1536,14 @@ void ResizeBoxToText(INT32 hBoxHandle)
if( PopUpBoxList[hBoxHandle]->pSecondColumnString[iCurrString] != NULL )
{
iSecondColumnLength = StringPixLength( PopUpBoxList[hBoxHandle]->pSecondColumnString[iCurrString]->pString,PopUpBoxList[ hBoxHandle]->pSecondColumnString[ iCurrString ]->uiFont );
if( PopUpBoxList[hBoxHandle] -> uiSecondColumnCurrentOffset + iSecondColumnLength + PopUpBoxList[hBoxHandle]->uiLeftMargin+PopUpBoxList[hBoxHandle]->uiRightMargin > ( ( UINT32 ) iWidth ) )
if( PopUpBoxList[hBoxHandle]->uiSecondColumnCurrentOffset + iSecondColumnLength + PopUpBoxList[hBoxHandle]->uiLeftMargin+PopUpBoxList[hBoxHandle]->uiRightMargin > ( ( UINT32 ) iWidth ) )
{
iWidth = PopUpBoxList[hBoxHandle] -> uiSecondColumnCurrentOffset + iSecondColumnLength + PopUpBoxList[hBoxHandle]->uiLeftMargin+PopUpBoxList[hBoxHandle]->uiRightMargin;
iWidth = PopUpBoxList[hBoxHandle]->uiSecondColumnCurrentOffset + iSecondColumnLength + PopUpBoxList[hBoxHandle]->uiLeftMargin+PopUpBoxList[hBoxHandle]->uiRightMargin;
}
}
if( ( StringPixLength(PopUpBoxList[hBoxHandle]->Text[iCurrString]->pString,PopUpBoxList[hBoxHandle]->Text[iCurrString]->uiFont ) + PopUpBoxList[hBoxHandle]->uiLeftMargin+PopUpBoxList[hBoxHandle]->uiRightMargin ) > ( (UINT32) iWidth ) )
iWidth=StringPixLength(PopUpBoxList[hBoxHandle]->Text[iCurrString]->pString,PopUpBoxList[hBoxHandle]->Text[iCurrString]->uiFont ) + PopUpBoxList[hBoxHandle]->uiLeftMargin+PopUpBoxList[hBoxHandle]->uiRightMargin;
iWidth=StringPixLength(PopUpBoxList[hBoxHandle]->Text[iCurrString]->pString,PopUpBoxList[hBoxHandle]->Text[iCurrString]->uiFont ) + PopUpBoxList[hBoxHandle]->uiLeftMargin+PopUpBoxList[hBoxHandle]->uiRightMargin;
//vertical
iHeight+=GetFontHeight(PopUpBoxList[hBoxHandle]->Text[iCurrString]->uiFont)+PopUpBoxList[hBoxHandle]->uiLineSpace;
@@ -1553,9 +1553,9 @@ void ResizeBoxToText(INT32 hBoxHandle)
// doesn't support gaps in text array...
break;
}
}
}
PopUpBoxList[hBoxHandle]->Dimensions.iBottom=iHeight;
PopUpBoxList[hBoxHandle]->Dimensions.iRight=iWidth;
PopUpBoxList[hBoxHandle]->Dimensions.iRight=iWidth;
}
@@ -1569,7 +1569,7 @@ BOOLEAN IsBoxShown( UINT32 uiHandle )
return ( FALSE );
}
return( PopUpBoxList[ uiHandle ] -> fShowBox );
return( PopUpBoxList[ uiHandle ]->fShowBox );
}