Classic dialog boxes, round one... fight!


Aha! It speaks!

There's a lot of good dialog managers out there for Unity, but they tend to be really heavy, and since my logic and data is going to be in Clojure, I figured I'd just get that old-timey text box action working on my own. Oddly enough, it actually worked out the way I expected.

Anyway, this takes an arbitrary string and cuts it up by spaces (will need to tweak that logic for languages that don't use spaces), figures out when there should be a newline and adds it, and stops before it overruns the text box. This panel will need an indicator that there's more text and, obviously, the ability to wait for input and display the rest. Not tonight, though.

There's a separate panel that will display shorter messages on the top of the screen; that one will just pause before replacing the existing text, so that's slightly different.

No server component for this yet, but it's all IEnumerator goodness already anyway, so it's ready for queuing as soon as I teach the server to send messages. :D

Also, I haven't even made an effort to keep the various pixel sizes consistent. Which is eventually probably going to look silly, but that's yet another down-the-road-if-ever thing to worry about.

Leave a comment

Log in with itch.io to leave a comment.