ginput Right-double-click
조회 수: 2 (최근 30일)
이전 댓글 표시
So I've created a GUI that allows you to sync data to a video and mark specific points on the data that correspond to moments on the video. I'm having an issue with ginput() that is fairly odd. When I left click, it rolls back the video (expected). When I right click, the video goes foreword (expected). If I add in an
elseif button == 0
disp('works correctly')
it does whatever it's supposed to when a left-double-click occurs. But when I try to go foreword multiple times very quickly by right clicking (double-click speed) it rolls the video backward.
As far as I know there is no right-double-click option for ginput, but it seems like that's what's happening.
[~,y,button] = ginput(1);
if isempty(button)
return
end
while button ~= 2
change = (y - yLim(1))/(yLim(2) - yLim(1));
if button == 1
PlayerWindow.controls.currentPosition = PlayerWindow.controls.currentPosition - change;
elseif button == 3
PlayerWindow.controls.currentPosition = PlayerWindow.controls.currentPosition + change;
elseif isempty(button)
return
end
[~,y,button] = ginput(1);
% get next input
end
end
I realize it could also be an issue with the ActiveX controls I'm using for the video player, but I can't think of why.
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!