Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
edc879c
Added `input` module to `bevy_text` with systems and components to su…
ickshonpe Jul 30, 2025
f36f9d0
use `is_empty()` instead of checking lengeth is 0
ickshonpe Jul 30, 2025
771477c
Renamings:
ickshonpe Aug 1, 2025
11074c0
Renamed `TextInputPasswordMask` to `PasswordMask`
ickshonpe Aug 1, 2025
f991426
Updated comments including suggestions from review
ickshonpe Aug 1, 2025
62ca2f8
Added a `TextEdit::InsertString` variant. Use to insert a string at …
ickshonpe Aug 1, 2025
308d0c9
Renamed `appy_text_input_action` to `apply_text_edit`
ickshonpe Aug 1, 2025
158f329
Updated `TextInputValue`'s comments to explain that it is synchronise…
ickshonpe Aug 1, 2025
a7d5e45
Expanded the doc comments for `TextInputAttributes`.
ickshonpe Aug 1, 2025
785a1d5
Renamed `TextInputUndoHistory` to `UndoHistory`
ickshonpe Aug 1, 2025
f637123
Merge branch 'main' into bevy-text-input
ickshonpe Aug 1, 2025
b4589b8
Updated buffer's docs and added a `needs_redraw` function.
ickshonpe Aug 1, 2025
8e61105
Updated the doc comments for `apply_text_edits`
ickshonpe Aug 1, 2025
ede9d60
updated another doc comment
ickshonpe Aug 1, 2025
a80a5dc
More doc comments
ickshonpe Aug 1, 2025
0b2c268
Edited the doc comment for apply_text_edits
ickshonpe Aug 1, 2025
93149bc
More comment edits
ickshonpe Aug 1, 2025
049e350
Renamed `Prompt` to `Placeholder` and also updated the comments and t…
ickshonpe Aug 1, 2025
3e9c860
Fixed renaming.
ickshonpe Aug 1, 2025
5c956c6
Rephrased doc comment.
ickshonpe Aug 1, 2025
6396a11
Spellings.
ickshonpe Aug 1, 2025
5d34e6d
Renamed the `InvalidInput` and `ValueChanged` `TextInputEvent` varian…
ickshonpe Aug 1, 2025
57a70cd
Fixed event dispatch.
ickshonpe Aug 1, 2025
85bed33
Added release note
ickshonpe Aug 1, 2025
f43c461
Added migration note for `load_font_to_fontdb` function changes.
ickshonpe Aug 1, 2025
0b6b1d2
Update release note
ickshonpe Aug 1, 2025
897d741
Merge branch 'main' into bevy-text-input
ickshonpe Aug 2, 2025
2bd0216
Update crates/bevy_text/src/input.rs
ickshonpe Aug 2, 2025
255d2c1
Update crates/bevy_text/src/input.rs
ickshonpe Aug 2, 2025
419bcaf
Update crates/bevy_text/src/input.rs
ickshonpe Aug 2, 2025
fe38cf2
Update release-content/release-notes/bevy_text_input_module.md
ickshonpe Aug 2, 2025
dea6616
Update crates/bevy_text/src/input.rs
ickshonpe Aug 2, 2025
48475ff
FIxed comment
ickshonpe Aug 2, 2025
893f9c4
Merge branch 'bevy-text-input' of https://github.com/ickshonpe/bevy i…
ickshonpe Aug 2, 2025
96bacc1
Fix comments
ickshonpe Aug 2, 2025
2035726
Added text input 2d example
ickshonpe Aug 4, 2025
a692fd8
cargo run -p build-templated-pages -- build-example-page
ickshonpe Aug 4, 2025
9371313
Merge branch 'main' into bevy-text-input
alice-i-cecile Aug 5, 2025
27dc3df
Merge branch 'bevy-text-input' of https://github.com/ickshonpe/bevy i…
ickshonpe Aug 5, 2025
622bbe6
Added example skeleton.
ickshonpe Aug 5, 2025
e20e670
Merge branch 'main' into bevy-text-input
ickshonpe Aug 8, 2025
307590a
Added `TextInputStyle` component.
ickshonpe Aug 8, 2025
6611bde
Updated example
ickshonpe Aug 8, 2025
811f0c8
Added `CursorBlinkInterval` resource
ickshonpe Aug 8, 2025
2f43052
Renamed CursorBlinkInterval to TextCursorBlinkInterval.
ickshonpe Aug 8, 2025
acc0706
Added doc comment for resource
ickshonpe Aug 8, 2025
c72f7ce
Deleted style component.
ickshonpe Aug 8, 2025
eb15165
Fixed target size scaling.
ickshonpe Aug 8, 2025
171de2f
Updated comments
ickshonpe Aug 8, 2025
96e3c6e
Clean up
ickshonpe Aug 8, 2025
0ba0b68
Merge branch 'main' into bevy-text-input
ickshonpe Aug 11, 2025
295de7f
Fixed example imports
ickshonpe Aug 11, 2025
6b3f3d8
Anchor output below input in example
ickshonpe Aug 11, 2025
f794658
Removed unnecessary casts
ickshonpe Aug 11, 2025
00a0c13
Fixed wrong casts
ickshonpe Aug 11, 2025
f03a7cf
New `InvalidTextEditError`, returned by `apply_text_edit`.
ickshonpe Aug 11, 2025
fb73aa3
Only collect buffer text if `TextInputValue` is present.
ickshonpe Aug 11, 2025
288ea3b
take just Editor'_> with is_cursor_at_end_of_line
ickshonpe Aug 11, 2025
6817f5c
Added release note suggestion
ickshonpe Aug 11, 2025
7ab3c19
Update crates/bevy_text/src/input.rs
ickshonpe Aug 11, 2025
caa38b1
Drop undo/redo
Zeophlite Aug 19, 2025
d6fb883
Merge remote-tracking branch 'origin/main' into no-undo
Zeophlite Aug 26, 2025
3146a97
Backticks in docs
Zeophlite Aug 6, 2025
3e1621d
Fix ambiguity_detection
Zeophlite Aug 6, 2025
7f2a1ce
Merge remote-tracking branch 'origin/main' into no-undo
Zeophlite Aug 26, 2025
ae9b9dc
CI
Zeophlite Aug 26, 2025
430f85e
Apply suggestions from code review
Zeophlite Aug 27, 2025
acaff98
Reposition anchor
Zeophlite Aug 27, 2025
9584a78
Merge remote-tracking branch 'origin/main' into g
Zeophlite Aug 27, 2025
e981c7b
Clarify docs
Zeophlite Aug 27, 2025
60a6349
Feedback
Zeophlite Aug 28, 2025
2f1d6d4
Merge remote-tracking branch 'origin/main' into no-undo
Zeophlite Aug 28, 2025
1b1bfcc
Lint
Zeophlite Aug 28, 2025
3e14a7d
Copyedits from Vero
alice-i-cecile Aug 28, 2025
9787de6
Fix PR number for font migration guide
alice-i-cecile Aug 28, 2025
91ff4a5
Remove already redundant components when spawning
alice-i-cecile Aug 28, 2025
cb9aa00
Notes from playing around with the example
alice-i-cecile Aug 28, 2025
66048df
Initial module docs
alice-i-cecile Aug 28, 2025
32af1dc
TextInputBuffer config
alice-i-cecile Aug 28, 2025
44a4101
Better docs for `Placeholder`
alice-i-cecile Aug 28, 2025
4089f8a
More breadcrumbs
alice-i-cecile Aug 28, 2025
9a39b80
Docs for `TextEdit`
alice-i-cecile Aug 28, 2025
76b5835
don't need textfont and react to font asset events
mockersf Aug 28, 2025
83956c7
Make cursor blink optional component
Zeophlite Aug 29, 2025
f018a7b
Merge remote-tracking branch 'origin/main' into no-undo
Zeophlite Aug 29, 2025
4b79c15
Nits
Zeophlite Aug 29, 2025
b9e6198
CI
Zeophlite Aug 29, 2025
053103b
Less magic
Zeophlite Aug 30, 2025
c7e4a0f
Remove TextEdit::Submit
Zeophlite Aug 30, 2025
1c24810
Merge remote-tracking branch 'origin/main' into no-undo
Zeophlite Aug 30, 2025
e321a9f
reposition -> calculate_bounds
Zeophlite Aug 30, 2025
29b29db
Merge remote-tracking branch 'origin/main' into no-undo
Zeophlite Sep 2, 2025
9f7b1af
Split bevy_text input.rs into input/
Zeophlite Sep 2, 2025
e49c58f
Merge remote-tracking branch 'origin/main' into no-undo
Zeophlite Sep 2, 2025
0b10def
CI
Zeophlite Sep 2, 2025
54adb03
Squashed commit of the following:
Zeophlite Sep 2, 2025
7bc9f3f
CI
Zeophlite Sep 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 74 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ default = [
"animation",
"bevy_asset",
"bevy_audio",
"bevy_clipboard",
"bevy_color",
"bevy_core_pipeline",
"bevy_core_widgets",
Expand Down Expand Up @@ -291,6 +292,9 @@ bevy_log = ["bevy_internal/bevy_log"]
# Enable input focus subsystem
bevy_input_focus = ["bevy_internal/bevy_input_focus"]

# Clipboard access
bevy_clipboard = ["bevy_internal/bevy_clipboard"]

# Headless widget collection for Bevy UI.
bevy_core_widgets = ["bevy_internal/bevy_core_widgets"]

Expand Down Expand Up @@ -866,6 +870,17 @@ description = "Renders text to multiple windows with different scale factors usi
category = "2D Rendering"
wasm = true

[[example]]
name = "text_input_2d"
path = "examples/2d/text_input_2d.rs"
doc-scrape-examples = true

[package.metadata.example.text_input_2d]
name = "Text Input 2D"
description = "Text input in 2D"
category = "2D Rendering"
wasm = true

[[example]]
name = "texture_atlas"
path = "examples/2d/texture_atlas.rs"
Expand Down Expand Up @@ -2693,12 +2708,12 @@ category = "Input"
wasm = false

[[example]]
name = "text_input"
path = "examples/input/text_input.rs"
name = "ime_text_input"
path = "examples/input/ime_text_input.rs"
doc-scrape-examples = true

[package.metadata.example.text_input]
name = "Text Input"
[package.metadata.example.ime_text_input]
name = "IME Text Input"
description = "Simple text input with IME support"
category = "Input"
wasm = false
Expand Down Expand Up @@ -3393,6 +3408,17 @@ description = "Demonstrates dragging and dropping UI nodes"
category = "UI (User Interface)"
wasm = true

[[example]]
name = "clipboard"
path = "examples/ui/clipboard.rs"
doc-scrape-examples = true

[package.metadata.example.clipboard]
name = "Clipboard"
description = "Demonstrates accessing the clipboard to retrieve and display text"
category = "UI (User Interface)"
wasm = true

[[example]]
name = "display_and_visibility"
path = "examples/ui/display_and_visibility.rs"
Expand Down Expand Up @@ -3504,6 +3530,50 @@ description = "Illustrates creating and updating text"
category = "UI (User Interface)"
wasm = true

[[example]]
name = "text_box"
path = "examples/ui/text_box.rs"
doc-scrape-examples = true

[package.metadata.example.text_box]
name = "Text Box"
description = "Example demonstrating a text input box"
category = "UI (User Interface)"
wasm = true

[[example]]
name = "text_input"
path = "examples/ui/text_input.rs"
doc-scrape-examples = true

[package.metadata.example.text_input]
name = "Text Input"
description = "Example demonstrating multiple text inputs"
category = "UI (User Interface)"
wasm = true

[[example]]
name = "password_input"
path = "examples/ui/password_input.rs"
doc-scrape-examples = true

[package.metadata.example.password_input]
name = "Password Input"
description = "Example demonstrating a password input field"
category = "UI (User Interface)"
wasm = true

[[example]]
name = "text_field"
path = "examples/ui/text_field.rs"
doc-scrape-examples = true

[package.metadata.example.text_field]
name = "Single Line Text Input"
description = "Example demonstrating a single line text input"
category = "UI (User Interface)"
wasm = true

[[example]]
name = "text_background_colors"
path = "examples/ui/text_background_colors.rs"
Expand Down
Binary file added assets/fonts/NotoNaskhArabic-Medium.ttf
Binary file not shown.
Binary file added assets/fonts/NotoSans-Medium.ttf
Binary file not shown.
93 changes: 93 additions & 0 deletions assets/fonts/OFL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Copyright 2022 The Noto Project Authors (https://github.com/notofonts/arabic)

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://openfontlicense.org


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file added assets/fonts/Orbitron-Medium.ttf
Binary file not shown.
Binary file added assets/sounds/invalid_key.ogg
Binary file not shown.
Binary file added assets/sounds/key_press.ogg
Binary file not shown.
30 changes: 30 additions & 0 deletions crates/bevy_clipboard/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[package]
name = "bevy_clipboard"
version = "0.17.0-dev"
edition = "2024"
description = "Provides clipboard support for Bevy Engine"
homepage = "https://bevyengine.org"
repository = "https://github.com/bevyengine/bevy"
license = "MIT OR Apache-2.0"
keywords = ["bevy", "clipboard"]

[dependencies]
# bevy
bevy_app = { path = "../bevy_app", version = "0.17.0-dev", default-features = false }
bevy_ecs = { path = "../bevy_ecs", version = "0.17.0-dev", default-features = false }
bevy_platform = { path = "../bevy_platform", version = "0.17.0-dev", default-features = false }

[target.'cfg(any(windows, unix))'.dependencies]
arboard = { version = "3.5.0", default-features = false }

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = { version = "0.2" }
web-sys = { version = "0.3", features = ["Navigator", "Clipboard"] }
wasm-bindgen-futures = "0.4"

[lints]
workspace = true

[package.metadata.docs.rs]
rustdoc-args = ["-Zunstable-options", "--generate-link-to-definition"]
all-features = true
Loading
Loading