From ee79b599ea4cc8e498c55abdb77e6b5e832febfe Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 5 Mar 2007 20:49:04 +0000 Subject: [PATCH] Small silly feature: menus in blender now scroll with mouse wheel. :) Note that activiting it works as if you used arrow keys, not with mouse. --- source/blender/src/interface.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c index 7d22be539f1..74ca4019dcf 100644 --- a/source/blender/src/interface.c +++ b/source/blender/src/interface.c @@ -4389,6 +4389,12 @@ static int ui_do_block(uiBlock *block, uiEvent *uevent) } } + /* inside menus, scrollwheel acts as arrow */ + if(block->flag & UI_BLOCK_LOOP) { + if(uevent->event==WHEELUPMOUSE) uevent->event= UPARROWKEY; + if(uevent->event==WHEELDOWNMOUSE) uevent->event= DOWNARROWKEY; + } + switch(uevent->event) { case LEFTARROWKEY: /* closing sublevels of pulldowns */ if(uevent->val && (block->flag & UI_BLOCK_LOOP) && block->parent) {