FyroxEngine / Fyrox

3D and 2D game engine written in Rust
https://fyrox.rs
MIT License
7.48k stars 339 forks source link

TextBox ergonomic adjustments. #627

Closed b-guild closed 2 months ago

b-guild commented 2 months ago

I have made countless tiny adjustments to TextBox in order to make it more comfortable for users. I did not like how it felt to use text boxes in the UI before, and now they feel very nice. Try it and see if you agree that they are better this way. Both mouse and keyboard interaction have changed. Ctrl-X now does cut, much like Ctrl-C does copy and Ctrl-V does paste. Mouse clicks are detected in a far more forgiving way, even allowing mouse drags to stray outside of the text box.

In order to make it easier to get TextBox working the way I want, I have made several internal adjustments to text_box.rs and formatted_text.rs.

mrDIMAS commented 2 months ago

Awesome, I'll try to check the PR today.

mrDIMAS commented 2 months ago

I tried the changes locally and it works smoothly and feels nice, great job. I just need to read the rest (about a half) of the code.