New UI

Kefs
Hello!

I know little of HTML, but nothing in javascript.
Can someone give me some ropes to making new UI in game and simply adding bacgkround images?
Is it possible to do most things in Quest just in HTML code? With dev tools i can see every line in HTML, but cant edit it.

HegemonKhan
here's a link:

http://docs.textadventures.co.uk/quest/ ... nced_.html

http://docs.textadventures.co.uk/quest/ ... cript.html
http://docs.textadventures.co.uk/quest/ ... cript.html

and there's a few posts~threads too here and there in this forum (good luck finding them, try search feature or just manually look page by page).

Kefs
Thank you!

Silver
You can add some html inside messages.

msg ("<center> centred text </center>") 


You can also show images by calling a Quest function or using the text processor.

Kefs
Searched forum more and found smth
I called function SetBackgroundImage and result is this:
http://i.imgur.com/Tmqtkbx.png

What function i have to call to get that image in that white area rather than outside it?

Tried SetFramePicture, but it shows picture on front and text cant be seen.

Silver
What do you want to do? You can have an image in the game border (outside of where the text is) which is what SetBackgroundImage does. You can have an image print inline with the text but it will scroll upwards with the text. Or you can have a fixed image, say, of the room you're in, and the text will scroll but the image will be static.

We need to know if you're doing a gamebook or a text adventure too. I can tell you quite a bit about the latter (and others even more) but I don't know so much about gamebooks.

Silver
Or if you want the border image to appear behind the text too, you have to change the opacity of the background. I just learned this recently. (in fact I've got my tin foil hat on that you're asking the same question lol).

Kefs
Im trying to place picture behind text. Hmm oki i will play with opacity thingy then. Thanks guys for replies :)

Silver
You will need another function to do that. Um..

SetBackgroundImage ("whatever.jpg")
SetBackgroundOpacity (0.5)


Although it will still show the image in the borders. I don't know how to just set it in #divOutput but it can probably be done with css or javascript.

Kefs
Played with different opacity values, but no effect.

Silver
Using the code above? The opacity in the gui only deals with font opacity iirc.

Kefs
Yes, same as in GUI as in code itself

SetBackgroundImage ("Background2.jpg")
SetBackgroundOpacity (0.1)

Silver
Well that code works for me. So I have no idea where we went wrong.

Silver
Where are you putting the code though?

I couldn't get it working in the start script but I could if called in a room script iirc.

Kefs
Eh nevermind, i will use just simple color. Anyway thx for help.

I solved mistery. I needed to add one more script that changed color of background. Weird.

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

Support

Forums