mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
- Fixed mouse boundary to game window for multi-monitor setup in full screen mode (vanilla bug) (by Buggler)
- Freed 'Ctrl+y' hotkey in tactical & laptop screen for other uses (by Buggler) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6407 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -5528,7 +5528,7 @@ void EndRubberBanding( )
|
||||
{
|
||||
if ( gRubberBandActive )
|
||||
{
|
||||
FreeMouseCursor( );
|
||||
FreeMouseCursor( TRUE );
|
||||
gfIgnoreScrolling = FALSE;
|
||||
|
||||
EndMultiSoldierSelection( TRUE );
|
||||
|
||||
@@ -9440,7 +9440,7 @@ void DeleteItemStackPopup( )
|
||||
EnableSMPanelButtons( TRUE, FALSE );
|
||||
}
|
||||
|
||||
FreeMouseCursor( );
|
||||
FreeMouseCursor( TRUE );
|
||||
|
||||
}
|
||||
|
||||
@@ -9686,7 +9686,7 @@ void DeleteKeyRingPopup( )
|
||||
EnableSMPanelButtons( TRUE, FALSE );
|
||||
}
|
||||
|
||||
FreeMouseCursor( );
|
||||
FreeMouseCursor( TRUE );
|
||||
}
|
||||
|
||||
UINT32 GetInterfaceGraphicForItem( INVTYPE *pItem )
|
||||
|
||||
@@ -3980,7 +3980,7 @@ void SMInvClickCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
{
|
||||
//the only way to merge items is to pick them up. In SKI when you pick up an item, the cursor is
|
||||
//locked in a region, free it up.
|
||||
FreeMouseCursor();
|
||||
FreeMouseCursor( TRUE );
|
||||
|
||||
DoMessageBox( MSG_BOX_BASIC_STYLE, Message[ STR_MERGE_ITEMS ], SHOPKEEPER_SCREEN, ( UINT8 )MSG_BOX_FLAG_YESNO, MergeMessageBoxCallBack, NULL );
|
||||
}
|
||||
@@ -7773,7 +7773,7 @@ void SMInvMoneyButtonCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
//if we are in the shop keeper interface, free the cursor
|
||||
if( guiTacticalInterfaceFlags & INTERFACE_SHOPKEEP_INTERFACE )
|
||||
{
|
||||
FreeMouseCursor();
|
||||
FreeMouseCursor( TRUE );
|
||||
}
|
||||
|
||||
DoMessageBox( MSG_BOX_BASIC_STYLE, zText, SHOPKEEPER_SCREEN, ( UINT8 )MSG_BOX_FLAG_YESNO, ConfirmationToDepositMoneyToPlayersAccount, NULL );
|
||||
|
||||
@@ -1333,7 +1333,7 @@ BOOLEAN ExitShopKeeperInterface()
|
||||
DeleteItemDescriptionBox( );
|
||||
}
|
||||
|
||||
FreeMouseCursor();
|
||||
FreeMouseCursor( TRUE );
|
||||
|
||||
//Delete the main shopkeep background
|
||||
DeleteVideoObjectFromIndex( guiMainTradeScreenImage );
|
||||
@@ -4824,7 +4824,7 @@ void SetSkiCursor( UINT16 usCursor )
|
||||
|
||||
SetCurrentCursorFromDatabase( usCursor );
|
||||
|
||||
FreeMouseCursor();
|
||||
FreeMouseCursor( TRUE );
|
||||
|
||||
EnableAllDealersInventorySlots();
|
||||
EnableAllDealersOfferSlots();
|
||||
|
||||
@@ -193,6 +193,9 @@ extern INT16 ITEMDESC_START_Y;
|
||||
BOOLEAN gfMouseLockedOnBorder = FALSE;
|
||||
extern int iWindowedMode;
|
||||
|
||||
extern BOOLEAN gfInItemStackPopup;
|
||||
extern BOOLEAN gfInKeyRingPopup;
|
||||
|
||||
|
||||
//Little functions called by keyboard input
|
||||
void SwapGoggles(SOLDIERTYPE *pTeamSoldier);
|
||||
@@ -1605,25 +1608,26 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
||||
|
||||
// BEGIN: by Lejardo for mouse-locking in game screen
|
||||
// WANNE: If the game runs in windowed mode, the user can "lock" / "unlock" the mouse cursor
|
||||
if (iWindowedMode)
|
||||
if ( iWindowedMode && !gfInKeyRingPopup && !gfInItemStackPopup)
|
||||
{
|
||||
SGPRect LJDRect;
|
||||
if ((InputEvent.usEvent == KEY_DOWN ) && ( InputEvent.usParam == 'z' || InputEvent.usParam == 'y'))
|
||||
if ((InputEvent.usEvent == KEY_DOWN ) && InputEvent.usParam == 'z' )
|
||||
{
|
||||
if( (InputEvent.usKeyState & CTRL_DOWN) && !(InputEvent.usKeyState & ALT_DOWN))
|
||||
{
|
||||
// Unlock the mouse cursor
|
||||
if (gfMouseLockedOnBorder)
|
||||
{
|
||||
FreeMouseCursor();
|
||||
FreeMouseCursor( FALSE );
|
||||
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[MSG_WINDOWED_MODE_RELEASE_MOUSE] );
|
||||
}
|
||||
// Lock the mouse cursor
|
||||
else
|
||||
{
|
||||
{
|
||||
SGPRect LJDRect;
|
||||
|
||||
LJDRect.iLeft = 0;
|
||||
LJDRect.iTop = 0;
|
||||
LJDRect.iTop = 0;
|
||||
LJDRect.iRight = SCREEN_WIDTH;
|
||||
LJDRect.iBottom = SCREEN_HEIGHT;
|
||||
RestrictMouseCursor( &LJDRect );
|
||||
@@ -1631,8 +1635,8 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[MSG_WINDOWED_MODE_LOCK_MOUSE] );
|
||||
}
|
||||
|
||||
gfMouseLockedOnBorder = !gfMouseLockedOnBorder;
|
||||
}
|
||||
gfMouseLockedOnBorder = !gfMouseLockedOnBorder;
|
||||
}
|
||||
}
|
||||
}
|
||||
// END: by Lejardo for mouse-locking in game screen
|
||||
|
||||
Reference in New Issue
Block a user