bytestring-net / bevy_lunex

Blazingly fast path based retained layout engine for Bevy entities, built around vanilla Bevy ECS.
https://bytestring-net.github.io/bevy_lunex/
Apache License 2.0
478 stars 18 forks source link

Text Input #9

Closed ImVexed closed 9 months ago

ImVexed commented 9 months ago

Hello! New to the bevy ecosystem, and this is the first UI library I've seen that has more than a simple draw a button UI example as their most complex sample. So, thank you! The Cyberpunk recreating is really well done.

However, something I notice missing from most UI libraries for Bevy is any form of text input. Do you have an example of a simple single field text input being used, and then its contents referenced anywhere? I'm trying to wrap my head around how I'm supposed to be setting up the object hierarchy and wiring it all up using this library

nicopap commented 9 months ago

Right now, it's fairly hard to do text inputs in bevy. But there is a simple text input implementation you can take inspiration from here: https://github.com/rparrett/bevy_simple_text_input You would need to adapt it to work with bevy-lunex. Not exactly sure how (I'm not the maintainer or affiliated with them)

IDEDARY commented 9 months ago

Hi, this is the maintainer. Thank you for trying out this lib. As of now, I'm currently in the middle of a massive rewrite which will change a lot of things and hopefully add a lot of defaults, like text input div. For you as a beginner, I actually recommend you to learn something else, more straighforward than this at first. The current version that is available to the public is more like a proof of concept, leaving a lot of problems unanswered like the already mentioned text input. The cyberpunk example is also outdated. The docs are missing currently... We will get to that with time. With time. In my opinion your best shot is to learn something like Belly, which is more CSS like macro style UI lib for Bevy. It doesnt allow such modularity as Lunex, but at least the basic functionality is "finished". Or you might want to wait for the official ongoing BevyUIv2 rewrite that is also happening as we are speaking (0.13 or 0.14 if things go well). After this project matures enough to answer simple problems other than nice styling and UI navigation, you can transition to Lunex :D

ImVexed commented 9 months ago

Thanks for the reply! Sadly it looks like Belly is unmaintained at this point: https://github.com/jkb0o/belly/issues/77 I'll probably just use an integration with egui/imgui and make a mock UI for now until there is some more mature options available for bevy, as most if not all libraries I can find are in a similar situation.