Skip to content

Commit d6790e4

Browse files
committed
CI
1 parent e49c58f commit d6790e4

File tree

3 files changed

+1
-130
lines changed

3 files changed

+1
-130
lines changed

crates/bevy_text/src/input/buffer.rs

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,3 @@
1-
//! This module provides text editing functionality, by wrapping the functionality of the
2-
//! [`cosmic_text`] crate.
3-
//!
4-
//! The primary entry point into the text editing functionality is the [`TextInputBuffer`] component,
5-
//! which includes a [`cosmic_text::Editor`], and adds the associated "required components" needed
6-
//! to construct functioning text input fields.
7-
//!
8-
//! ## How this works
9-
//!
10-
//! Text editing functionality is included as part of [`TextPlugin`](crate::TextPlugin),
11-
//! and the systems which perform the work are grouped under the [`TextInputSystems`] system set.
12-
//!
13-
//! The [`TextInputBuffer`] comes with the following required components that act as machinery to convert user inputs into text:
14-
//!
15-
//! * [`TextInputValue`] - Contains the current text in the text input buffer.
16-
//! * Automatically synchronized with the buffer by [`apply_text_edits`] after any edits are applied.
17-
//! * [`TextEdits`] - Text input commands queue, used to queue up text edit and navigation actions.\
18-
//! * Contains a queue of [`TextEdit`] actions that are applied to the buffer.
19-
//! * These are applied by the [`apply_text_edits` system.
20-
//! * [`TextInputTarget`] - Details of the render target the text input will be rendered to, such as size and scale factor.
21-
//!
22-
//!
23-
//! Layouting is done in:
24-
//!
25-
//! * [`update_text_input_layouts`] - Updates the `TextLayoutInfo` for each text input for rendering.
26-
//! * [`update_placeholder_layouts`] - Updates the `TextLayoutInfo` for each [`Placeholder`] for rendering.
27-
//!
28-
//! ## Configuring text input
29-
//!
30-
//! Several components are used to configure the text input, and belong on the [`TextInputBuffer`] entity:
31-
//!
32-
//! * [`TextInputAttributes`] - Common text input properties set by the user, such as font, font size, line height, justification, maximum characters etc.
33-
//! * [`TextInputFilter`] - Optional component that can be added to restrict the text input to certain formats, such as integers, decimals, hexadecimal etc.
34-
//! * [`PasswordMask`] - Optional component that can be added to hide the text input buffer contents by replacing the characters with a mask character.
35-
//! * [`Placeholder`] - Optional component that can be added to display placeholder text when the input buffer is empty.
36-
//! * [`CursorBlink`] - Optional component that controls cursor blinking.
37-
//!
38-
//! ## Copy-paste and clipboard support
39-
//!
40-
//! The clipboard support provided by this module is very basic, and only works within the `bevy` app,
41-
//! storing a simple [`String`].
42-
//!
43-
//! It can be accessed via the [`Clipboard`] resource.
441

452
use bevy_asset::{AssetEvent, Assets, Handle};
463
use bevy_derive::Deref;
@@ -96,7 +53,7 @@ pub struct TextInputAttributes {
9653
pub const DEFAULT_FONT_SIZE: f32 = 20.;
9754
/// Default line height factor (relative to font size)
9855
///
99-
/// `1.2` corresponds to `normal` in https://developer.mozilla.org/en-US/docs/Web/CSS/line-height
56+
/// `1.2` corresponds to `normal` in `<https://developer.mozilla.org/en-US/docs/Web/CSS/line-height>`
10057
pub const DEFAULT_LINE_HEIGHT_FACTOR: f32 = 1.2;
10158
/// Default line height
10259
pub const DEFAULT_LINE_HEIGHT: f32 = DEFAULT_FONT_SIZE * DEFAULT_LINE_HEIGHT_FACTOR;

crates/bevy_text/src/input/target.rs

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,3 @@
1-
//! This module provides text editing functionality, by wrapping the functionality of the
2-
//! [`cosmic_text`] crate.
3-
//!
4-
//! The primary entry point into the text editing functionality is the [`TextInputBuffer`] component,
5-
//! which includes a [`cosmic_text::Editor`], and adds the associated "required components" needed
6-
//! to construct functioning text input fields.
7-
//!
8-
//! ## How this works
9-
//!
10-
//! Text editing functionality is included as part of [`TextPlugin`](crate::TextPlugin),
11-
//! and the systems which perform the work are grouped under the [`TextInputSystems`] system set.
12-
//!
13-
//! The [`TextInputBuffer`] comes with the following required components that act as machinery to convert user inputs into text:
14-
//!
15-
//! * [`TextInputValue`] - Contains the current text in the text input buffer.
16-
//! * Automatically synchronized with the buffer by [`apply_text_edits`] after any edits are applied.
17-
//! * [`TextEdits`] - Text input commands queue, used to queue up text edit and navigation actions.\
18-
//! * Contains a queue of [`TextEdit`] actions that are applied to the buffer.
19-
//! * These are applied by the [`apply_text_edits` system.
20-
//! * [`TextInputTarget`] - Details of the render target the text input will be rendered to, such as size and scale factor.
21-
//!
22-
//!
23-
//! Layouting is done in:
24-
//!
25-
//! * [`update_text_input_layouts`] - Updates the `TextLayoutInfo` for each text input for rendering.
26-
//! * [`update_placeholder_layouts`] - Updates the `TextLayoutInfo` for each [`Placeholder`] for rendering.
27-
//!
28-
//! ## Configuring text input
29-
//!
30-
//! Several components are used to configure the text input, and belong on the [`TextInputBuffer`] entity:
31-
//!
32-
//! * [`TextInputAttributes`] - Common text input properties set by the user, such as font, font size, line height, justification, maximum characters etc.
33-
//! * [`TextInputFilter`] - Optional component that can be added to restrict the text input to certain formats, such as integers, decimals, hexadecimal etc.
34-
//! * [`PasswordMask`] - Optional component that can be added to hide the text input buffer contents by replacing the characters with a mask character.
35-
//! * [`Placeholder`] - Optional component that can be added to display placeholder text when the input buffer is empty.
36-
//! * [`CursorBlink`] - Optional component that controls cursor blinking.
37-
//!
38-
//! ## Copy-paste and clipboard support
39-
//!
40-
//! The clipboard support provided by this module is very basic, and only works within the `bevy` app,
41-
//! storing a simple [`String`].
42-
//!
43-
//! It can be accessed via the [`Clipboard`] resource.
441

452
use bevy_ecs::component::Component;
463
use bevy_math::Vec2;

crates/bevy_text/src/input/text_edit.rs

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,3 @@
1-
//! This module provides text editing functionality, by wrapping the functionality of the
2-
//! [`cosmic_text`] crate.
3-
//!
4-
//! The primary entry point into the text editing functionality is the [`TextInputBuffer`] component,
5-
//! which includes a [`cosmic_text::Editor`], and adds the associated "required components" needed
6-
//! to construct functioning text input fields.
7-
//!
8-
//! ## How this works
9-
//!
10-
//! Text editing functionality is included as part of [`TextPlugin`](crate::TextPlugin),
11-
//! and the systems which perform the work are grouped under the [`TextInputSystems`] system set.
12-
//!
13-
//! The [`TextInputBuffer`] comes with the following required components that act as machinery to convert user inputs into text:
14-
//!
15-
//! * [`TextInputValue`] - Contains the current text in the text input buffer.
16-
//! * Automatically synchronized with the buffer by [`apply_text_edits`] after any edits are applied.
17-
//! * [`TextEdits`] - Text input commands queue, used to queue up text edit and navigation actions.\
18-
//! * Contains a queue of [`TextEdit`] actions that are applied to the buffer.
19-
//! * These are applied by the [`apply_text_edits` system.
20-
//! * [`TextInputTarget`] - Details of the render target the text input will be rendered to, such as size and scale factor.
21-
//!
22-
//!
23-
//! Layouting is done in:
24-
//!
25-
//! * [`update_text_input_layouts`] - Updates the `TextLayoutInfo` for each text input for rendering.
26-
//! * [`update_placeholder_layouts`] - Updates the `TextLayoutInfo` for each [`Placeholder`] for rendering.
27-
//!
28-
//! ## Configuring text input
29-
//!
30-
//! Several components are used to configure the text input, and belong on the [`TextInputBuffer`] entity:
31-
//!
32-
//! * [`TextInputAttributes`] - Common text input properties set by the user, such as font, font size, line height, justification, maximum characters etc.
33-
//! * [`TextInputFilter`] - Optional component that can be added to restrict the text input to certain formats, such as integers, decimals, hexadecimal etc.
34-
//! * [`PasswordMask`] - Optional component that can be added to hide the text input buffer contents by replacing the characters with a mask character.
35-
//! * [`Placeholder`] - Optional component that can be added to display placeholder text when the input buffer is empty.
36-
//! * [`CursorBlink`] - Optional component that controls cursor blinking.
37-
//!
38-
//! ## Copy-paste and clipboard support
39-
//!
40-
//! The clipboard support provided by this module is very basic, and only works within the `bevy` app,
41-
//! storing a simple [`String`].
42-
//!
43-
//! It can be accessed via the [`Clipboard`] resource.
441

452
use alloc::collections::VecDeque;
463
use bevy_ecs::{

0 commit comments

Comments
 (0)