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 bindable text path to BindableButton component #71

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

DenisZhukovski
Copy link

No description provided.

@DenisZhukovski
Copy link
Author

@ChebanovDD could you please take a look

Copy link
Collaborator

@ChebanovDD ChebanovDD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not simply use BindableLabel?

<ui:UXML xmlns:uitk="UnityMvvmToolkit.UITK.BindableUIElements" ...>
    <uitk:BindableButton ...>
        <uitk:BindableLabel ... /> <!--Using BindableLabel to display button text.-->
    </uitk:BindableButton>
</ui:UXML>

@DenisZhukovski
Copy link
Author

DenisZhukovski commented Mar 28, 2024

Why not simply use BindableLabel?

<ui:UXML xmlns:uitk="UnityMvvmToolkit.UITK.BindableUIElements" ...>
    <uitk:BindableButton ...>
        <uitk:BindableLabel ... /> <!--Using BindableLabel to display button text.-->
    </uitk:BindableButton>
</ui:UXML>

As for me it gives better flexibility, Button already has text property and why not to bind on it? In the future button implementation may be changed and we will be independent. Also internal button label can have some style class names automatically assigned which you may forget once do it manually

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.

3 participants