textCommandDiv color(Solved)

Can I get the proper code to set the color of the command bar?
I'm trying to use:

JS.setCss ("#textCommandDiv", background: moccasin)

with no luck. I think I have the right Element. But then I have to figure out if I should use
JS.setCss
or
JS.eval
and the two use different syntax.


I think that you have to modify the Quest built-in function ResetCommandBarFormat (go to Filter --> Show Library Elements and search for it). Quest runs this function automatically at the end of each turn, and it resets any changes you make to the command bar, which is why you don't see your changes stick. I modified this function directly for my map demo to include a background image for the command bar, and everything works OK thus far.


I just found that I had made my page background color white. The change to white made my text command line white as well. I didn't realize the game panel was white because I made it 0 opacity.

You would think that the above script would change the text box to moccasin anyway. But whatever It is ok now. Just had to change the panel color to a beige. and it shows in box but not panel due to opacity. 👍


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums