juliencegarra / OpenMATB

OpenMATB: A Multi-Attribute Task Battery promoting task customization, software extendability and experiment replicability
Other
43 stars 32 forks source link

Adjust the overall background colour of the interface #30

Closed Menglongwinnie closed 1 year ago

Menglongwinnie commented 1 year ago

Hello, Thank you so much for your work. It has been a great help to me. However, I have a problem that I need your help with. When I was analysing the fixation data from the MATB task using the eye-tracking device, I found that the fixation mapping was not accurate due to the background colour being too bright. I deduced that this could be solved by darkening the MATB background colour. So I would like to ask if it is possible to adjust the overall background colour of the interface and how to do this. I look forward to hearing from you.

benoitvalery commented 1 year ago

Hi, it is possible to change to overall color setting of the MATB in the core/constants.py file. There, you have a BACKGROUND constant that you can set to the desired color (l. 17).

For instance :

BACKGROUND=(150, 150, 150, 255)

will give you something darker.

Note that you might need to adjust some other colors to get something coherent: for instance, you might have to adjust the RED color to contrast it to the darker background. The limit is that, for now, you can only adjust colors, and not the color of each element. For instance, you cannot adjust independently the color of the tracking cursor (RED) and the color of a negative feedback (also RED). If you want to do that, you will have to dive into the code and find where each element color is set.

Do not hesitate to ask more if you you need

Menglongwinnie commented 1 year ago

1 Hello, with your help I have figured out how to change the background colour but haven't managed to implement it yet.

This is because I was previously working on v1.1, which does not allow me to change the colour in the same way as the current latest version.

I have installed python 3.9, third-part libraries and created a virtual environment as per the installation prompts for the latest version, but the following problem occurs when executing the new version.

benoitvalery commented 1 year ago

There was a minor bug in core/utils.py, now fixed by the last commit. Please check the last master version and see if it works for you.

Menglongwinnie commented 1 year ago

I've just re-downloaded the code again and it's working fine, thank you so much for your answers, they've been very helpful.

Menglongwinnie commented 1 year ago

Hi, there is another question I need to ask you. After connecting the joystick, I have the problem shown in the picture. 微信图片_20230711172909 The joystick I'm using is trustmaster, which runs without problems on v1.1 of the MATB software.

benoitvalery commented 1 year ago

The last commit solves this issue. See the version 1.3.0 in releases,