Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Variables as colors  (Read 2045 times)

0 Members and 2 Guests are viewing this topic.

wvtrammell

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
Variables as colors
« on: October 12, 2010, 06:42:39 pm »
Is it possible to:
int a = 255, b = 128, c = 37;

sf::Shape::Circle(x,y,radius,Color(a,b,c));

Thanks
Warren

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Variables as colors
« Reply #1 on: October 12, 2010, 06:58:29 pm »
Why don't you just try it?

Or what do you exactly want to achieve (describe what, not how)?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

wvtrammell

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
Variables as colors
« Reply #2 on: October 12, 2010, 07:47:54 pm »
Define random colors and use them to draw circles.

AdrianC

  • Newbie
  • *
  • Posts: 5
    • MSN Messenger - comiseladrian@yahoo.com
    • AOL Instant Messenger - 2914+Trelle+Way+
    • View Profile
Variables as colors
« Reply #3 on: October 12, 2010, 08:46:32 pm »
Yes, it should be possible.

It would also only take like two seconds to test it yourself.  :)

 

anything