Text/Foreground problem

Alexander-Auron
Hi everyone :)

As the title says, I've encountered quite a serious problem with my project.
I started to develop it over 1 year ago, but then stopped. I wanted to re-do it from scratch but in the meanwhile quest got updated to 5.6.
Back then I used the function SetForegroundColour and everything worked fine, but now of course it has been deprecated/removed.

In my game the player starts with the "Press Start 2P" font, white by deafult, and a black colour background. I've decided to add pictures for backgrounds (even if they cannot be removed) with dynamic resize to fit the game window, and I've been able to set the transparency for the GamePanel. I've also been able to change the font to another one and re-size it, even if, and I don't know why, after a while it gets set back to the "Press Start 2P" font.
However I haven't been able, in any way, to change the text/foreground colour, and I really need it for plot reasons :/
I don't need to change it just for a single message, but for everything, from room descriptions to exits to messages.

I would really appreciate some help here, this thing is driving me crazy...

Thank you all in advance, and forgive me if this looks trivial to you (and also for my italian english, I'm trying to improve :p )

The Pixie
If you want to change it for everything, set it on the Display tab of the game object. Otherwise SetForegroundColour should work fine. It does for me in Quest 5.6.1, and I see nothing in the help file about it being deprecated.

If you want colours embedded in text, you can use HTML/CSS like this (just type it straight into the text, as you would a room description, and change "cyan" to your prefered colour):
Some text <span style="color:cyan;">cyan</span> back to normal

Alexander-Auron
I've tried to change the colour using a JS instruction for divOutput, but it seems that it gets overwritten/ignored in its sub-divs. And my SetForegoundColour function was empty last time I checked :/

The Pixie
I would guess Quest sets the colour for each paragraph, based on the current value of game.defaultforeground, so yes, doing anything to divOutput will fail.

Can you say what happens if you put this code into, say, a room description (set to Run Script):
msg ("Some text <span style=\"color:cyan;\">cyan</span> back to normal")
msg (game.defaultforeground)
SetForegroundColour ("DarkRed")
msg (game.defaultforeground)
msg ("in red")


The Pixie
Apparently not. And yet it does for me. I have no idea why that might be. Could you upload your whole game to DropBox so I could take a look?

Alexander-Auron
PM for you!

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

Support

Forums