Author Topic: Problem with fade_in and fade_out methods  (Read 1030 times)

froggy77

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Problem with fade_in and fade_out methods
« on: October 04, 2015, 06:53:51 pm »
Hello,

I don't know if there is a bug with the following methods:
drawable:fade_in([delay], [callback])
 and
drawable:fade_out([delay], [callback])

I make maybe some mistakes in the use of these methods. :-[
These methods work, but at the end, the chosen colors are not exactly the same.
When I picked the color in an image editor (e.g. Gimp), I can see it's darker.
It is as if the surface kept a little transparency at the end of my fade_in() . Even when I used surface:clear()

So instead of writing this,
self.bg_surface:fade_in()

I write this:
self.bg_surface:fade_in(20, function () self.bg_surface:set_opacity(255) end)

This workaround may not work with text_surface, because there is no text_surface:set_opacity(opacity)
Is there a solution?
« Last Edit: October 04, 2015, 09:56:05 pm by froggy77 »