fn select(
    materials: &mut Assets<ColorMaterial>,
    mat_handle: Handle<ColorMaterial>,
    cont: &Contributor,
    trans: &mut Transform,
    text: &mut Text,
    name: &str,
) -> Option<()> {
    let mat = materials.get_mut(mat_handle)?;
    mat.color = COL_SELECTED * cont.color;

    trans.translation.z = 100.0;

    text.sections[0].value = "Contributor: ".to_string();
    text.sections[1].value = name.to_string();
    text.sections[1].style.color = mat.color;

    Some(())
}
/// Change the modulate color to the "selected" colour,
/// bring the object to the front and display the name.
Change the modulate color to the "selected" colour,
bring the object to the front and display the name.
Change the modulate color to the " selected " colour bring the object to the front and display the name .
fn select(
    materials: &mut Assets<ColorMaterial>,
    mat_handle: Handle<ColorMaterial>,
    cont: &Contributor,
    trans: &mut Transform,
    text: &mut Text,
    name: &str,
) -> Option<()> {
    let mat = materials.get_mut(mat_handle)?;
    mat.color = COL_SELECTED * cont.color;
    trans.translation.z = 100.0;
    text.sections[0].value = "Contributor: ".to_string();
    text.sections[1].value = name.to_string();
    text.sections[1].style.color = mat.color;
    Some(())
}
fn select ( materials : & mut Assets < ColorMaterial > , mat_handle : Handle < ColorMaterial > , cont : & Contributor , trans : & mut Transform , text : & mut Text , name : & str , ) -> Option < ( ) > { let mat = materials . get_mut ( mat_handle ) ? ; mat . color = COL_SELECTED * cont . color ; trans . translation . z = 100.0 ; text . sections [ 0 ] . value = " " . to_string ( ) ; text . sections [ 1 ] . value = name . to_string ( ) ; text . sections [ 1 ] . style . color = mat . color ; Some ( ( ) ) }
Change the modulate color to the "selected" colour,
bring the object to the front and display the name.
Change the modulate color to the " selected " colour bring the object to the front and display the name .
materials
&mut Assets<ColorMaterial>
mat_handle
Handle<ColorMaterial>
cont
&Contributor
trans
&mut Transform
text
&mut Text
name
&str
materials
&mut Assets<ColorMaterial>
mat_handle
Handle<ColorMaterial>
cont
&Contributor
trans
&mut Transform
text
&mut Text
name
&str