Open andrew-peng-144 opened 3 years ago
should there be only one main text box? for this text dialogue?
Just can use hide/show for this, then set text. And it should automatically pace the characters and fill it line by line. Also it should parse escape sequences like @n to force to get on next line
Cannot have the text visually scroll upward, unless using a new canvas for text dialogue. So if we still want to keep using only 1 canvas, then instead, we just have the text fill all the lines, then clear all and restart from the top, like in Pokemon gen 3.
done lmao kinda. Text rendering works like pokemon gen 3 dialogue style. Controller functions seem to work properly. Can support many sizes, but the text string length must be calibrated manually as it doesn't calculate an ideal size for any width. Also only works with monospace fonts for now. Also supports escaping the dialogue which is stopping the text until the player advances.
Next step is to hook up the dialogue controller to activators. And also prevent player from advancing mid-sentence.
how text dialogue works: For each "phrase" or sentence:
draw characters starting from top left until the next word's chars would exceed horizontal max, then draw that word and next characters to next line... repeat until it hits the vertical max.
Then "scroll" upward one line (1st line chars visually move to offscreen upward, 2nd line chars to 1st line, etc) and draw the next characters onto the last line again.
Keep drawing horizontally and scrolling until end of phrase, and then draw a "pointer" to prompt user to press some key to advance text to NEXT phrase, which clears all text of this.