mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +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 sString[ 50 ];
|
||||||
CHAR16 sDollarString[ 50 ];
|
CHAR16 sDollarString[ 50 ];
|
||||||
|
|
||||||
ContractPosition.iX = (SCREEN_WIDTH - INTERFACE_WIDTH)/2 + OrigContractPosition.iX;
|
GetMousePos(&ContractPosition);
|
||||||
ContractPosition.iY = yResOffset + OrigContractPosition.iY;
|
// Shift X-position to clear the mouse
|
||||||
|
ContractPosition.iX += 15;
|
||||||
|
|
||||||
if( giBoxY != 0 )
|
if( giBoxY != 0 )
|
||||||
{
|
{
|
||||||
@@ -15253,8 +15254,9 @@ void CreateContractBoxMultiSelect(INT32 DailySalaries, INT32 WeeklySalaries, INT
|
|||||||
ghContractBox = -1;
|
ghContractBox = -1;
|
||||||
fShowContractMenu = TRUE;
|
fShowContractMenu = TRUE;
|
||||||
|
|
||||||
ContractPosition.iX = (SCREEN_WIDTH - INTERFACE_WIDTH) / 2 + OrigContractPosition.iX;
|
GetMousePos(&ContractPosition);
|
||||||
ContractPosition.iY = yResOffset + OrigContractPosition.iY;
|
// Shift X-position to clear the mouse
|
||||||
|
ContractPosition.iX += 15;
|
||||||
|
|
||||||
if (giBoxY != 0)
|
if (giBoxY != 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user