diff options
author | Matt Ebb <matt@mke3.net> | 2004-07-16 05:34:19 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2004-07-16 05:34:19 +0400 |
commit | 688a6de8789989522d1faf61349fc864b962137e (patch) | |
tree | 79f005679d1ab69037c520e5ef7cd9973e660be4 /source/blender/src/editsound.c | |
parent | e926d392a8dbfc06bbd1670ce11a750ce15a1170 (diff) |
* User preference to select with the left mouse button
instead of right.
This basically swaps left and right, in most window spaces
so you can choose between:
LMB: Cursor/time slider/paint - RMB: Select
or LMB: Select - RMB: Cursor/time slider/paint
Aimed at:
1. Newbies
2. 1 button mouse mac users
3. People like me who are sick of having to constantly keep putting their brains into different modes when
switching between other apps and Blender :)
Yes, the User Preferences window is a bit of a nightmare
now, a layout cleanup will be forthcoming soon...
Diffstat (limited to 'source/blender/src/editsound.c')
-rw-r--r-- | source/blender/src/editsound.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/src/editsound.c b/source/blender/src/editsound.c index 8f384da000b..b9695881068 100644 --- a/source/blender/src/editsound.c +++ b/source/blender/src/editsound.c @@ -58,6 +58,7 @@ #include "DNA_scene_types.h" #include "DNA_sound_types.h" #include "DNA_packedFile_types.h" +#include "DNA_userdef_types.h" #include "BKE_utildefines.h" #include "BKE_global.h" @@ -108,6 +109,7 @@ void winqreadsoundspace(ScrArea *sa, void *spacedata, BWinEvent *evt) float dx, dy; int doredraw= 0, cfra, first = 0; short mval[2], nr; + short mousebut = L_MOUSE; if(curarea->win==0) return; @@ -115,6 +117,17 @@ void winqreadsoundspace(ScrArea *sa, void *spacedata, BWinEvent *evt) if( uiDoBlocks(&curarea->uiblocks, event)!=UI_NOTHING ) event= 0; + /* swap mouse buttons based on user preference */ + if (U.flag & USER_LMOUSESELECT) { + if (evt->event == LEFTMOUSE) { + event = RIGHTMOUSE; + mousebut = L_MOUSE; + } else if (evt->event == RIGHTMOUSE) { + event = LEFTMOUSE; + mousebut = R_MOUSE; + } + } + switch(event) { case LEFTMOUSE: ssound->flag |= SND_CFRA_NUM; @@ -133,7 +146,7 @@ void winqreadsoundspace(ScrArea *sa, void *spacedata, BWinEvent *evt) force_draw_plus(SPACE_VIEW3D); } - } while(get_mbut()&L_MOUSE); + } while(get_mbut() & mousebut); ssound->flag &= ~SND_CFRA_NUM; doredraw= 1; |