Page 1 of 1

setTextFormat > red not working

Posted: Mon Aug 17, 2009 12:19 pm
by eraldo
When I set setTextFormat to:
setTextFormat("ChatWindow",0,0,0,255,0,255,0,0,0);
I get the same as:
setTextFormat("ChatWindow",0,0,0,0,0,255,0,0,0);
I have made other similar tests ...all pointing towards "red" beeing ignored!

Is this the case only on my setup?
Any ideas how to solve this?

Re: setTextFormat > red not working

Posted: Mon Aug 17, 2009 3:15 pm
by Heiko
Yes, this is a known bug. The red RBG value for foreground color is ignored. I'll fix it with the next git update.

Until then you can use the simpler new functions: setFgColor( "chatWindow", 255,0,0), setBold( "chatWindow", true ) etc..
Many functions can now operate on any window. If the windowName argument is not given, the main console is being used as context e.g. selectString("asdf",1) selects the string asdf in the main window. selectString("chat", "asdf", 1) selects "asdf" in the current line of window "chat". replace(), insertText(), moveCursor() etc. all work this way now.
moveCursor() hasn't been updated yet to accept an empty first argument so you might have to use moveCursor("main" x,y) to move the cursor in the main screen.
echo() has been changed to only print at the end of the line now - irrespective of the current cursor position. insertText() prints at the current cursor postion or at the beginning of the current line if the position hasn't been set explicitely.

Re: setTextFormat > red not working

Posted: Mon Aug 17, 2009 3:43 pm
by eraldo
Great to know... thank you!