Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added fading gradients through Squirrel #1508

Merged
merged 3 commits into from Aug 16, 2020
Merged

Added fading gradients through Squirrel #1508

merged 3 commits into from Aug 16, 2020

Conversation

Semphriss
Copy link
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
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
Copy link
Member

tobbi commented Aug 15, 2020

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

@Semphriss
Copy link
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.

None yet

2 participants