UnityMvvmToolkit icon indicating copy to clipboard operation
UnityMvvmToolkit copied to clipboard

add bindable text path to BindableButton component

Open DenisZhukovski opened this issue 1 year ago • 2 comments

DenisZhukovski avatar Mar 27 '24 16:03 DenisZhukovski

@ChebanovDD could you please take a look

DenisZhukovski avatar Mar 27 '24 16:03 DenisZhukovski

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

DenisZhukovski avatar Mar 28 '24 12:03 DenisZhukovski