mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Editor Fixes (by Buggler)
- Fixed unable to delete items in Merc Inventory Display screen - Added keyboard hotkey item scrolling in Merc Inventory Selection screen git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5965 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2054,7 +2054,7 @@ void HandleKeyboardShortcuts( )
|
||||
break;
|
||||
case ',':
|
||||
// item left scroll
|
||||
if( iCurrentTaskbar == TASK_ITEMS )
|
||||
if( iCurrentTaskbar == TASK_ITEMS || gubCurrMercMode == MERC_GETITEMMODE )
|
||||
{
|
||||
if( eInfo.sScrollIndex )
|
||||
{
|
||||
@@ -2080,7 +2080,7 @@ void HandleKeyboardShortcuts( )
|
||||
break;
|
||||
case '.':
|
||||
// item right scroll
|
||||
if( iCurrentTaskbar == TASK_ITEMS )
|
||||
if( iCurrentTaskbar == TASK_ITEMS || gubCurrMercMode == MERC_GETITEMMODE )
|
||||
{
|
||||
if( eInfo.sScrollIndex < max( ((eInfo.sNumItems+1)/2)-6, 0) )
|
||||
{
|
||||
@@ -2105,7 +2105,7 @@ void HandleKeyboardShortcuts( )
|
||||
break;
|
||||
case '<':
|
||||
// item left scroll by page
|
||||
if( iCurrentTaskbar == TASK_ITEMS )
|
||||
if( iCurrentTaskbar == TASK_ITEMS || gubCurrMercMode == MERC_GETITEMMODE )
|
||||
{
|
||||
if( eInfo.sScrollIndex )
|
||||
{
|
||||
@@ -2124,7 +2124,7 @@ void HandleKeyboardShortcuts( )
|
||||
break;
|
||||
case '>':
|
||||
// item right scroll by page
|
||||
if( iCurrentTaskbar == TASK_ITEMS )
|
||||
if( iCurrentTaskbar == TASK_ITEMS || gubCurrMercMode == MERC_GETITEMMODE )
|
||||
{
|
||||
if( eInfo.sScrollIndex < max( ((eInfo.sNumItems+1)/2)-6, 0) )
|
||||
{
|
||||
@@ -2176,7 +2176,7 @@ void HandleKeyboardShortcuts( )
|
||||
{
|
||||
case ',':
|
||||
// item left scroll
|
||||
if( iCurrentTaskbar == TASK_ITEMS )
|
||||
if( iCurrentTaskbar == TASK_ITEMS || gubCurrMercMode == MERC_GETITEMMODE )
|
||||
{
|
||||
if( eInfo.sScrollIndex )
|
||||
{
|
||||
@@ -2195,7 +2195,7 @@ void HandleKeyboardShortcuts( )
|
||||
break;
|
||||
case '.':
|
||||
// item right scroll
|
||||
if( iCurrentTaskbar == TASK_ITEMS )
|
||||
if( iCurrentTaskbar == TASK_ITEMS || gubCurrMercMode == MERC_GETITEMMODE )
|
||||
{
|
||||
if( eInfo.sScrollIndex < max( ((eInfo.sNumItems+1)/2)-6, 0) )
|
||||
{
|
||||
@@ -2213,7 +2213,7 @@ void HandleKeyboardShortcuts( )
|
||||
break;
|
||||
case '<':
|
||||
// item left scroll by page
|
||||
if( iCurrentTaskbar == TASK_ITEMS )
|
||||
if( iCurrentTaskbar == TASK_ITEMS || gubCurrMercMode == MERC_GETITEMMODE )
|
||||
{
|
||||
if( eInfo.sScrollIndex )
|
||||
{
|
||||
@@ -2229,7 +2229,7 @@ void HandleKeyboardShortcuts( )
|
||||
break;
|
||||
case '>':
|
||||
// item right scroll by page
|
||||
if( iCurrentTaskbar == TASK_ITEMS )
|
||||
if( iCurrentTaskbar == TASK_ITEMS || gubCurrMercMode == MERC_GETITEMMODE )
|
||||
{
|
||||
if( eInfo.sScrollIndex < max( ((eInfo.sNumItems+1)/2)-6, 0) )
|
||||
{
|
||||
|
||||
@@ -7677,12 +7677,20 @@ BOOLEAN CreateItem( UINT16 usItem, INT16 bStatus, OBJECTTYPE * pObj )
|
||||
if ( GetItemFromRandomItem(usItem, &newitemfromrandom) )
|
||||
usItem = newitemfromrandom;
|
||||
|
||||
#ifdef JA2EDITOR
|
||||
|
||||
// Buggler: usItem == 0 is technically an item too, so need to run code to delete existing item in editor/merc inventory mode
|
||||
|
||||
#else //non-editor version
|
||||
|
||||
if (usItem == 0)
|
||||
{
|
||||
DebugBreakpoint();
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (Item[ usItem ].usItemClass == IC_GUN)
|
||||
{
|
||||
fRet = CreateGun( usItem, bStatus, pObj );
|
||||
|
||||
Reference in New Issue
Block a user