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

[Feature] Added SetWindowOpacity(float opacity) #2254

Merged
merged 4 commits into from
Dec 30, 2021

Conversation

tusharsingh09
Copy link
Contributor

@tusharsingh09 tusharsingh09 commented Dec 30, 2021

SetWindowOpacity() takes opacity(float) as a parameter. Value of opacity must fall under 0 and 1. If it exceeds 1; it will be equal 1, similarly if it's smaller than 0; opacity is equal to 0.
Random Screenshots (READ THE VALUE INSIDE SetWindowOpacity()):
set_window_opacity_0
set_window_opacity_1
set_window_opacity_2
set_window_opacity_3
SetWindowOpacity(99999999.0) goes same as SetWindowOpacity(1.0).

Thank you

src/rcore.c Outdated Show resolved Hide resolved
src/rcore.c Outdated Show resolved Hide resolved
@raysan5
Copy link
Owner

raysan5 commented Dec 30, 2021

@tusharsingh09 This is a nice addition, added a couple of comments for review.

@raysan5 raysan5 merged commit d91b917 into raysan5:master Dec 30, 2021
@raysan5
Copy link
Owner

raysan5 commented Dec 30, 2021

@tusharsingh09 thanks for the addition!

@tusharsingh09 tusharsingh09 deleted the opacity branch December 31, 2021 10:19
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