Adding CTRL stepping for Edgeslide. Mouse control is still not finished here, this is just a temporary fix until it can be done right.

This commit is contained in:
Johnny Matthews 2005-07-14 19:44:10 +00:00
parent 3929802335
commit fc0c2ef251

@ -4419,12 +4419,22 @@ void EdgeSlide(short immediate, float imperc){
}
if(mval[0] > mvalo[0]){
if(perc < 0.94)
perc += 0.05;
if(G.qual==LR_CTRLKEY){
if(perc < 0.91)
perc += 0.1;
} else {
if(perc < 0.99)
perc += 0.01;
}
} else if(mval[0] < mvalo[0]){
if(perc > -0.94)
perc -= 0.05;
if(G.qual==LR_CTRLKEY){
if(perc > -0.91)
perc -= 0.1;
} else {
if(perc > -0.99)
perc -= 0.01;
}
}
mvalo[0] = mval[0];
@ -4434,7 +4444,6 @@ void EdgeSlide(short immediate, float imperc){
unsigned short val=0;
event= extern_qread(&val); // extern_qread stores important events for the mainloop to handle
/* val==0 on key-release event */
if(val && ((event==ESCKEY || event==PADENTER)|| ( event==LEFTMOUSE || event==RETKEY ))){
draw = 0;
@ -4442,14 +4451,6 @@ void EdgeSlide(short immediate, float imperc){
if(val && (event==RIGHTMOUSE || event==ESCKEY || (event==MIDDLEMOUSE) )){
perc = 0;
immediate = 1;
}
if(val && (event==UPARROWKEY)){
if(perc < 0.94)
perc += 0.05;
}
if(val && (event==DOWNARROWKEY)){
if(perc > -0.94)
perc -= 0.05;
}
}
} else {