mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 14:20:04 -04:00
Make color_picker_hsva_2d public. (#1091)
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
@@ -308,8 +308,10 @@ fn color_picker_hsvag_2d(ui: &mut Ui, hsva: &mut HsvaGamma, alpha: Alpha) {
|
|||||||
color_slider_2d(ui, v, s, |v, s| HsvaGamma { s, v, ..opaque }.into());
|
color_slider_2d(ui, v, s, |v, s| HsvaGamma { s, v, ..opaque }.into());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//// Shows a color picker where the user can change the given [`Hsva`] color.
|
||||||
|
///
|
||||||
/// Returns `true` on change.
|
/// Returns `true` on change.
|
||||||
fn color_picker_hsva_2d(ui: &mut Ui, hsva: &mut Hsva, alpha: Alpha) -> bool {
|
pub fn color_picker_hsva_2d(ui: &mut Ui, hsva: &mut Hsva, alpha: Alpha) -> bool {
|
||||||
let mut hsvag = HsvaGamma::from(*hsva);
|
let mut hsvag = HsvaGamma::from(*hsva);
|
||||||
ui.vertical(|ui| {
|
ui.vertical(|ui| {
|
||||||
color_picker_hsvag_2d(ui, &mut hsvag, alpha);
|
color_picker_hsvag_2d(ui, &mut hsvag, alpha);
|
||||||
@@ -323,7 +325,7 @@ fn color_picker_hsva_2d(ui: &mut Ui, hsva: &mut Hsva, alpha: Alpha) -> bool {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Shows a color picker where the user can change the given color.
|
/// Shows a color picker where the user can change the given [`Color32`] color.
|
||||||
///
|
///
|
||||||
/// Returns `true` on change.
|
/// Returns `true` on change.
|
||||||
pub fn color_picker_color32(ui: &mut Ui, srgba: &mut Color32, alpha: Alpha) -> bool {
|
pub fn color_picker_color32(ui: &mut Ui, srgba: &mut Color32, alpha: Alpha) -> bool {
|
||||||
|
|||||||
Reference in New Issue
Block a user