-
Hi, I'm mostly targeting a desktop game and would need some very basic dialog boxes: username/password, authentication, file loading, etc... Since core Ebiten does not support it, what is the best approach? For example, is it possible to do the main app in GLFW and then, after loading a user's game, spin up an ebiten game window? What other options are there? Designing these directly in ebiten seems a lot of work not directly aligned with my main project. Thx! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Update: But, maybe it is possible to include some utility libraries like tiny file dialogs available in Ebiten? |
Beta Was this translation helpful? Give feedback.
-
I would avoid doing things separately on different windows. Do everything on Ebitengine, except for the file selection popup. The sad truth is that we don't have any great UI library (https://github.com/blizzy78/ebitenui is the best one but it's archived (EDIT: there's a new maintainer now!), so... it may help, but don't expect much support if you end up getting in trouble...), but there's a good reason for that: we haven't needed it that badly. For what you want to achieve, the only annoying part to write is the file selector, and using a third party library like what Hajime suggested is not just a good way to go about it, but probably the best: delegate the task to the OS's native dialog https://github.com/sqweek/dialog. For text input, you may be interested in https://code.rocketnine.space/tslocum/messeji, but you can roll your own too. Even if new libraries pop up, Ebitengine is not meant for general desktop application development, so UI frameworks are unlikely to provide extense libraries of components and common system functionality. They are more likely to target flexibility so game devs can make their own custom widgets and components easily. |
Beta Was this translation helpful? Give feedback.
I would avoid doing things separately on different windows. Do everything on Ebitengine, except for the file selection popup. The sad truth is that we don't have any great UI library (https://github.com/blizzy78/ebitenui is the best one but it's archived (EDIT: there's a new maintainer now!), so... it may help, but don't expect much support if you end up getting in trouble...), but there's a good reason for that: we haven't needed it that badly.
For what you want to achieve, the only annoying part to write is the file selector, and using a third party library like what Hajime suggested is not just a good way to go about it, but probably the best: delegate the task to the OS's native dialog …