This is an automated email from the git hooks/post-receive script. smcv pushed a commit to annotated tag 1.42d in repository iortcw.
commit aa0e81080f93aa95357286132158ac46314b224b Author: [email protected] <[email protected]@e65d2741-a53d-b2dc-ae96-bb75fa5e4c4a> Date: Mon Apr 28 02:40:59 2014 +0000 Fixed browser scrolling with mouse wheel..Hovering over scroll bar and spinning the wheel on the mouse will now scroll as it was suppose to. --- MP/code/ui/ui_shared.c | 61 ++++++++++++++++++++++++++++---------------------- MP/code/ui/ui_shared.h | 1 + 2 files changed, 35 insertions(+), 27 deletions(-) diff --git a/MP/code/ui/ui_shared.c b/MP/code/ui/ui_shared.c index 5beca18..e0c0479 100644 --- a/MP/code/ui/ui_shared.c +++ b/MP/code/ui/ui_shared.c @@ -2033,7 +2033,7 @@ qboolean Item_ListBox_HandleKey( itemDef_t *item, int key, qboolean down, qboole } } else { viewmax = ( item->window.rect.h / listPtr->elementHeight ); - if ( key == K_UPARROW || key == K_KP_UPARROW ) { + if ( key == K_UPARROW || key == K_KP_UPARROW || key == K_MWHEELUP ) { if ( !listPtr->notselectable ) { listPtr->cursorPos--; if ( listPtr->cursorPos < 0 ) { @@ -2055,7 +2055,7 @@ qboolean Item_ListBox_HandleKey( itemDef_t *item, int key, qboolean down, qboole } return qtrue; } - if ( key == K_DOWNARROW || key == K_KP_DOWNARROW ) { + if ( key == K_DOWNARROW || key == K_KP_DOWNARROW || key == K_MWHEELDOWN ) { if ( !listPtr->notselectable ) { listPtr->cursorPos++; if ( listPtr->cursorPos < listPtr->startPos ) { @@ -2080,6 +2080,8 @@ qboolean Item_ListBox_HandleKey( itemDef_t *item, int key, qboolean down, qboole } // mouse hit if ( key == K_MOUSE1 || key == K_MOUSE2 ) { + Item_ListBox_MouseEnter(item, DC->cursorx, DC->cursory); + if ( item->window.flags & WINDOW_LB_LEFTARROW ) { listPtr->startPos--; if ( listPtr->startPos < 0 ) { @@ -2616,8 +2618,7 @@ qboolean Item_Slider_HandleKey( itemDef_t *item, int key, qboolean down ) { } } } - } - DC->Print( "slider handle key exit\n" ); + } return qfalse; } @@ -2950,13 +2951,22 @@ void Menu_HandleKey( menuDef_t *menu, int key, qboolean down ) { Item_RunScript( &it, menu->onESC ); } break; - - case K_TAB: case K_KP_DOWNARROW: case K_DOWNARROW: Menu_SetNextCursorItem( menu ); break; + case K_KP_ENTER: + case K_ENTER: + case K_TAB: + if (trap_Key_IsDown(K_SHIFT)) { + Menu_SetPrevCursorItem(menu); + } + else { + Menu_SetNextCursorItem(menu); + } + break; + case K_MOUSE1: case K_MOUSE2: if ( item ) { @@ -2986,6 +2996,19 @@ void Menu_HandleKey( menuDef_t *menu, int key, qboolean down ) { } break; + case K_MOUSE3: + if (item) { + if (item->type == ITEM_TYPE_EDITFIELD || item->type == ITEM_TYPE_NUMERICFIELD) { + item->cursorPos = 0; + g_editingField = qtrue; + g_editItem = item; + } + else { + Item_Action(item); + } + } + break; + case K_JOY1: case K_JOY2: case K_JOY3: @@ -3006,20 +3029,7 @@ void Menu_HandleKey( menuDef_t *menu, int key, qboolean down ) { case K_AUX14: case K_AUX15: case K_AUX16: - break; - case K_KP_ENTER: - case K_ENTER: - case K_MOUSE3: - if ( item ) { - if ( item->type == ITEM_TYPE_EDITFIELD || item->type == ITEM_TYPE_NUMERICFIELD ) { - item->cursorPos = 0; - g_editingField = qtrue; - g_editItem = item; - } else { - Item_Action( item ); - } - } - break; + break; } } @@ -3756,10 +3766,10 @@ void Item_Slider_Paint( itemDef_t *item ) { x = item->window.rect.x; } DC->setColor( newColor ); - DC->drawHandlePic( x, y, SLIDER_WIDTH, SLIDER_HEIGHT, DC->Assets.sliderBar ); - - x = Item_Slider_ThumbPosition( item ); - DC->drawHandlePic( x - ( SLIDER_THUMB_WIDTH / 2 ), y - 2, SLIDER_THUMB_WIDTH, SLIDER_THUMB_HEIGHT, DC->Assets.sliderThumb ); + DC->drawHandlePic(x, y, SLIDER_WIDTH, SLIDER_HEIGHT, DC->Assets.sliderBar); + + x = Item_Slider_ThumbPosition(item); + DC->drawHandlePic(x - (SLIDER_THUMB_WIDTH / 2), y - 2, SLIDER_THUMB_WIDTH, SLIDER_THUMB_HEIGHT, DC->Assets.sliderThumb); } void Item_Bind_Paint( itemDef_t *item ) { @@ -4422,9 +4432,6 @@ void Item_Paint( itemDef_t *item ) { case ITEM_TYPE_LISTBOX: Item_ListBox_Paint( item ); break; -// case ITEM_TYPE_IMAGE: -// Item_Image_Paint(item); -// break; case ITEM_TYPE_MENUMODEL: Item_Model_Paint( item ); break; diff --git a/MP/code/ui/ui_shared.h b/MP/code/ui/ui_shared.h index 5b4ac43..a1ebb93 100644 --- a/MP/code/ui/ui_shared.h +++ b/MP/code/ui/ui_shared.h @@ -456,6 +456,7 @@ void Menu_PaintAll( void ); menuDef_t *Menus_ActivateByName( const char *p, qboolean modalStack ); void Menu_Reset( void ); qboolean Menus_AnyFullScreenVisible( void ); +qboolean trap_Key_IsDown(int keynum); void Menus_Activate( menuDef_t *menu ); displayContextDef_t *Display_GetContext( void ); -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

