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

Author Topic: Undo Setting Texture Colors  (Read 2202 times)

0 Members and 3 Guests are viewing this topic.

Druidpeter

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Undo Setting Texture Colors
« on: March 25, 2019, 03:13:06 pm »
So, I'm currently working on building a map from a tilesheet. I figured I would only have one set of blocks, and then adjust the transparency of a block and the color block to get "glass blocks" and "dark blocks". I have one sprite which adjusts the texture rectangle over the source tileset texture, and applies the relevant transformations.

Problem is, once a modulation is done, e.g., adjusting the transparency of single block, in the rendering process, all of a sudden all the blocks are now semi-transparent! I thought that changing the color of a sprite would only have an effect in that particular draw instance! Oops.

So now, my question is, is there an easy way to reset the colors of a sprite back to the texture default on file?

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: Undo Setting Texture Colors
« Reply #1 on: March 25, 2019, 04:55:11 pm »
Set its color back to sf::Color::White

Druidpeter

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Re: Undo Setting Texture Colors
« Reply #2 on: March 26, 2019, 05:55:40 pm »
Ah. Thank you. I feel very silly now. P_P