MaterialUI
MaterialUI copied to clipboard
Component: Dialogs
I had to fix 2 of the 3 popups because they were using outdated buttons. The popup examples are great, but I think that that's what they are, popup examples. They are examples of popups people can create and have in their scene to call.
What would be way better, is to create a bunch of different dialog types (see below), and allow users to call them via code (same thing than the Toasts). Because if you have 200 different dialogs in the game, you will certainly not create all of them in the scene and just display them.
So, once thing awesome, would be to have a DialogManager, on which there is multiple public methods to display different dialogs, such as :
- Simple dialog (a dialog with just text and one button)
- Title dialog (title, text and one button)
- Title action dialog (title, text and two buttons)
- List select dialog (title, and a list of text to select from and two buttons), such as http://material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0Bx4BSt6jniD7Y3RiNHJuOTNRMms/components_dialogs_confirmation2.png
- List image select dialog (same thing, but it's now a list with a picture and a text, and no more radio buttons) http://material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0Bx4BSt6jniD7VEY5aXF1Q21nT2c/components_dialogs_simple2.png
And even better, it could be just 3 different prefabs, the first one for the basic things, the second for the select, and the third for image select. And we could have just one public method call for each, that requires title, text, button1, button2, and if you pass null to one of them, we do not display the title, or do not display 1 or all the buttons etc...
All of these dialogs will have a scrolling by default? Like, if the content is bigger than the height of the screen, it become scrollable? I don't know :/
And if someone wants to use a custom dialog, either he will use one that he already added in the scene, or better, we could add a public method, that take a Resources name as parameter, such as: DialogManager.ShowCustomDialog("MyGreenListDialog") it would maybe return the gameObject that has just been instantiated. So users can just have MyCustomDialogManager for example, and do what they want with it inside (we could provide one as example).
What do you think about all that? Do you want to do it? Or should I? :)