1use bevy_color::{
2 palettes::tailwind::{SKY_300, SKY_400, SLATE_700},
3 Color,
4};
5use bevy_ecs::component::Component;
6
7#[derive(impl bevy_ecs::component::Component for TextCursorStyle where
Self: ::core::marker::Send + ::core::marker::Sync + 'static {
const STORAGE_TYPE: bevy_ecs::component::StorageType =
bevy_ecs::component::StorageType::Table;
type Mutability = bevy_ecs::component::Mutable;
fn register_required_components(_requiree:
bevy_ecs::component::ComponentId,
required_components:
&mut bevy_ecs::component::RequiredComponentsRegistrator) {}
fn clone_behavior() -> bevy_ecs::component::ComponentCloneBehavior {
use bevy_ecs::component::{
DefaultCloneBehaviorBase, DefaultCloneBehaviorViaClone,
};
(&&&bevy_ecs::component::DefaultCloneBehaviorSpecialization::<Self>::default()).default_clone_behavior()
}
fn relationship_accessor()
->
::core::option::Option<bevy_ecs::relationship::ComponentRelationshipAccessor<Self>> {
::core::option::Option::None
}
}Component, #[automatically_derived]
impl ::core::clone::Clone for TextCursorStyle {
#[inline]
fn clone(&self) -> TextCursorStyle {
let _: ::core::clone::AssertParamIsClone<Color>;
let _: ::core::clone::AssertParamIsClone<Option<Color>>;
*self
}
}Clone, #[automatically_derived]
impl ::core::marker::Copy for TextCursorStyle { }Copy, #[automatically_derived]
impl ::core::fmt::Debug for TextCursorStyle {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field4_finish(f,
"TextCursorStyle", "color", &self.color, "selection_color",
&self.selection_color, "unfocused_selection_color",
&self.unfocused_selection_color, "selected_text_color",
&&self.selected_text_color)
}
}Debug, #[automatically_derived]
impl ::core::cmp::PartialEq for TextCursorStyle {
#[inline]
fn eq(&self, other: &TextCursorStyle) -> bool {
self.color == other.color &&
self.selection_color == other.selection_color &&
self.unfocused_selection_color ==
other.unfocused_selection_color &&
self.selected_text_color == other.selected_text_color
}
}PartialEq)]
14pub struct TextCursorStyle {
15 pub color: Color,
17 pub selection_color: Color,
19 pub unfocused_selection_color: Color,
24 pub selected_text_color: Option<Color>,
26}
27
28impl Default for TextCursorStyle {
29 fn default() -> Self {
30 Self {
31 color: Color::from(SLATE_700),
32 selection_color: Color::from(SKY_300),
33 unfocused_selection_color: Color::from(SKY_400),
34 selected_text_color: None,
35 }
36 }
37}