Milchreis / UiBooster

🚀 Creates fast and easy dialogs for utility tools
GNU General Public License v3.0
117 stars 12 forks source link

Feature request: Add toggles #46

Closed TechnicJelle closed 3 years ago

TechnicJelle commented 3 years ago

Hi there! I'm very interested in using this library in my project (Processing, though) to create a settings menu, but I just noticed that there is no real toggle dialog. Would it be possible to add this?

Of course there is already the Multiple selection dialog, but that just doesn't look quite right for a settings menu. ![image](https://user-images.githubusercontent.com/22576047/128266313-d3a261d3-4fe7-4109-824f-3b0da7259fb4.png)

Here's a rough image I mashed up to show what I'm thinking of: fr

As you can see, I added two different buttons of how it might look. For my project, I would prefer the top version, but I can imagine other projects might rather use the bottom one.

Milchreis commented 3 years ago

Hi @TechnicJelle ,

thank you for your feature request. It's a nice idea. Unfortunately there are no switch components in Java Swing by default. That means I had to find a suitable libary or build it for myself. I'll see what I can do 😊

Milchreis commented 3 years ago

I added the checkbox solution, because the toggles are need more time to work with the themes. Here is an example, how to use it: https://github.com/Milchreis/UiBooster/blob/master/src/test/java/de/milchreis/uibooster/FormBuilderTest.java#L212

grafik

TechnicJelle commented 3 years ago

It looks great! Thank you very much for adding this!

Do you know when it's going to be available in the Processing version?

Milchreis commented 3 years ago

Maybe one or two weeks 😊 I will collect some more featues for version 1.14.0