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

Add Corner Radius + size.y + pixel problems in Gradient #611

Open
git2013vb opened this issue Mar 21, 2020 · 3 comments
Open

Add Corner Radius + size.y + pixel problems in Gradient #611

git2013vb opened this issue Mar 21, 2020 · 3 comments

Comments

@git2013vb
Copy link

git2013vb commented Mar 21, 2020

Describe the project you are working on:
UI items
Describe the problem or limitation you are having in your project:
I made a button using "Button" Control + TextureRect to simulate a 3D button:

image
image

I have 2 problems with this approach:

  1. I cannot make corner round
  2. the top edge of TextureRect is not straight.

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
It will be nice to set CornerRadius in Gradient to obtain this result (Inkscape):
image

Also: I'm forced to use scale.x instead size.y
image

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
NA
If this enhancement will not be used often, can it be worked around with a few lines of script?:
NA
Is there a reason why this should be core and not an add-on in the asset library?:
NA

@Calinou
Copy link
Member

Calinou commented Mar 21, 2020

Also: I'm forced to use scale.x instead size.y

This will be solved by godotengine/godot#31655 as it allows changing GradientTexture height, but it may not be merged due to the added complexity. It seems a simpler pull request that only allows rotating the GradientTexture and changing its height has an higher chance to be merged.

@git2013vb
Copy link
Author

git2013vb commented Mar 22, 2020

I see :)
I have some doubt about external shape.
It will not be more easy to add Corner Radius settings in TextureRect?

edit: why not add this feature (corner radius) to any control objects who have a corner?
It can be a Control property :) So any other control can have it

@Xrayez
Copy link
Contributor

Xrayez commented Oct 17, 2020

This will be solved by godotengine/godot#31655 as it allows changing GradientTexture height, but it may not be merged due to the added complexity. It seems a simpler pull request that only allows rotating the GradientTexture and changing its height has an higher chance to be merged.

There's godotengine/godot#42855 which adds a separate class for this purpose without introducing complexity to the existing GradientTexture class, lets see how it goes.

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

No branches or pull requests

3 participants