Skip to content

Added fading gradients through Squirrel - #1508

Merged
tobbi merged 3 commits into
SuperTux:masterfrom
Semphriss:gradient_squirrel
Aug 16, 2020
Merged

tobbi merged 3 commits into
SuperTux:masterfrom
Semphriss:gradient_squirrel

Conversation

@Semphriss

Copy link
Copy Markdown
Member

Added four functions through Squirrel to fade colors over time :

// In addition to set_colo1 and set_color2, set_colors allows you to set both colors in one function
set_colors(float red, float green, float blue, float time);

fade_color1(float red, float green, float blue, float time);
fade_color2(float red, float green, float blue, float time);
fade_colors(float red1, float green1, float blue1, float red2, float green2, float blue2, float time);

supertux_fading_gradients

@Semphriss

Copy link
Copy Markdown
Member Author

Note : I'd like someone to review my coding style, if possible; in gradient.hpp I declared object properties as private and starting with "m_"; is that the correct/recommended way of proceeding? How is it best to do?

@tobbi

tobbi commented Aug 15, 2020

Copy link
Copy Markdown
Member

I thought we already had that? I'm a bit confused.

@Semphriss

Copy link
Copy Markdown
Member Author

I thought we already had that? I'm a bit confused.
@tobbi

There was an option to change the color instantly (set_color), but not to fade progressively over time. This PR adds this small missing feature :)

@tobbi
tobbi merged commit c7518a7 into SuperTux:master Aug 16, 2020
mbernard2 pushed a commit to mbernard2/supertux that referenced this pull request Aug 18, 2020
* Added fading gradients through Squirrel

* Fixed missing initializers for fading gradient properties

* I forgot one of the two constructors (Gradient fading Travis warnings)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants