mirror of
https://github.com/bevyengine/bevy
synced 2025-01-21 09:34:29 +00:00
5e1756954f
# Objective Fixes #5153 ## Solution Search for all enums and manually check if they have default impls that can use this new derive. By my reckoning: | enum | num | |-|-| | total | 159 | | has default impl | 29 | | default is unit variant | 23 |
18 lines
548 B
Rust
18 lines
548 B
Rust
use bevy_ecs::{component::Component, reflect::ReflectComponent};
|
|
use bevy_reflect::std_traits::ReflectDefault;
|
|
use bevy_reflect::Reflect;
|
|
|
|
// FIXME: This should probably be part of bevy_render2!
|
|
/// Alpha mode
|
|
#[derive(Component, Debug, Default, Reflect, Copy, Clone, PartialEq)]
|
|
#[reflect(Component, Default)]
|
|
pub enum AlphaMode {
|
|
#[default]
|
|
Opaque,
|
|
/// An alpha cutoff must be supplied where alpha values >= the cutoff
|
|
/// will be fully opaque and < will be fully transparent
|
|
Mask(f32),
|
|
Blend,
|
|
}
|
|
|
|
impl Eq for AlphaMode {}
|