annotate listeningTest/multiComp/MmoveW.m @ 1:b64c9fb34bd0

Response folder included in package (put README in it).
author Brecht <b.deman@qmul.ac.uk>
date Wed, 30 Jul 2014 12:38:47 +0100
parents 4fd284285159
children
rev   line source
b@0 1 function MmoveW(hf)
b@0 2
b@0 3 dat=get(hf,'userdata');
b@0 4
b@0 5 if dat.drag
b@0 6 cobj=get(gcf,'currentobject');
b@0 7 if strcmp(get(cobj,'tag'),'sonicon')
b@0 8 cpos=get(gcf,'currentpoint');
b@0 9 posObj=get(cobj,'position');
b@0 10 dxx=dat.dxx;
b@0 11 cp=cpos(1);
b@0 12 if (cp<dxx)
b@0 13 cp=dxx;
b@0 14 end
b@0 15 if (cp>1-dxx)
b@0 16 cp=1-dxx;
b@0 17 end
b@0 18 posObj(1)=cp-posObj(3)/2;
b@0 19 set(cobj,'position',posObj);
b@0 20 end
b@0 21 end