glviewvol
diff src/xfer_view.cc @ 5:5417c25cb238
moving to a simpler transfer function
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 29 Dec 2014 15:59:55 +0200 |
parents | 04330eb80b36 |
children | f22be47a3572 |
line diff
1.1 --- a/src/xfer_view.cc Mon Dec 29 05:41:36 2014 +0200 1.2 +++ b/src/xfer_view.cc Mon Dec 29 15:59:55 2014 +0200 1.3 @@ -6,7 +6,7 @@ 1.4 static Renderer *rend; 1.5 1.6 static int act_color = 3; 1.7 -static CurvePoint *cpsel[3]; 1.8 +static CurvePoint *cpsel; 1.9 1.10 bool xfview_init(Renderer *rendarg) 1.11 { 1.12 @@ -109,13 +109,17 @@ 1.13 1.14 void xfview_button(int bn, int press, int x, int y) 1.15 { 1.16 - if(bn == 2 && press) { 1.17 + if(bn == 2 && press && !cpsel) { 1.18 act_color = (act_color + 1) % 4; 1.19 redisplay(); 1.20 return; 1.21 } 1.22 1.23 - if(press) { 1.24 + if(bn == 1) { 1.25 + if(press) { 1.26 + } else { 1.27 + cpsel = 0; 1.28 + } 1.29 } 1.30 } 1.31