Platform: Visual Studio - LUA
OS: Windows 11
I'm a novice at this and am self-teaching everything I have learned thus far. As I am building pieces of a project and putting them together, I am now at a stage of displaying some text boxes on a screen and am needing some guidance or tips.
I'm putting this out here incase some other novice like myself might have a similar situation and might find this information useful.
Brief context, this is a utility program for performing Tarot readings. We are programming the screen that you can use to scroll through the dealt cards to review position meanings and card meanings.
Here is my screen:
In the top center we have a list-style gridview and you use the D-pad up / down to swap which position you are reviewing. On changing the selected cell in the gridview, we have the screen redrawn to show the new data. I want the rest of the boxes to update to show the following data:
Left side for Position Data. Right side for Card Data. Top boxes for Label, bottom box for data.
I have all the data accessible via variable and stored within the code, so writing the data should be easy enough, but here's where I come to the limit of my knowledge.
I see the two main functions drawText and drawTextInRect. In both of those I read that the text will be truncated if it does not fit in the space outlined in the draw function.
How does one handle scrollable text? The top boxes I'm not worried about, but the bottom boxes could potentially have several paragraphs of text that could scroll off the screen, especially if we draw it large enough to read comfortably. I would like to use the crank for someone to scroll both pages and be able to read the text.
I've been scanning through the drawing text section of the SDK and either I'm missing the context, or maybe it's somewhere in a different section?
I've also read about the performance hits that come with drawTextInRect. This program is very static and doesn't have a ton happening on the screen at any given time. So I should be fine to use the drawTextInRect function right?
Since the user could flick through the positions to find the one they need, forcing several screen redraws in the process, should we consider handling this whole process differently?
Thank you for your time and consideration,