diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2009-03-11 23:22:06 +0300 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2009-03-11 23:22:06 +0300 |
commit | c8583cac700329659487edd96a1b2f0c6b1af39e (patch) | |
tree | e1aa726106a0cd6262b95d0f148051bc9b038235 /source/blender/windowmanager | |
parent | 64512d3e8e9f950b8249deb506eb243345dc107e (diff) |
2.5 / Area management
* Add Area Swap: hold alt and drag with LMB from either actionzone. Release LMB on area you want to swap with. I added a matching cute cursor for this (and to make it a politically delicate issue, it's white on black).
Note, there are still some error totblocks that I haven't been able to track down properly yet, so that's still a bit WIP.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_cursors.c | 32 | ||||
-rw-r--r-- | source/blender/windowmanager/wm_cursors.h | 1 | ||||
-rw-r--r-- | source/blender/windowmanager/wm_window.h | 2 |
3 files changed, 33 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c index d1c268a1189..2c7493a51ab 100644 --- a/source/blender/windowmanager/intern/wm_cursors.c +++ b/source/blender/windowmanager/intern/wm_cursors.c @@ -935,6 +935,38 @@ BlenderCursor[BC_EYEDROPPER_CURSOR]=&EyedropperCursor; END_CURSOR_BLOCK +/********************** Swap Area Cursor ***********************/ +BEGIN_CURSOR_BLOCK +static char swap_sbm[]={ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0x07, 0xff, 0x07, + 0xff, 0x07, 0xff, 0x07, 0xff, 0x07, 0xff, 0x07, + 0xff, 0x07, 0xff, 0x07, 0xff, 0x07, 0xff, 0x07, +}; + +static char swap_smsk[]={ + 0xc0, 0xff, 0xc0, 0xff, 0xc0, 0xff, 0xc0, 0xff, + 0xc0, 0xff, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xff, 0x07, + 0xff, 0x07, 0xff, 0x07, 0xff, 0x07, 0xff, 0x07, +}; + +static BCursor SwapCursor = { + /*small*/ + swap_sbm, swap_smsk, + 16, 16, + 8, 8, + /*big*/ + NULL, NULL, + 32,32, + 15, 15, + /*color*/ + BC_YELLOW, BC_BLUE +}; + +BlenderCursor[BC_SWAPAREA_CURSOR]=&SwapCursor; + +END_CURSOR_BLOCK /********************** Put the cursors in the array ***********************/ diff --git a/source/blender/windowmanager/wm_cursors.h b/source/blender/windowmanager/wm_cursors.h index 096e1916fa9..1a1a0d0b71d 100644 --- a/source/blender/windowmanager/wm_cursors.h +++ b/source/blender/windowmanager/wm_cursors.h @@ -92,6 +92,7 @@ enum { BC_NS_SCROLLCURSOR, BC_EW_SCROLLCURSOR, BC_EYEDROPPER_CURSOR, + BC_SWAPAREA_CURSOR, /* --- ALWAYS LAST ----- */ BC_NUMCURSORS, }; diff --git a/source/blender/windowmanager/wm_window.h b/source/blender/windowmanager/wm_window.h index f386510a2eb..7bf08617fb6 100644 --- a/source/blender/windowmanager/wm_window.h +++ b/source/blender/windowmanager/wm_window.h @@ -52,13 +52,11 @@ void wm_window_set_title (wmWindow *win, char *title); void wm_window_swap_buffers (wmWindow *win); wmWindow *wm_window_copy (bContext *C, wmWindow *winorig); -wmWindow *wm_window_rip (bContext *C, wmWindow *winorig); void wm_window_testbreak (void); /* *************** window operators ************** */ int wm_window_duplicate_op (bContext *C, wmOperator *op); -int wm_window_rip_op (bContext *C, wmOperator *op, struct wmEvent *event); int wm_window_fullscreen_toggle_op(bContext *C, wmOperator *op); |