I'm planning on making a game to be like a DOS box type thing, where instead of there being and output and input box, being more like something of this sort:
[usr@localhost] [input]
[output]
[usr@localhost] [input]
[output]
Is this possible?
ID:157447
Mar 7 2010, 3:12 am
|
|
In response to Loduwijk
|
|
Loduwijk wrote:
Blafblabla wrote:Yes. , where instead of there being and output and input box, being more like something of this sort: OK. Basicly what i'm trying to do is make the input go down one each time the user types in something and hits the enter key. |
In response to Blafblabla
|
|
Blafblabla wrote:
OK. Basicly what i'm trying to do is make the input go down one each time the user types in something and hits the enter key. I think I got the idea of what you were after. I probably should have elaborated a bit more on my first answer though. You could take lines of input which aren't on the same text area as the output, then add in the input line to the output after each command. For example mob/verb/typeTerminalCommand(cmd as text) Which process() could then also output any output generated by cmd. |
In response to Loduwijk
|
|
Well, I don't see how that makes the input box change from one place to another, but in the output box. Also I am trying to make it like there is no box, or if there is it isn't very visible.
|
In response to Blafblabla
|
|
As far as I'm concerned, I think what you're trying is just about impossible... Only way I can think is that you'd make an input which would go on top of the output box and it would move to the next line after each time you press enter...
|
In response to Syntty
|
|
Yes, but how would I keep [usr@localhost] or whatever in the input box, unable to be changed and it is ignored when executing a verb but still appearing?
|
In response to Blafblabla
|
|
You can put that directly to the output and then place the input right behind it!
|
In response to Syntty
|
|
Forgot about that. :)
Just, how would I make the input move down? I haven't done much with interfaces* so I don't really know. *<code>I'm assuming it's to do with interfaces.</code> |
In response to Blafblabla
|
|
winset(usr, "default.input", "pos=612,393") That should do it... Look for winset in the reference for more info about it! |
In response to Syntty
|
|
Thanks.
And putting the [usr@localhost] bit? |
In response to Blafblabla
|
|
Try this:
usr << "\[usr@localhost\]"
|
In response to Syntty
|
|
Thanks. Oh, now I see what I've being doing wrong. :)
|
In response to Blafblabla
|
|
I can't figure out how to use that. I have it like so:
mob/verb/input_change() But nothing happens. |
You mean Unix?
Short answer: sort of, but not exactly like that.
Short answer that could lead to a long discussion: yes, as long as you are willing to put in a bunch of work for it and set up the framework yourself. It would take more than the simple input controls that are provided for you by default. One way you could do it is with a browser control using an HTML-embedded language like Javascript.