Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Changing Cursor Colour

edited October 2017 in OpenSesame

Hello.
I have a simple N-back experiment with the background colour of the screen in black. When I run the experiment, the cursor also appears black and so unless the cursor goes over a response button on the screen (a white response box), I cannot see the cursor. Is there a way to change the cursor colour to white on OpenSesame? I've seen a previous thread suggesting to change the OS settings so that the cursor is white, but the default colour of the cursor as I am using it now is white so that didn't do the trick. Even if I changed the cursor colour on my OS to black, it didn't reverse it on the task, so I'm thinking that OpenSesame has a default cursor type and colour..? Anyway, if there is no way around this, the obvious thing to do would be to reverse the background and response button colours, but I was just curious if there is a way to reverse the cursor colour on OpenSesame.
Thanks.
Sadek

Comments

  • Hi Sadek,

    In the first item in the overview area (usually called Experiments), you can specify foreground and background color. Can you check whether you selected the right colors there? If this doesn't solve the problem, could you upload your experiment? Then, I can check myself what is going on.

    Eduard

  • Hi Eduard,
    Thanks for getting back to me, much appreciated. I've uploaded the experiment here. I've also tried switching the background to the appropriate colour (black) that would revert the mouse colour (to white) so it is identifiable, but it didn't work. This was the setting I had previously (under the first item in my overview: New Experiment Tab) but I also further played around with that and it did not work.
    Sadek

  • Hi Sadek,

    Sorry for the delay, it took me some time to get the mousetrap plugin installed.

    I looked at your experiment and to me it looks alright. The mouse is black, but there is a white frame drawn around it, so that you can always see it. Is this frame absent in your case?

    Changing the color of the mouse itself will be tricky as you would have to access code that is hidden deep in Opensesame (at least I couldn't find it in a reasonably short amount of time).

    Eduard

  • edited November 2017

    Hi Eduard,

    I am currently away from my work computer (I'll double check tomorrow), but yes I do distinctly recall seeing the white frame drawn around the black cursor, but I believe that I could only see that in the Quick Run mode and not in the Full Screen mode. The Full Screen mode had the cursor coloured black and with no white framed border.

    Given that it seems to be somewhere deep in OpenSesame code, should I perhaps bring it up in the "what you would like to see in OpenSesame" thread..? Or perhaps it's just best to revert the colours of the task. For me, it's not really a big issue to switch the task colours, but perhaps others may want to do the same in the future, and it would be great to have that flexibility with changing cursor colour.

    Any advice would be great.
    Thanks again,

    Sadek

  • Just checked on my computer and under the full screen mode the cursor doesn't have the white border around it. Only in the 'Run in Window' and 'Quick Run' mode was the cursor with a white-framed border.

  • Also, is there any way the cursor size could be any bigger?

  • Hi Sadek,

    Maybe it is worth to checkout different backends? It won't give you the possibility to customize the mouse, but the default values could be different and more acceptable for your case?

    Eduard

  • Also, I don't know how useful it is to you as you are using it in forms, but you can emulate a mouse with this python code here:

    cv = canvas() # make a canvas to present your stimuli
    ms = mouse() # create a mouse object
    ms.show_cursor(False) # set the visibility of the mouse to invisible
    while True: # during stimulus presentation
        cv.clear() # empty the canvas (removes previous mouse position)
        cv.rect(-100,-100,500,500) # draw some random stimulus
        (x,y),t = ms.get_pos() # get the current mouse position
        cv.circle(x,y,10, color= 'white', fill = True) # draw a little circle at that position (THE NEW MOUSE)
        cv.show() # show the canvas
        button, pos, tt = ms.get_click(timeout=2) # get the click
        if button != None: # if clicked, break the loop
            break
    

    It should do the trick, I think. You just have to modify your n-back task so that it can run from within an inline_script.

    Hope it helps.

    Eduard

  • Hi Eduard,

    Sorry for getting back so much later. Thanks a lot for your response. After changing the backend to xpyriment (it was on legacy), the fullscreen mode created the cursor with the white border around it which is perfectly fine. As for the inline script you wrote, I also tested that out and it works well in that it creates a new cursor (a circular one) that is completely white. So thanks a lot for the help there, I can now run the experiment with the black background. Otherwise, the only thing that would be awesome to have in updated versions of OpenSesame is some control in changing the colour of the cursor (the default pointer one) and to change its size if possible.

    Many thanks for all the help :D

    Sadek

Sign In or Register to comment.