ginput Right-double-click
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Annotations dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!