Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Miniwindows ➜ Colour changing problem

Colour changing problem

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Mendacitas   (10 posts)  Bio
Date Thu 05 Aug 2010 04:55 AM (UTC)
Message
So for some reason one of my window strings won't change colour for me:

here's part of the function:

WindowCreate (atkwin, 640, 325, 175, 200, 6, 2, ColourNameToRGB("silver"))
WindowShow (atkwin, true)
WindowFont (atkwin, "a","Trebuchet MS", 12, true, false, false, false)
WindowText (atkwin, "f","Attacks:", 4, 0, 0, 0, ColourNameToRGB ("lightgreen"), false)


WindowText (atkwin, "f", "Spells:", 4, 67, 0, 0, 0, ColourNameToRGB ("lightgreen"), false)
...

"f" is defined elsewhere like so:

WindowFont (win2, "f","Trebuchet MS", 10, true, false, false, false)

thing is, "Attacks:" is becoming light green no problem with that syntax, but "Spells:" will only show as black, no matter what I put inside of ColourNameToRGB
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Thu 05 Aug 2010 05:48 AM (UTC)
Message
Quote:

WindowText (atkwin, "f","Attacks:", 4, 0, 0, 0, ColourNameToRGB ("lightgreen"), false)


WindowText (atkwin, "f", "Spells:", 4, 67, 0, 0, 0, ColourNameToRGB ("lightgreen"), false)


You have an extra 0 in the second one, which is black in RGB.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Mendacitas   (10 posts)  Bio
Date Reply #2 on Thu 05 Aug 2010 01:15 PM (UTC)
Message
0.0 I can't believe I didn't see that. I blame the hour.
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #3 on Thu 05 Aug 2010 05:46 PM (UTC)
Message
No way I'd have seen that unless I knew what I was looking for. :(

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


12,241 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.