Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-12-14 05:38:29 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-12-14 05:38:29 +0300
commit35f431b3d0edda651fda97cb0156181fab07562c (patch)
tree463161e5b71e2842ff16e9baf33b925aa872e9e4 /source/blender/editors/interface/interface_intern.h
parent17bd906de3ba02c8d7bf848b1f61465f09fc631c (diff)
Menu UI feature common in other widget sets:
Automatically assign menu keys based on name, alternative to pressing number 0-9 on menus items. keys are assigned by first giving each menu item the first character of any word, if that fails any key in the name is used. - active key is shown underlined. - only ascii keys are assigned currently. - can run operators, open menu items. - currently this only works in cases where number buttons were used (UI_BLOCK_NUMSELECT), but could be enabled for file menu, splash etc by removing this check.
Diffstat (limited to 'source/blender/editors/interface/interface_intern.h')
-rw-r--r--source/blender/editors/interface/interface_intern.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index a7c03a6b95d..72f6e72cd5d 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -237,9 +237,10 @@ struct uiBut {
struct IDProperty *opproperties;
struct PointerRNA *opptr;
short opcontext;
-
+ unsigned char menu_key; /* 'a'-'z', always lower case */
+
/* Draggable data, type is WM_DRAG_... */
- short dragtype;
+ char dragtype;
void *dragpoin;
struct ImBuf *imb;
float imb_scale;