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

Text changed return value from Render? #20

Closed
Unit2Ed opened this issue Feb 8, 2018 · 1 comment
Closed

Text changed return value from Render? #20

Unit2Ed opened this issue Feb 8, 2018 · 1 comment

Comments

@Unit2Ed
Copy link

Unit2Ed commented Feb 8, 2018

It would be useful to be able to receive information about when the text has been changed (eg to trigger a Lua script load to check for errors in realtime).

Naively, this could be done by the user comparing GetText() with the previous value, but it's a bit of a sledgehammer approach.

Better would be implemented with a "text changed" member bool that's set inside any text manipulation function that adjusts the undo index. The flag would be returned and cleared at the end of Render().

@BalazsJako
Copy link
Owner

Done. Added IsTextChanged() function. It will report the same value until the next Render() call, so you can call it from anywhere multiple times if you want to.

luis605 added a commit to luis605/ImGuiColorTextEdit that referenced this issue Jan 9, 2024
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

2 participants