Static text bar

phil570
Is there anyway to make a Static text bar similar to the Command link bar?

http://forum.textadventures.co.uk/viewtopic.php?f=18&t=4681&p=30866&hilit=bottom+bar&sid=5b8b89ca5a28f1c6b2765fb66cdeec54#p30866

I want some of my text to be changeable on the fly, but not scroll up with everything else.

Pretty new to scripting so be gentle.

The Pixie
I have written a guide to changing the UI, and just added a post to do just this:
viewtopic.php?f=18&t=5111&p=41062#p41062

You might want to read the first and second posts first (but perhaps skip to "Using JavaScript"), as they give some background, and the new post does assume some knowledge of these things.

phil570
This is great thank you. I was wondering how you did that when I was playing deeper.

I got it to show up but when I try to run the unpdatestatus script I get the following error:

Error running script: Error compiling expression '"$('#status_div').html('" + s + "');"': Unknown object or variable 's'

Do I need to change the script for the variable?

The Pixie
Yes, you need to set s to some value. Perhaps:
s = "Hits: " + player.hits + "<br/>Gold: " + player.gold
JS.eval("$('#status_div').html('" + s + "');")

phil570
OK got everything working.

Thanks for all the help.

phil570
The Pixie wrote:Yes, you need to set s to some value. Perhaps:
s = "Hits: " + player.hits + "<br/>Gold: " + player.gold
JS.eval("$('#status_div').html('" + s + "');")


One more question how would I put a small character face picture above their stats?

If that is possible.

The Pixie
I have not tried it, but you should be able to use the <img> html tag to put in an image. See here for how:
viewtopic.php?f=18&t=5566

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

Support

Forums