How to change font colour for active text?
Cow2496
12 Sept 2014, 18:12Hi guys,
My game has a white font against a black background. After a couple turns of play, a whole wall of white text can be hard to read, so I thought that it would be easier on the eyes if that old text is darker, while the text from the last command is white.
So instead of this:

It looks like this:

I don't really have any idea how to achieve this, and I would greatly appreciate any help with this issue.
My game has a white font against a black background. After a couple turns of play, a whole wall of white text can be hard to read, so I thought that it would be easier on the eyes if that old text is darker, while the text from the last command is white.
So instead of this:

It looks like this:

I don't really have any idea how to achieve this, and I would greatly appreciate any help with this issue.

jaynabonne
12 Sept 2014, 22:18Here's one way to do it. Add the following turnscript to your game:
It sets the opacity of the preceding output section to 50%, which dims the text (shows black through). You can adjust the opacity percent by changing the 0.5. A value of 1.0 would be 100%, 0.0 would be entirely transparent, etc.
A full sample game is attached.
<turnscript name="dimmer">
<enabled />
<script><![CDATA[
if (game.lastoutputsection > 1) {
JS.eval ("$('.section"+(game.lastoutputsection-1)+"').css('opacity', '0.5');")
}
]]></script>
</turnscript>
It sets the opacity of the preceding output section to 50%, which dims the text (shows black through). You can adjust the opacity percent by changing the 0.5. A value of 1.0 would be 100%, 0.0 would be entirely transparent, etc.
A full sample game is attached.
Cow2496
13 Sept 2014, 01:36jaynabonne wrote:Here's one way to do it. Add the following turnscript to your game:<turnscript name="dimmer">
<enabled />
<script><![CDATA[
if (game.lastoutputsection > 1) {
JS.eval ("$('.section"+(game.lastoutputsection-1)+"').css('opacity', '0.5');")
}
]]></script>
</turnscript>
It sets the opacity of the preceding output section to 50%, which dims the text (shows black through). You can adjust the opacity percent by changing the 0.5. A value of 1.0 would be 100%, 0.0 would be entirely transparent, etc.
A full sample game is attached.
Thank you very much for the quick reply and solution, it's working perfectly!