mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
- Bobby Ray Fixes (by tazpn)
- Region button lingers after order screen is closed - Crash when closing order form git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5170 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -362,6 +362,7 @@ MOUSE_REGION gSelectedUpDownArrowOnGridScrollAreaRegion[2];
|
|||||||
void SelectUpDownArrowOnGridScrollAreaRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectUpDownArrowOnGridScrollAreaRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
//mouse region for scroll column in the grid area.
|
//mouse region for scroll column in the grid area.
|
||||||
MOUSE_REGION *gSelectedGridScrollColumnRegion;
|
MOUSE_REGION *gSelectedGridScrollColumnRegion;
|
||||||
|
INT32 gSelectedGridScrollColumnRegionSize;
|
||||||
void SelectGridScrollColumnRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectGridScrollColumnRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
void SelectGridScrollColumnMovementCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectGridScrollColumnMovementCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
@@ -647,9 +648,17 @@ void ExitBobbyRMailOrder()
|
|||||||
}
|
}
|
||||||
if (gfDrawGridColumnMouseRegion == TRUE)
|
if (gfDrawGridColumnMouseRegion == TRUE)
|
||||||
{
|
{
|
||||||
MSYS_DisableRegion( gSelectedGridScrollColumnRegion);
|
for(i=0; i<gSelectedGridScrollColumnRegionSize; i++)
|
||||||
MSYS_RemoveRegion( gSelectedGridScrollColumnRegion);
|
{
|
||||||
|
MSYS_DisableRegion( &gSelectedGridScrollColumnRegion[i] );
|
||||||
|
MSYS_RemoveRegion( &gSelectedGridScrollColumnRegion[i] );
|
||||||
|
}
|
||||||
|
gfDrawGridColumnMouseRegion = FALSE;
|
||||||
}
|
}
|
||||||
|
if (gSelectedGridScrollColumnRegion != NULL)
|
||||||
|
delete [] gSelectedGridScrollColumnRegion;
|
||||||
|
gSelectedGridScrollColumnRegion = NULL;
|
||||||
|
gSelectedGridScrollColumnRegionSize = 0;
|
||||||
|
|
||||||
//if the drop down box is active, destroy it
|
//if the drop down box is active, destroy it
|
||||||
gubDropDownAction = BR_DROP_DOWN_DESTROY;
|
gubDropDownAction = BR_DROP_DOWN_DESTROY;
|
||||||
@@ -1210,15 +1219,28 @@ void DisplayPurchasedItems( BOOLEAN fCalledFromOrderPage, UINT16 usGridX, UINT16
|
|||||||
MSYS_SetRegionUserData( &gSelectedUpDownArrowOnGridScrollAreaRegion[ 1 ], 0, 1);
|
MSYS_SetRegionUserData( &gSelectedUpDownArrowOnGridScrollAreaRegion[ 1 ], 0, 1);
|
||||||
MSYS_EnableRegion(&gSelectedUpDownArrowOnGridScrollAreaRegion[1]);
|
MSYS_EnableRegion(&gSelectedUpDownArrowOnGridScrollAreaRegion[1]);
|
||||||
gfDrawGridArrowMouseRegions = TRUE;
|
gfDrawGridArrowMouseRegions = TRUE;
|
||||||
}
|
}
|
||||||
if (guidivisor > 1)
|
if (guidivisor > 1)
|
||||||
{//Scroll Bar
|
{//Scroll Bar
|
||||||
usPosX = usGridX + BOBBYR_GRID_SCROLL_COLUMN_X;
|
usPosX = usGridX + BOBBYR_GRID_SCROLL_COLUMN_X;
|
||||||
usPosY = usGridY + BOBBYR_GRID_SCROLL_UP_ARROW_Y + BOBBYR_SCROLL_ARROW_HEIGHT;
|
usPosY = usGridY + BOBBYR_GRID_SCROLL_UP_ARROW_Y + BOBBYR_SCROLL_ARROW_HEIGHT;
|
||||||
usHeight = BOBBYR_GRID_SCROLL_COLUMN_HEIGHT_MINUS_ARROWS / guidivisor;
|
usHeight = BOBBYR_GRID_SCROLL_COLUMN_HEIGHT_MINUS_ARROWS / guidivisor;
|
||||||
gSelectedGridScrollColumnRegion = new MOUSE_REGION[guidivisor];
|
if (gfDrawGridColumnMouseRegion == FALSE || gSelectedGridScrollColumnRegionSize != guidivisor)
|
||||||
if (gfDrawGridColumnMouseRegion == FALSE)
|
|
||||||
{
|
{
|
||||||
|
if (gSelectedGridScrollColumnRegion != NULL)
|
||||||
|
{
|
||||||
|
for(i=0; i<gSelectedGridScrollColumnRegionSize; i++)
|
||||||
|
{
|
||||||
|
MSYS_DisableRegion( &gSelectedGridScrollColumnRegion[i] );
|
||||||
|
MSYS_RemoveRegion( &gSelectedGridScrollColumnRegion[i] );
|
||||||
|
}
|
||||||
|
delete [] gSelectedGridScrollColumnRegion;
|
||||||
|
}
|
||||||
|
if (gSelectedGridScrollColumnRegionSize != guidivisor)
|
||||||
|
{
|
||||||
|
gSelectedGridScrollColumnRegion = new MOUSE_REGION[guidivisor];
|
||||||
|
gSelectedGridScrollColumnRegionSize = guidivisor;
|
||||||
|
}
|
||||||
for(i=0; i<guidivisor; i++)
|
for(i=0; i<guidivisor; i++)
|
||||||
{
|
{
|
||||||
MSYS_DefineRegion( &gSelectedGridScrollColumnRegion[i], usPosX, usPosY, (UINT16)(usPosX+BOBBYR_SCROLL_ARROW_WIDTH), (UINT16)(usPosY+usHeight), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gSelectedGridScrollColumnRegion[i], usPosX, usPosY, (UINT16)(usPosX+BOBBYR_SCROLL_ARROW_WIDTH), (UINT16)(usPosY+usHeight), MSYS_PRIORITY_HIGH,
|
||||||
@@ -1227,7 +1249,7 @@ void DisplayPurchasedItems( BOOLEAN fCalledFromOrderPage, UINT16 usGridX, UINT16
|
|||||||
MSYS_EnableRegion(&gSelectedGridScrollColumnRegion[i]);
|
MSYS_EnableRegion(&gSelectedGridScrollColumnRegion[i]);
|
||||||
MSYS_SetRegionUserData( &gSelectedGridScrollColumnRegion[ i ], 0, i);
|
MSYS_SetRegionUserData( &gSelectedGridScrollColumnRegion[ i ], 0, i);
|
||||||
usPosY += usHeight;
|
usPosY += usHeight;
|
||||||
}
|
}
|
||||||
gfDrawGridColumnMouseRegion = TRUE;
|
gfDrawGridColumnMouseRegion = TRUE;
|
||||||
}
|
}
|
||||||
//Draw the rectangle
|
//Draw the rectangle
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ extern BOOLEAN gfDrawGridColumnMouseRegion;
|
|||||||
extern MOUSE_REGION gSelectedUpDownArrowOnGridScrollAreaRegion[2];
|
extern MOUSE_REGION gSelectedUpDownArrowOnGridScrollAreaRegion[2];
|
||||||
extern void SelectUpDownArrowOnGridScrollAreaRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
extern void SelectUpDownArrowOnGridScrollAreaRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
extern MOUSE_REGION *gSelectedGridScrollColumnRegion;
|
extern MOUSE_REGION *gSelectedGridScrollColumnRegion;
|
||||||
|
extern INT32 gSelectedGridScrollColumnRegionSize;
|
||||||
extern void SelectGridScrollColumnRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
extern void SelectGridScrollColumnRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
extern void SelectGridScrollColumnMovementCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
extern void SelectGridScrollColumnMovementCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
@@ -215,8 +216,14 @@ BOOLEAN EnterBobbyRShipments()
|
|||||||
}
|
}
|
||||||
if (gfDrawGridColumnMouseRegion == TRUE)
|
if (gfDrawGridColumnMouseRegion == TRUE)
|
||||||
{
|
{
|
||||||
MSYS_DisableRegion( gSelectedGridScrollColumnRegion);
|
for(int i=0; i<gSelectedGridScrollColumnRegionSize; i++)
|
||||||
MSYS_RemoveRegion( gSelectedGridScrollColumnRegion);
|
{
|
||||||
|
MSYS_DisableRegion( &gSelectedGridScrollColumnRegion[i] );
|
||||||
|
MSYS_RemoveRegion( &gSelectedGridScrollColumnRegion[i] );
|
||||||
|
}
|
||||||
|
delete [] gSelectedGridScrollColumnRegion;
|
||||||
|
gSelectedGridScrollColumnRegion = NULL;
|
||||||
|
gSelectedGridScrollColumnRegionSize = 0;
|
||||||
gfDrawGridColumnMouseRegion = FALSE;
|
gfDrawGridColumnMouseRegion = FALSE;
|
||||||
}
|
}
|
||||||
CreatePreviousShipmentsMouseRegions();
|
CreatePreviousShipmentsMouseRegions();
|
||||||
@@ -248,8 +255,14 @@ void ExitBobbyRShipments()
|
|||||||
}
|
}
|
||||||
if (gfDrawGridColumnMouseRegion == TRUE)
|
if (gfDrawGridColumnMouseRegion == TRUE)
|
||||||
{
|
{
|
||||||
MSYS_DisableRegion( gSelectedGridScrollColumnRegion);
|
for(int i=0; i<gSelectedGridScrollColumnRegionSize; i++)
|
||||||
MSYS_RemoveRegion( gSelectedGridScrollColumnRegion);
|
{
|
||||||
|
MSYS_DisableRegion( &gSelectedGridScrollColumnRegion[i] );
|
||||||
|
MSYS_RemoveRegion( &gSelectedGridScrollColumnRegion[i] );
|
||||||
|
}
|
||||||
|
delete [] gSelectedGridScrollColumnRegion;
|
||||||
|
gSelectedGridScrollColumnRegion = NULL;
|
||||||
|
gSelectedGridScrollColumnRegionSize = 0;
|
||||||
gfDrawGridColumnMouseRegion = FALSE;
|
gfDrawGridColumnMouseRegion = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user