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

Author Topic: VB.NET - change alpha level on sprite?  (Read 1902 times)

0 Members and 1 Guest are viewing this topic.

Recoil

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
VB.NET - change alpha level on sprite?
« on: June 13, 2015, 02:07:19 am »
So I have seen this: http://www.sfml-dev.org/tutorials/2.1/graphics-sprite.php

I am able to set my colors like this:
tmpSprite.Color = SFML.Graphics.Color.Green
 

I honestly do not understand how to be able to change it so I can have the 4 channel argb instead.  Does anyone have an idea?

Please let me know what other information would be helpful, in getting an idea...thanks.

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: VB.NET - change alpha level on sprite?
« Reply #1 on: June 13, 2015, 02:29:21 am »
You can create a Color object. (it is RGBA)
I'm not sure what the syntax is in VB.Net, but from your code and the code in your previous post I suppose it is something like this (with r g b and a between 0 and 255):
tmpSprite.Color = New SFML.Graphics.Color(r, g, b, a);

Recoil

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: VB.NET - change alpha level on sprite?
« Reply #2 on: June 13, 2015, 02:49:09 am »
That's it...I can't believe I missed that -_-

Thanks!