- made option for auto open toolbox on left/mouse hold.

standard starts with 0.5 sec. Turn the threshold value up to effectively
  disable it when you dislike it. But give it a try!
- added 'Home' after splitting window for buttonswindow
This commit is contained in:
2003-10-29 01:10:10 +00:00
parent 5ea904faca
commit f3a809b09f
6 changed files with 45 additions and 17 deletions

View File

@@ -272,6 +272,10 @@ static void setup_app_data(BlendFileData *bfd, char *filename) {
U.menuthreshold1= 5; U.menuthreshold1= 5;
U.menuthreshold2= 2; U.menuthreshold2= 2;
} }
if(U.tb_leftmouse==0) {
U.tb_leftmouse= 5;
U.tb_rightmouse= 5;
}
} }
R.winpos= bfd->winpos; R.winpos= bfd->winpos;

View File

@@ -140,7 +140,8 @@ typedef struct UserDef {
short menuthreshold1, menuthreshold2; short menuthreshold1, menuthreshold2;
char fontname[64]; char fontname[64];
struct ListBase themes; struct ListBase themes;
short undosteps, pad0[3]; short undosteps, pad0;
short tb_leftmouse, tb_rightmouse;
struct SolidLight light[3]; struct SolidLight light[3];
} UserDef; } UserDef;

View File

@@ -5507,7 +5507,7 @@ void std_rmouse_transform(void (*xf_func)(int))
else { else {
PIL_sleep_ms(10); PIL_sleep_ms(10);
timer++; timer++;
if(timer>=10*U.menuthreshold1) { if(timer>=10*U.tb_rightmouse) {
toolbox_n(); toolbox_n();
return; return;
} }

View File

@@ -2225,7 +2225,7 @@ static short testsplitpoint(ScrArea *sa, char dir, float fac)
static void splitarea(ScrArea *sa, char dir, float fac) static void splitarea(ScrArea *sa, char dir, float fac)
{ {
bScreen *sc; bScreen *sc;
ScrArea *newa; ScrArea *newa=NULL;
ScrVert *sv1, *sv2; ScrVert *sv1, *sv2;
short split; short split;
@@ -2280,6 +2280,11 @@ static void splitarea(ScrArea *sa, char dir, float fac)
sa->v2= sv2; sa->v2= sv2;
} }
if(sa->spacetype==SPACE_BUTS) {
addqueue(sa->win, UI_BUT_EVENT, B_BUTSHOME);
addqueue(newa->win, UI_BUT_EVENT, B_BUTSHOME);
}
/* remove double vertices en edges */ /* remove double vertices en edges */
removedouble_scrverts(); removedouble_scrverts();
removedouble_scredges(); removedouble_scredges();

View File

@@ -252,7 +252,7 @@ int gesture(void)
/* not drawing yet... check for toolbox */ /* not drawing yet... check for toolbox */
PIL_sleep_ms(10); PIL_sleep_ms(10);
timer++; timer++;
if(timer>=10*U.menuthreshold1) { if(timer>=10*U.tb_leftmouse) {
toolbox_n(); toolbox_n();
return 1; return 1;
} }

View File

@@ -2003,6 +2003,37 @@ void drawinfospace(ScrArea *sa, void *spacedata)
"Time in 1/10 seconds for auto open sublevels"); "Time in 1/10 seconds for auto open sublevels");
uiDefBut(block, LABEL,0,"Toolbox Thresh.:",
(xpos+edgespace+(3*midspace)+(3*medprefbut)),y3label,medprefbut,buth,
0, 0, 0, 0, 0, "");
uiDefButS(block, NUM, 0, "LMB:",
(xpos+edgespace+(3*midspace)+(3*medprefbut)),y2,smallprefbut,buth,
&(U.tb_leftmouse), 2, 40, 0, 0,
"Time in 1/10 seconds leftmouse hold to open toolbox");
uiDefButS(block, NUM, 0, "RMB:",
(xpos+edgespace+(3*midspace)+(3*medprefbut)),y1,smallprefbut,buth,
&(U.tb_rightmouse), 2, 40, 0, 0,
"Time in 1/10 seconds for rightmouse to open toolbox");
uiDefBut(block, LABEL,0,"View rotation:",
(xpos+edgespace+(3*midspace)+(3*medprefbut)+smallprefbut+2),y3label,medprefbut,buth,
0, 0, 0, 0, 0, "");
uiDefButS(block, TOG|BIT|5, B_DRAWINFO, "Trackball",
(xpos+edgespace+(3*midspace)+(3*medprefbut)+smallprefbut+2),y2,(smallprefbut+2),buth,
&(U.flag), 0, 0, 0, 0,
"Use trackball style rotation with middle mouse button");
uiDefButS(block, TOGN|BIT|5, B_DRAWINFO, "Turntable",
(xpos+edgespace+(3*midspace)+(3*medprefbut)+smallprefbut+2),y1,(smallprefbut+2),buth,
&(U.flag), 0, 0, 0, 0,
"Use turntable style rotation with middle mouse button");
uiDefButS(block, TOGN|BIT|10, B_DRAWINFO, "Rotate View", uiDefButS(block, TOGN|BIT|10, B_DRAWINFO, "Rotate View",
(xpos+edgespace+(4*midspace)+(4*medprefbut)),y2,(smallprefbut+2),buth, (xpos+edgespace+(4*midspace)+(4*medprefbut)),y2,(smallprefbut+2),buth,
&(U.flag), 0, 0, 0, 0, "Default action for the middle mouse button"); &(U.flag), 0, 0, 0, 0, "Default action for the middle mouse button");
@@ -2021,19 +2052,6 @@ void drawinfospace(ScrArea *sa, void *spacedata)
uiDefBut(block, LABEL,0,"View rotation method:",
(xpos+edgespace+(3*midspace)+(3*medprefbut)),y3label,medprefbut,buth,
0, 0, 0, 0, 0, "");
uiDefButS(block, TOG|BIT|5, B_DRAWINFO, "Trackball",
(xpos+edgespace+(3*midspace)+(3*medprefbut)),y2,(smallprefbut+2),buth,
&(U.flag), 0, 0, 0, 0,
"Use trackball style rotation with middle mouse button");
uiDefButS(block, TOGN|BIT|5, B_DRAWINFO, "Turntable",
(xpos+edgespace+(3*midspace)+(3*medprefbut)+smallprefbut+2),y2,(smallprefbut+2),buth,
&(U.flag), 0, 0, 0, 0,
"Use turntable style rotation with middle mouse button");
uiDefBut(block, LABEL,0,"Mousewheel:", uiDefBut(block, LABEL,0,"Mousewheel:",
(xpos+edgespace+(4*midspace)+(5*medprefbut)),y3label,medprefbut,buth, (xpos+edgespace+(4*midspace)+(5*medprefbut)),y3label,medprefbut,buth,