mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Editor Fixes (by Buggler)
- Fixed item deletion from item pool when no item selected - Added Shift, Ctrl, Ctrl+Shift hotkeys to item scrolling click - Fixed Rdn button not depressed upon clicking other item buttons - Fixed B, R, S text not shown for random items git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5949 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -798,7 +798,18 @@ void ItemsLeftScrollCallback(GUI_BUTTON *btn, INT32 reason)
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
gfRenderTaskbar = TRUE;
|
||||
eInfo.sScrollIndex--;
|
||||
if (_KeyDown( 17 ) ) // CTRL
|
||||
{
|
||||
if (_KeyDown( 16 ) ) // SHIFT
|
||||
eInfo.sScrollIndex = 0;
|
||||
else
|
||||
eInfo.sScrollIndex = __max(eInfo.sScrollIndex - 60, 0);
|
||||
}
|
||||
else if (_KeyDown( 16 ) ) // SHIFT
|
||||
eInfo.sScrollIndex = __max(eInfo.sScrollIndex - 6, 0);
|
||||
else
|
||||
eInfo.sScrollIndex--;
|
||||
|
||||
if( !eInfo.sScrollIndex )
|
||||
DisableButton( iEditorButton[ITEMS_LEFTSCROLL] );
|
||||
if( eInfo.sScrollIndex < ((eInfo.sNumItems+1)/2)-6 )
|
||||
@@ -811,7 +822,18 @@ void ItemsRightScrollCallback(GUI_BUTTON *btn, INT32 reason)
|
||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||
{
|
||||
gfRenderTaskbar = TRUE;
|
||||
eInfo.sScrollIndex++;
|
||||
if (_KeyDown( 17 ) ) // CTRL
|
||||
{
|
||||
if (_KeyDown( 16 ) ) // SHIFT
|
||||
eInfo.sScrollIndex = max( ((eInfo.sNumItems+1)/2)-6, 0);
|
||||
else
|
||||
eInfo.sScrollIndex = __min(eInfo.sScrollIndex + 60, (eInfo.sNumItems+1)/2-6);
|
||||
}
|
||||
else if (_KeyDown( 16 ) ) // SHIFT
|
||||
eInfo.sScrollIndex = __min(eInfo.sScrollIndex + 6, (eInfo.sNumItems+1)/2-6);
|
||||
else
|
||||
eInfo.sScrollIndex++;
|
||||
|
||||
EnableButton( iEditorButton[ITEMS_LEFTSCROLL] );
|
||||
if( eInfo.sScrollIndex == max( ((eInfo.sNumItems+1)/2)-6, 0) )
|
||||
DisableButton( iEditorButton[ITEMS_RIGHTSCROLL] );
|
||||
|
||||
Reference in New Issue
Block a user