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

[3.x] Add Color + alpha constructor for Color #74973

Merged
merged 1 commit into from
Apr 11, 2023

Conversation

timothyqiu
Copy link
Member

Closes godotengine/godot-proposals#6492

Note: the existing Color_init3 and Color_init4 seems unused.

@timothyqiu timothyqiu added this to the 3.6 milestone Mar 16, 2023
@timothyqiu timothyqiu requested review from a team as code owners March 16, 2023 06:57
}

static void Color_init4(Variant &r_ret, const Variant **p_args) {
r_ret = Color::hex(*p_args[0]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were these previous functions unused? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used since the "GODOT IS OPEN SOURCE" commit.

Copy link
Member

@lawnjelly lawnjelly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me (although I'm not super well versed in variant_call.cpp).

@lawnjelly
Copy link
Member

Just to note that if we merge this PR, we should ideally have a later PR to change the calling sites mentioned in godotengine/godot-proposals#6492 (comment) .

@timothyqiu
Copy link
Member Author

C++ code is not affected, this only creates a Variant color constructor for scripts.

@akien-mga akien-mga merged commit 0facd88 into godotengine:3.x Apr 11, 2023
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants