setTextFormat > red not working

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

setTextFormat > red not working

Post 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?

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

Re: setTextFormat > red not working

Post 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.

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

Re: setTextFormat > red not working

Post by eraldo »

Great to know... thank you!

Post Reply