Mouse cursor/pointer invisible on full screen mode only
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have a Matlab program that runs an experimental paradigm via the Cogent toolbox. At the start of the code there is an if statement that defines whether Cogent opens in a window or as full screen. The problem I have is that the mouse cursor/pointer disappears when I open in full screen, but not when I open as a window. On investigation it appears that in full screen the cursor is still there (i.e I can record mouse button clicks) but it can't be seen on the screen. Presumably therefore the cursor is somehow set to invisible, or to the same colour as the background of the screen (black).
I've tried a few things using the SET statement to try and make the cursor visible but to no avail. I can't find a way to change the colour of the cursor using MatLab. Any ideas how I can solve this issue or at least troubleshoot it further? I've included the code below.
Alternatively it may be a bug with the cgopen statement, however I can't find any report of similar occurences and I can't open the cgopen code to have a look, as it is not in .m file format. Is there anywhere to get help on Cogent - no help address appears to be listed on their website/documentation.
Thanks Rob
if(iNumber>1000)
cgopen(1,0,0,1) %Full screen
rng('default') %Sets matlab rand functions to their default settings
set(0, 'visible', 'on') %added for troubleshooting, no diff if removed
set(gcf,'pointer','crosshair') %added for t-shooting, no diff if removed
mid_loc = [0; 0] %added for troubleshooting, no difference if removed
set(0, 'pointerlocation', mid_loc) %added for t-shooting, no diff if rmvd
else
cgopen(1,0,0,0) %640*480
end
0 Commenti
Risposte (2)
Eydrian
il 20 Ott 2015
cogent is a third party toolbox. You are trying to mix it with matlab graphic properties, this will never result in something useful. But there is a solution. The cogent mouse mode is exclusive to cogent by default and the cogent developers did not intend to give the user the possibility to change that fact. But you can cheat: after initializing the mouse but before starting cogent, you can set the mouse to nonexclusive:
...
config_mouse(10);
global cogent; % loads the global cogent variable
cogent.mouse.mode = 'nonexclusive';
...
start_cogent();
0 Commenti
Vedere anche
Categorie
Scopri di più su Environment and Settings in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!