Greetings all -
Seeking some implementation wisdom. I can post code if it helps, but my question is more at the implementation level than specific syntax.
I have a scene with two windows. One window pulls a list of actors in a specific state. This is a command window that the player can scroll through.
The second window dynamically generates information (essentially an NPC detail page) based on the actor currently selected.
One of the things I'm putting on that detail page is the actor.profile() segment. I use the DrawTextEx for this. Unforutnately, as soon as I do, the frame rate drops to terminal levels, and I can barely even navigate through the list any more. I can truncate the profile to 100 characters and it works fine, but I start pushing 200 and I've got problems. Some of these profiles may have upwards of 500 characters.
I'm currently drawing this content in the .refresh() function of the detail window. To me, it seemed reasonable since I want the text to change when a new ._index is selected from the command window.
My question is two-fold:
1) Is this behavior expected? If not, I can post code and we can work through what I've done wrong...
2) If it is expected (and seems reasonable that it would be), is there a better way to draw large volumes of text on a page than using the DrawTextEx feature in the window.refresh()?
Thanks in advance!
EDIT: I suppose I can try calculating the selected actor and pulling the text at the Scene level. Then do my update during initialize (and open/close windows instead of using refresh). That would save wear and tear on the refresh, but it feels a little clunky.
Still very interested in other people's thoughts.
Seeking some implementation wisdom. I can post code if it helps, but my question is more at the implementation level than specific syntax.
I have a scene with two windows. One window pulls a list of actors in a specific state. This is a command window that the player can scroll through.
The second window dynamically generates information (essentially an NPC detail page) based on the actor currently selected.
One of the things I'm putting on that detail page is the actor.profile() segment. I use the DrawTextEx for this. Unforutnately, as soon as I do, the frame rate drops to terminal levels, and I can barely even navigate through the list any more. I can truncate the profile to 100 characters and it works fine, but I start pushing 200 and I've got problems. Some of these profiles may have upwards of 500 characters.
I'm currently drawing this content in the .refresh() function of the detail window. To me, it seemed reasonable since I want the text to change when a new ._index is selected from the command window.
My question is two-fold:
1) Is this behavior expected? If not, I can post code and we can work through what I've done wrong...
2) If it is expected (and seems reasonable that it would be), is there a better way to draw large volumes of text on a page than using the DrawTextEx feature in the window.refresh()?
Thanks in advance!
EDIT: I suppose I can try calculating the selected actor and pulling the text at the Scene level. Then do my update during initialize (and open/close windows instead of using refresh). That would save wear and tear on the refresh, but it feels a little clunky.
Still very interested in other people's thoughts.