diff options
author | Ton Roosendaal <ton@blender.org> | 2008-01-10 20:38:17 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-01-10 20:38:17 +0300 |
commit | 43cf3af8c07a534f06b14a003eef2fc65c3c937b (patch) | |
tree | 9a93be5e2e3b4abb969ce751f0b8aa7d4948d7f8 /source/blender/windowmanager/intern/wm_keymap.c | |
parent | b81b6be18458462939aefbb260ca6a68020131d4 (diff) |
Blender 2.5 project: added first more complex handler + operator
- on mouse-over edge, you can drag area borders around.
- note it's a handerized system now, so it updates UI while you
move mouse.
Feedback needed:
- read bottom part of the screen_edit.c file. It's the proposed
method for adding tools and handlers. I think it's close, but
might need some tweaks.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_keymap.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_keymap.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c index da340e35d79..7a5ec0e4d47 100644 --- a/source/blender/windowmanager/intern/wm_keymap.c +++ b/source/blender/windowmanager/intern/wm_keymap.c @@ -108,5 +108,16 @@ void WM_keymap_set_item(ListBase *lb, char *idname, short type, short val, int m keymap_set(km, type, val, modifier, keymodifier); } +/* always add item */ +void WM_keymap_add_item(ListBase *lb, char *idname, short type, short val, int modifier, short keymodifier) +{ + wmKeymapItem *km= MEM_callocN(sizeof(wmKeymapItem), "keymap entry"); + + BLI_addtail(lb, km); + BLI_strncpy(km->idname, idname, OP_MAX_TYPENAME); + + keymap_set(km, type, val, modifier, keymodifier); +} + |