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

editbox lacks a single listener for all text changes #28

Open
gajop opened this issue Jun 29, 2014 · 0 comments
Open

editbox lacks a single listener for all text changes #28

gajop opened this issue Jun 29, 2014 · 0 comments

Comments

@gajop
Copy link
Contributor

gajop commented Jun 29, 2014

Text in editbox can be changed by at least three different ways:

  1. Manually setting it with SetText - which doesn't invoke a listener
  2. Text deletion, copy, paste - which invokes an OnKeyPress
  3. Unicode text input - which invokes OnTextInput

OnKeyPress and OnTextInput can also be invoked in some cases where no text has been changed.
I suggest we add a new, "OnTextChanged" event that will be invoked for all changes of text, otherwise we'll have ugly code: https://github.com/gajop/Scenario-Editor-Core/blob/master/scen_edit/view/unit_defs_view.lua#L4-L21

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

1 participant