Search Unity

[Suggestion] Rename Button.onClick to Button.onSubmit

Discussion in 'UGUI & TextMesh Pro' started by Senshi, Aug 26, 2014.

  1. Senshi

    Senshi

    Joined:
    Oct 3, 2010
    Posts:
    557
    Hi,

    I'm currently working on a character selection screen where the user controls a grid-based cursor controlled by key input, instead of a mouse. It took me a bit to figure out that I can just add my OnSubmit() delegate to a Button's onClick property, as I assumed it was specific for (pointer) clicks, essentially being a shorthand for EventTriggerType.PointerClick. Renaming it to onSubmit would also make it more consistent with InputField (and possibly others? I haven't checked.).

    Cheers,
    Patrick
     
    hichanbis likes this.