Skip to content
Snippets Groups Projects
Commit eccc1ef8 authored by sam edelsten's avatar sam edelsten
Browse files

restructure utilities

dogfooding showed that they're quite handy to have around
parent 423cb244
No related branches found
No related tags found
No related merge requests found
......@@ -417,7 +417,6 @@ dependencies = [
"js-sys",
"sys-locale",
"unicode-segmentation",
"util",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
......@@ -3182,14 +3181,6 @@ version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
[[package]]
name = "util"
version = "0.1.0"
dependencies = [
"bevy",
"bevy_cosmic_edit",
]
[[package]]
name = "uuid"
version = "1.7.0"
......
workspace = { members = ["util"] }
[package]
name = "bevy_cosmic_edit"
version = "0.19.0"
......@@ -52,4 +51,3 @@ web-sys = { version = "0.3.67", features = [
[dev-dependencies]
insta = "1.29.0"
util = { path = "./util/" }
......@@ -2,11 +2,12 @@
mod buffer;
mod cursor;
pub mod focus;
mod focus;
mod input;
pub mod password;
pub mod placeholder;
mod password;
mod placeholder;
mod render;
pub mod util;
mod widget;
use std::{path::PathBuf, time::Duration};
......
// Common functions for examples
use bevy::{prelude::*, window::PrimaryWindow};
use bevy_cosmic_edit::{focus::FocusedWidget, *};
use crate::*;
pub fn deselect_editor_on_esc(i: Res<ButtonInput<KeyCode>>, mut focus: ResMut<FocusedWidget>) {
if i.just_pressed(KeyCode::Escape) {
......
[package]
name = "util"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
bevy = { version = "0.13", default-features = false, features = [
"bevy_asset",
"bevy_core_pipeline",
"bevy_render",
"bevy_scene",
"bevy_sprite",
"bevy_text",
"bevy_ui",
"bevy_winit",
"png",
"x11",
"webgpu",
] }
bevy_cosmic_edit = { version = "*", path = "../" }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment