Files
texturecraft/crates/ui-egui/Cargo.toml
dotCooCoo 7f52b87b85 UI: use the shared craft-libs crates for dialogs, shortcuts and quit
Bumps craft-ui and craft-window to craft-libs 1b34eba4 and replaces the
app's own dialog, shortcut and quit code with the shared crates.

File dialogs go through craft-dialogs and no longer stop the frame. An
action that needs a path asks for it and continues when the dialog
answers. An answer that acts on the project does nothing, with a toast,
when another project was opened meanwhile. The browser build keeps its
pickers and the startup and crash message boxes stay blocking.

Shortcuts run through craft-keymap's dispatcher, in the main window and
in floating panels. Saved shortcuts keep their stored form, and the
Keyboard shortcuts window and the shortcut labels do not change. A
shortcut on a symbol that needs Shift is recorded without Shift, and
saved shortcuts in the old form still run. A shortcut now runs only on
its exact chord: an extra Shift or Alt no longer runs a plain-key
shortcut.

A window close quits through craft-quit, and the close check runs in
logic, so closing a minimized window with unsaved changes restores it and
asks. A close during a stroke finishes the stroke and asks. The macOS app
menu comes from craft-menu. The unsaved-changes prompt goes on once its
Save dialog has saved the project, and stays open after Cancel or a failed
save.

The window frame guard on Windows and the title bar's buttons stay in the
app, since craft-libs has no code for them.
2026-11-08 22:07:12 -08:00

59 lines
2.3 KiB
TOML

[package]
name = "texturecraft-ui-egui"
description = "TextureCraft's egui shell: docks, toolbars, viewports and windows"
version.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
texturecraft-engine = { workspace = true }
texturecraft-render = { workspace = true }
eframe = { workspace = true, features = ["default_fonts", "wgpu", "persistence"] }
egui = { workspace = true }
craft-ui = { workspace = true }
craft-window = { workspace = true }
craft-keymap = { workspace = true }
craft-quit = { workspace = true }
egui-phosphor = { version = "0.14", features = ["regular", "fill"] }
serde = { workspace = true }
serde_json = { workspace = true }
rayon = { workspace = true }
log = { workspace = true }
base64 = "0.22"
image = { workspace = true }
zip = { workspace = true }
# The OS UI language for the first run (MIT OR Apache-2.0; the browser asks `navigator.language`).
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
sys-locale = "0.3"
# Floating panels open as OS windows.
craft-ui = { workspace = true, features = ["native-windows"] }
# Help > Check for Updates and the check at start (updates_ui.rs).
craft-update = { workspace = true }
# Native file dialogs (file_dialogs.rs); the browser build has none.
craft-dialogs = { workspace = true }
# build.rs: the interface faces lose their Private Use Area, where the icon font draws (the
# versions craft-libs' craft-fonts-build subsets with).
[build-dependencies]
skera = "0.8"
skrifa = { version = "0.48", default-features = false, features = ["std"] }
# Browser file I/O (web_files.rs): async pickers and Blob downloads.
[target.'cfg(target_arch = "wasm32")'.dependencies]
rfd = { workspace = true }
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
js-sys = "0.3"
web-sys = { version = "0.3", features = ["Window", "Document", "HtmlElement", "HtmlAnchorElement", "Blob", "BlobPropertyBag", "Url", "CssStyleDeclaration", "Navigator"] }
# winit needs a window system on Linux, so the crate's own tests build with X11.
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
eframe = { workspace = true, features = ["x11"] }
# Offscreen pictures of the whole window (tests/ui_snapshots.rs).
egui_kittest = { version = "0.37", features = ["wgpu", "eframe"] }
image = { workspace = true }