Reviving the Past...

Dcoder
01 Nov 2018, 15:06

@KV:
Hi KV, do you remember your old code to enable a background image for the command bar?

The original post is here (Mar 10, 2018 5:05 PM -- scroll about 2/3 of the way down). The specific link for the command bar is dead:

http://textadventures.co.uk/forum/quest/topic/9l8gwkxctu2nofuyoaascg/borders-n-stuff

If not, don't sweat it. Thanks!


K.V.
01 Nov 2018, 20:30

Hello.

I think I found the code you seek, but I "can't post that here."

So, see if this is it:

https://gist.github.com/KVonGit/57ddaa4b9f3c8adc1ef260ced2b32554


Dcoder
01 Nov 2018, 21:48

Yes, those are the droids I seek! Thank you Java Master!


Dcoder
01 Nov 2018, 22:06

Ah, ResetCommandBarFormat resets the settings every turn -- that is why my customized stylings always lost that battle. Glad I asked!

I guess you could even put the customized stylings in this function instead of running another turn script...


mrangel
01 Nov 2018, 23:18

Or you could do:

msg ("<style id=\"txtCommandStyle\"> #txtCommand { background-image: url ('"+GetFileUrl("whatever filename")+"') !important; }</style>")

(giving it an ID so that you can later do JS.eval("$('#txtCommandStyle').remove();") if you want to get rid of it)


K.V.
02 Nov 2018, 01:09

I dig it, man. I totally dig it.