Quest 5.5: Maintaining control of the command input bar

jaynabonne
02 Mar 2014, 09:37
In Quest 5.5, there seems to be new code added which forces the style of the command input bar to match whatever was output last. While this can be useful for those who have consistently output text, it was causing some strange effects in my code, since I was printing out spacing before the command prompt for aesthetic reasons - sometimes 11 pt, sometimes 6 pt, sometimes whatever depending on my stylistic mood (and I'm a programmer, not an artist - go figure!) The command prompt would follow suit. Needless to say, a 6pt input command line is a bit disturbing. And having the style of the command prompt change was just annoying. (The great tension - out-of-the-box ease of use vs. the ability to customize.)

I can understand generally why Quest does this (it works fine in the majority of cases, I suppose), but if like me you are explicitly setting the styles for various elements and wish to actually have things be as you set them (!), then the solution would be to modify OutputTextRaw to disable that new bit of code that deals with the command bar format. There's a single "if" in there you can get rid of. YACO (yet another core override)

Just in case anyone else runs into this...

Pertex
02 Mar 2014, 09:48
Hi Jay,
could you post a game file demonstrating the problem?

jaynabonne
02 Mar 2014, 10:19
Here you go. Type "l" and then try "x apple".

The command prompt follows whatever was output last. The more I think about it, this is just not a good thing. The best workaround is to just not use the Quest built in font style APIs, using HTML/CSS instead, especially for transient text styles. But then why have them? :)

jaynabonne
02 Mar 2014, 10:32
There is a bug in what I posted, which is that all text changes after that. So someone could say, "Well, you've changed the default size and color for text anyway." Even that aside, I would not expect the command prompt to change style no matter what I do with the text, just as I wouldn't expect other UI elements (like the side inventory list, etc.) to change based on output. Perhaps that's just me.

Alex
02 Mar 2014, 12:33
If you're just changing font style temporarily why not just put the text in a span or div element with an in-line style?

The Pixie
02 Mar 2014, 19:06
I found 5.5 screwed up my game too. I was changing styles via Javascript successfully in 5.4, but in 5.5 my panes disappeared.

jaynabonne
02 Mar 2014, 22:09
Alex, that's pretty much what I had said. :) But even for permanent style changes, it's questionable whether a game author would want the command input bar to exactly match the game text style. I suppose that's why you made it that way - people must want it like that often for you to have the default behavior ne that. And I'm sure you're more in touch with a broader Quest consumer than I am.

So, back to the beginning, I was just pointing out the fix for those who want to set the command input bar style to what they want and have it stay that way.

(It just seems there had to be a better way than what feels like a hack in text output, to set the command prompt style. It comes down to a strange, and most likely unexpected, side effect to doing msg. I'm sensing from your answer that it is how it will remain...)