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

Change text color #53

Open
jkvatne opened this issue Jun 13, 2018 · 1 comment
Open

Change text color #53

jkvatne opened this issue Jun 13, 2018 · 1 comment

Comments

@jkvatne
Copy link
Contributor

jkvatne commented Jun 13, 2018

I need to change the text color. The following function does it, but it has to be placed in etc.go, because the fields are not public. `The push/pop functions have the same problem. Is there a better way to do it, or could this routine be included in the library?

func SetTextColor(ctx *Context, color Color) {
	var style *Style
	style = ctx.Style()
	text := &style.text
	text.color.r = color.r
	text.color.g = color.g
	text.color.b = color.b
}
``
@xlab
Copy link
Member

xlab commented Jun 13, 2018

@jkvatne there is a lot of cases of that, I think we need to place everything in etc.
The design of Nuklear is that there is a lot of private field manipulation involved.

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

No branches or pull requests

2 participants