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

draw_set_color_ext(color,alpha) #42

Closed
Alphish opened this issue Aug 5, 2023 · 3 comments
Closed

draw_set_color_ext(color,alpha) #42

Alphish opened this issue Aug 5, 2023 · 3 comments
Labels
accepted 🚀 For accepted issues and pull requests feature ✨ For feature requests and implementations

Comments

@Alphish
Copy link
Owner

Alphish commented Aug 5, 2023

A simple function to set color and alpha at the same time, to shorten the drawing code a bit.

/// @func draw_set_color_ext(color,alpha)
/// @desc Sets the drawing color and alpha.
/// @arg {Constant.Color} color     The color to set.
/// @arg {Real} alpha               The alpha to set (from 0 to 1).
function draw_set_color_ext(_color, _alpha) {
    gml_pragma("forceinline");
    draw_set_color(_color);
    draw_set_alpha(_alpha);
}

If someone has a better name suggestion, feel free to share. ^^

@Alphish Alphish added the feature ✨ For feature requests and implementations label Aug 5, 2023
@gnysek gnysek mentioned this issue Aug 19, 2024
@Alphish Alphish added the name voting ⚖️ The feature is pretty much accepted, we just need to decide on a name label Nov 17, 2024
@Alphish
Copy link
Owner Author

Alphish commented Nov 17, 2024

This and the companion function draw_set_text_align are planned for the upcoming release. If someone has a nicer function name for setting both color and alpha please share; if no other suggestion is made, I'll go with draw_set_color_ext.

@Alphish Alphish added this to the 24.6.0 Release milestone Nov 17, 2024
@Alphish
Copy link
Owner Author

Alphish commented Nov 21, 2024

After some discussion, I decided on the draw_set_color_alpha name instead.

@Alphish Alphish added accepted 🚀 For accepted issues and pull requests and removed name voting ⚖️ The feature is pretty much accepted, we just need to decide on a name labels Nov 21, 2024
@Alphish
Copy link
Owner Author

Alphish commented Nov 22, 2024

Implemented and merged!

@Alphish Alphish closed this as completed Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted 🚀 For accepted issues and pull requests feature ✨ For feature requests and implementations
Projects
None yet
Development

No branches or pull requests

1 participant