coloring Problem

Post Reply
eraldo
Posts: 43
Joined: Sun Jul 12, 2009 1:25 am

coloring Problem

Post by eraldo »

I color my exits..
and as soon as I color something else after that...
the last exit turns that same color (instead of staying in ExitColor)

I color all my exits like this:

Code: Select all

selectString( matches[1], 1 )
fg( ExitColor )
deselect()
I got an error in the debug buffer telling me:
ERROR:Lua error:[string "function Trigger15()..."]:4: attempt to call global 'deselect' (a nil value)
In the manual there is a note that deselect is not yet implemented...
is this why it did not work?

My workaround:
I made the following script:

Code: Select all

function deselect()
selectString("",1)
end
This overried the default deselect() function...
Works as intended now!

Hope that helps some of you.
Eraldo

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: coloring Problem

Post by Heiko »

If you've changed the current text color, the color will stay current until you either set a new color or call resetFormat(). I don't remember if resetFormat( windowName ) has already been implemented, but I think so.

eraldo
Posts: 43
Joined: Sun Jul 12, 2009 1:25 am

Re: coloring Problem

Post by eraldo »

The problem here was that there was still text selected at the time of changing color...
resulting in changing the color of the still selected text (which is not intended)

Post Reply