happymeal
14 years agoVisitor
Help with drawText
Hello,
I'm new to Roku development and using Brightscript, but hopefully I'm not asking something that is too stupid. I've scoured the forums and documentation before asking and not come up with any answers yet. A lot of the examples that come with the SDK cover moving sprites, but none really appear to cover text
First of all, just a general outline of what I'm trying to achieve. I want to create my own text fields using an roScreen + drawText functions. I immediately noticed that the documentation stated drawText was expensive to render. What is the alternative to using drawText if my text is not static? I'm basically out to create something similar to the roPosterScreen without being restricted by its layout. i.e. when you use the arrow keys to move through options, the text updates.
I've managed this ok, however have come across my first stumbling block. The text spans across multiple lines, however drawText does not seem to want to draw it over more lines. Is it a case of having to draw each line of text independently using drawText? if so, are there any easier text components to use that handle the word wrapping for you? I've also noticed, it does not recognise the new lines or '\n' in my text.
I'll try not to add too many questions in my first post, but this would be a good start. Thanks in advance for anyone replying.
I'm new to Roku development and using Brightscript, but hopefully I'm not asking something that is too stupid. I've scoured the forums and documentation before asking and not come up with any answers yet. A lot of the examples that come with the SDK cover moving sprites, but none really appear to cover text
First of all, just a general outline of what I'm trying to achieve. I want to create my own text fields using an roScreen + drawText functions. I immediately noticed that the documentation stated drawText was expensive to render. What is the alternative to using drawText if my text is not static? I'm basically out to create something similar to the roPosterScreen without being restricted by its layout. i.e. when you use the arrow keys to move through options, the text updates.
I've managed this ok, however have come across my first stumbling block. The text spans across multiple lines, however drawText does not seem to want to draw it over more lines. Is it a case of having to draw each line of text independently using drawText? if so, are there any easier text components to use that handle the word wrapping for you? I've also noticed, it does not recognise the new lines or '\n' in my text.
I'll try not to add too many questions in my first post, but this would be a good start. Thanks in advance for anyone replying.