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


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

I don't know if there is a bug with the following methods:
drawable:fade_in([delay], [callback])
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,

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 »