[open] draw_text
Sorry, I placed the question in the wrong forum (OpenSesam).
The question is how one can manage word wrap in libscreen.draw_text. In psychopy / visual it's possible to use wrapWidth=xxx,
but there is no way to arrange for this in lib_screen.
Thanks for answering this question.
Comments
Hi,
There's no direct way to do this, but you could hack into PyGaze to set the wrap width with PsychoPy directly. The thing to know is that when you call
Screen.draw_text, PyGaze creates apsychopy.visual.TextStimand appends it toScreen.screen, which is alist. So I think you could do something like this. Of course, this assumes that you're using the psychopy disttype in PyGaze.Warning: This is blindly coded and untested, just to show the general idea!
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi,
As @sebastiaan mentioned, if you are using the PsychoPy DISPTYPE, you can manipulate the psychopy.visual instances in the my_screen.screen list.
For both PsychoPy and PyGame, you can include "\n" in your text. This will insert a newline wherever you put it. For example, "You won!\nThanks for participanting!\n\n(press space to exit)" will look like the following:
Good luck!
Edwin