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

Use separated ImGuiTextEditState for different text edit #1540

Open
paladin-t opened this issue Jan 8, 2018 · 2 comments
Open

Use separated ImGuiTextEditState for different text edit #1540

paladin-t opened this issue Jan 8, 2018 · 2 comments

Comments

@paladin-t
Copy link

Hi,

I figure out that all text edit in ImGui are sharing the same ImGuiTextEditState, which "undo/redo" history records are stored in. Just wondering is it possible to have separated states for different text edits? Because I'm making a software that users may have more than one text edits at a time, when switching focus from one another, the old one losts all its history. Text edits are used to edit long text, so that's not user friendly when got important data lost.

It would be nice to have, or it's also fine if I could maintain and pass separated ImGuiTextEditStates for different text edits manually.

@ocornut
Copy link
Owner

ocornut commented Jan 8, 2018

Hello,

I agree this is desirable. I will eventually refactor the code toward that but there are a lots of subtle design and features decisions to nail related to persistence and ownership (see e.g. #1506). And generally there was a lots of things to work on with InputText (e.g. inputtext and some more). What will probably happens is that I will batch them up when I get to focus on InputText, and that's probably not this month unfortunately.

-Omar

@paladin-t
Copy link
Author

Thanks for the quick reply, and all your efforts on this project. I fully understand that you maybe the only dedicated developer on ImGui, so go ahead do what's on your priority list. I'm already happy to know it's on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants