You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create colored sliders and radio buttons, similar to these ones:
Since egui doesn't offer an API for this right now, I had to copy the egui::RadioButton types into my project, and extending its functionality. But I'm hesitant to do the same for egui::Slider, as there is a big of chunk of code there. It would be amazing if coloring these widgets is supported by egui natively.
I'm happy to take a jab at adding these to egui, but I wanted to get some agreements on the API first. For RadioButtons, I propose that we can add arguments base_color: Color32, checked_color: Color32 to RadioButton::new(). For sliders, I'd like for the API to support transitions, and its not obvious to me how the API should look like.
I'd appreciate feedback on
Should egui have an API for coloring sliders?
If yes, how can I help add one?
If no, what would be the recommended approach to implement this in my own project? Is there a better way other than copying egui::Slider and extending it?
The text was updated successfully, but these errors were encountered:
I think it is possible to do what you want without copying the entire widget code. It's just somewhat cumbersome. You can change the color of some parts of the widget, so you can make parts of it transparent and paint other things behind or in front of it. For example:
I'm trying to create colored sliders and radio buttons, similar to these ones:
Since egui doesn't offer an API for this right now, I had to copy the
egui::RadioButton
types into my project, and extending its functionality. But I'm hesitant to do the same foregui::Slider
, as there is a big of chunk of code there. It would be amazing if coloring these widgets is supported by egui natively.I'm happy to take a jab at adding these to egui, but I wanted to get some agreements on the API first. For RadioButtons, I propose that we can add arguments
base_color: Color32, checked_color: Color32
toRadioButton::new()
. For sliders, I'd like for the API to support transitions, and its not obvious to me how the API should look like.I'd appreciate feedback on
egui::Slider
and extending it?The text was updated successfully, but these errors were encountered: