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

Fix nk_draw_button_text_* to use nk_flags align passed from nk_menu_item_image_text etc #551

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wuxxerno
Copy link

@wuxxerno wuxxerno commented Mar 6, 2023

nk_flags align were lost in transit and not passed to the final draw functions, where a NK_TEXT_CENTERED was in its place.

@Dodzey
Copy link

Dodzey commented Aug 31, 2024

Could this not use the text_alignment from the passed in nk_style_button* ? Rather than having a new argument?
I had a local fix to this where the alignment passed to eg. nk_button_image_label would determine whether the text was to the left or right of the image, and the relevant button style text_alignment would determine the alignment of the text itself.

@Dodzey
Copy link

Dodzey commented Aug 31, 2024

I have implemented an alternative to this here: #674
In my implementation the align passed to nk_button_image_label etc continues to switch from text to right of image or text to left of image, and the button style text_alignment flag is used to select the alignment of the text within the 'content' region of the button.

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