How do I put a chat input on screen like part of the hud, if that's even possible?
|
Made this for ya.
var/list/max_lines = 10 |
How do I put a chat input on screen like part of the hud, if that's even possible?
|
Made this for ya.
var/list/max_lines = 10 |
http://www.byond.com/docs/ref/info.html#/atom/var/maptext
I'm currently on my phone so nice examples aren't a thing... ..but yeah, you can easily set x&y bounds and the screen location of the text easily with a few variables and then attach them to an obj.
You'll want to include something like this while defining your obj:
From there you'll need to create a framework to output text and have it turn into your maptext's msg variable(that you also need to define yourself). A simple way to accomplish this and an alternative to a chat box is to make space bar bring up an output and then relaying said output's text to the maptext's msg variable. Then you would create the maptext's obj on the player's loc and eventually delete the obj after a period of time.
You may want to also set some limits. Like how often one can output text so that people can't flood your world as well as a letter cap.
Edit: Also, you can change maptext styles by editting the map on your interface file.