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 Button's "focus" style as an overlay to other styles #23098

Closed

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Oct 17, 2018

Focus styles in existing projects should be tweaked to make the base style (normal/hover/pressed) visible.

This closes #4575.

Demo project

@bojidar-bg
Copy link
Contributor

Hm, the change looks a bit fishy: just renaming a local variable should have no effects on the behaviour.
Also, I think the DRAW_HOVER_PRESSED introduced by #22384 might have fixed the issue somewhat.

@Calinou
Copy link
Member Author

Calinou commented Oct 18, 2018

Hm, the change looks a bit fishy: just renaming a local variable should have no effects on the behaviour.

It was overriding a previously-set value, so renaming it effectively creates a new object instead of setting an existing one.

Also, I think the DRAW_HOVER_PRESSED introduced by #22384 might have fixed the issue somewhat.

That PR was about the hover state, not the focus state 🙂

@bojidar-bg
Copy link
Contributor

It was overriding a previously-set value, so renaming it effectively creates a new object instead of setting an existing one.

It should be shadowing it, similar to this example on wikipedia.

That PR was about the hover state, not the focus state slightly_smiling_face

The title of this PR is probably confusing me, then.

Focus styles in existing projects should be tweaked to make
the base style (normal/hover/pressed) visible.

This closes godotengine#4575.
@Calinou Calinou changed the title Draw Button's "hover" style as an overlay to other styles Draw Button's "focus" style as an overlay to other styles Oct 18, 2018
@Calinou
Copy link
Member Author

Calinou commented Nov 7, 2018

It seems this pull request may not actually be needed. In this project, I tweaked the focus style to only draw a colored shadow, and the pressed style is now visible when clicking on buttons.

@akien-mga
Copy link
Member

It seems this pull request may not actually be needed. In this project, I tweaked the focus style to only draw a colored shadow, and the pressed style is now visible when clicking on buttons.

Should we close it then, as well as #4575?

@akien-mga
Copy link
Member

Closing for now.

@akien-mga akien-mga closed this Dec 12, 2018
@Calinou Calinou deleted the button-hover-style-overlay branch January 27, 2020 18:22
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.

Button pressed style never appears
3 participants