[Bf-committers] Menu code bug/weirdness

Chris Want bf-committers@blender.org
Sat, 21 Feb 2004 09:22:02 -0700


First of all, thanks zaz for your patch, seems to work fine.
I learned something too: I didn't realise there was a qsort
function in the C standard library. Glad to know there is
somebody else looking at this stuff too!

Ton Roosendaal wrote:

> 2. an option to alphabetize menu options; something I have to look at  
> how to include in in API, but I can use the code Todd provided for it.

I'm not sure this is necessary... would probably be quicker for
the calling function to do the sorting. That said though, I
suppose it would make coding a lot easier.

> 3. the current menubutton API doesn't provide control for what the  
> desired default direction for a menu is. I will add that.

Great!

> 4. the flipping of items convention...
> With the introduction of pulldowns in Blender, and the new toolbox, I  
> stumbled on this issue. At first the items were not flipped when a menu  
> flipped, which I found very confusing. Look for example at the "Add"  
> menu in the top header, versus the "Add" in SpaceBar menu. Or when you  
> browse for a new Material, check for the "ADD NEW" item.
> 
> Having the first item closest to the mouse position seems to me most  
> logical. You memorize the order by moving the mouse a couple of items  
> up or down. But apparently this only is valid for when menus have fixed  
> items, and are not too long.

I find it weird ... all other programs don't flip and I'm used to
that. Plus with the 'Add' menu example ... 'Armature' is always
really far away from my mouse button (and in the top menu it
doesn't exist at all).

> For very long listings, such all bones in an armature, the Blender  
> pulldowns don't work well. We could adopt the OSX convention, where you  
> can scroll inside of a pulldown, with an arrow icon in top and/or  
> bottom to indicate you can scroll. That way the usage of a 'DataBrowse'  
> can become optional (or obsolete) too.

I think I prefer the multicolumn menu like it is now ... I have
tried other apps that have the top/bottom arrow scrolling
(e.g., my bookmarks menu on mozilla) and I find it does not yeild
good workflow, and I often accidentally activate the scrolling
when I don't want to.

> Coincidentally, I had a long debate on this with Phase on IRC  
> yesterday! :) He didn't like this flipping at all... but he could live  
> with solutions as proposed here.

Phase is a wise man ... flipping is weird.

Chris