Is there a function for changing hypertext colour?

Silver
I can't see anything obvious in the function list.

Pertex
You can add this function to your game:

 <function name="SetLinkColour" parameters="colour">
request (LinkForeground, colour)
game.defaultlinkforeground = colour
</function>

Silver
Thanks!

Silver
So to call that Id just input:

SetLinkColour ("blue")


HegemonKhan
HK edit: my apologies (I gave wrong info).

Silver
I was going by how other functions work:

SetBackgroundColour ("Blue")

The Pixie
It does need quotes!

HegemonKhan
my bad, I thought it was just a normal function call parameter (or I just been always using Objects for my parameters, hmm ~ I need to look up on this), my apologies.

The Pixie
"Blue" is a string and is also the actual value you want the background, not a holder for the value. Look at these example:

colour = "blue"             // blue is the actual value, and a string, so quotes
size = 5 // 5 is an integer, so no quotes
SetLinkColour (colour) // colour is a holder for the string value, no quotes
SetLinkColour ("blue")
ball.colour = colour
ball.colour = "Blue"
SetLinkSize (size)
SetLinkSize (5)
ball.size = size
ball.size = 5

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

Support

Forums