mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Dynamically adjust contract box position
Create contract renewal box right next to mouse position. Small QoL change to have the box closer.
This commit is contained in:
@@ -15128,8 +15128,9 @@ void CreateContractBox( SOLDIERTYPE *pCharacter )
|
||||
CHAR16 sString[ 50 ];
|
||||
CHAR16 sDollarString[ 50 ];
|
||||
|
||||
ContractPosition.iX = (SCREEN_WIDTH - INTERFACE_WIDTH)/2 + OrigContractPosition.iX;
|
||||
ContractPosition.iY = yResOffset + OrigContractPosition.iY;
|
||||
GetMousePos(&ContractPosition);
|
||||
// Shift X-position to clear the mouse
|
||||
ContractPosition.iX += 15;
|
||||
|
||||
if( giBoxY != 0 )
|
||||
{
|
||||
@@ -15253,8 +15254,9 @@ void CreateContractBoxMultiSelect(INT32 DailySalaries, INT32 WeeklySalaries, INT
|
||||
ghContractBox = -1;
|
||||
fShowContractMenu = TRUE;
|
||||
|
||||
ContractPosition.iX = (SCREEN_WIDTH - INTERFACE_WIDTH) / 2 + OrigContractPosition.iX;
|
||||
ContractPosition.iY = yResOffset + OrigContractPosition.iY;
|
||||
GetMousePos(&ContractPosition);
|
||||
// Shift X-position to clear the mouse
|
||||
ContractPosition.iX += 15;
|
||||
|
||||
if (giBoxY != 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user