santaclose / ImGuiColorTextEdit

Colorizing text editor for ImGui
MIT License
59 stars 17 forks source link

Side effects of 'stop updating palette every frame and add default palette interface' commit #17

Open goossens opened 1 year ago

goossens commented 1 year ago

Commit https://github.com/santaclose/ImGuiColorTextEdit/commit/eab54a36d644885129f875882843a0ed7a338b10 stops updating the palette every frame and added a new default palette interface.

While speeding up the rendering loop is always a good idea, this change causes two side effects that are now hampering me:

My implementation at https://github.com/goossens/ImGuiColorTextEdit/commit/d738eaf0627e8190e0036a56800816e863089d4e achieves the same thing you were after without the side effects.

It also maintains backwards compatibility for those who quickly want to change over from the old library to yours. :smile:

santaclose commented 1 year ago

I'm aware that custom color palette is not possible with my changes. And i agree that it should be possible. I'm trying to do some cleanup and will come back to this later.

and thanks for letting me know about the alpha stuff

khiner commented 9 months ago

Another side effect is that, due to the new use of ImGui::GetStyle during TextEditor construction, it is no longer possible to instantiate a TextEditor instance before the ImGui context has been initialized.