-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Feature request: dialogs #104
Comments
Off topic: I've published a new plugin made with |
Great! Glad this library helped! You can just edit that page and add your repository link. The list is sorted by repository name (not the username).
That is a common use-case. So we can definitely add it. We'll just need to figure out how to give total control of how it'll be rendered to the
You can easily create such a dialog component for a specific use-case. But doing it in a generalized way that can serve all the use-cases is a bit hard to do. But I'll definitely look into it. If you have any ideas/suggestions, those are welcomed too! 😃 |
@MunifTanjim One simplified solution would be to just allow the Input to include a message in addition to the title. I had hacked in a version of this that I didn't end up using but could satisfy the use case here. The message would be a NuiText object or objects. In that case the user would type in an answer like a TUI prompt. Another alternative that is closer to the request is to create a generic MessageBox or Alert style popup that takes a title and message but does not have any prompt, and just let the developer add mappings to the window to represent the choices they want. I actually created my own simple It automatically sizes to content, which should probably have some restrictions but it has worked out so far in my usage. |
I think that wouldn't be a dialog component. We're talking about something like this:
Well rendering the choices is the real challenge. We can already open a But taking a list of choices (e.g. Then comes the challenge of alignment - user provides 3 choices, wants 1 of them to be rendered on the left, and the other 2 on the right... or maybe wants them to rendered with equal spacing between them. (Then the first challenge again, what happens if one of those choices are too long and all of them doesn't fit in the same line). You get the idea. 😂 Kinda hard to do. |
Oh yeah, that's super hard. I was thinking of a simpler solution where the user has to format the text they want displayed before creating the popup. Creating buttons in a tui is really going above and beyond and maybe more than anyone really needs. |
I think that we need something simplified, something that fits for a general use-case. We're not aiming to do something like this |
Hi @MunifTanjim,
first of all thanks for maintaining this plugin
It'd be really cool to have message box/dialogs, something like QT message box or GTK message dialog
So user needs only to specify text message to be displayed and choices. Sample choices could be "Yes/No" and "Ok/Cancel", but a user should also be able to specify custom option like "Apple/Banana/Cherry". And every option should be reachable by a keymap, for example pressing
a
for Apple orb
for Banana ory
for Yes or a custom keymap for a custom choice.What do you think about that?
The text was updated successfully, but these errors were encountered: