bevy/crates/bevy_editor/src/lib.rs
jbuehler23 be278fb1dc feat(editor): introduce reusable UI widgets for the editor interface
- Added a new module for editor UI widgets, including ScrollViewBuilder, CoreScrollArea, ExpansionButton, BasicPanel, and ScrollableContainer.
- Implemented basic theme support with EditorTheme struct.
- Created a Panel widget with collapsible and resizable features.
- Developed a scrollable area widget with mouse wheel support and content height calculation methods.
- Added examples for using scroll widgets and programmatic scrolling.
- Introduced a simple panel widget with configurable dimensions and styling.
- Implemented a simple scrollable container with mouse wheel support.
- Established a theming system compatible with bevy_feathers, including themed UI elements and a theme management plugin.
2025-07-18 14:39:07 +01:00

86 lines
2.6 KiB
Rust

//! # Bevy Editor
//!
//! A comprehensive, modular real-time editor for the Bevy game engine using bevy_remote.
//!
//! ## Features
//!
//! - **Entity Inspector**: Browse and select entities in a clean interface
//! - **Component Inspector**: Detailed component viewing with expandable fields
//! - **Modern UI**: Dark theme with professional styling
//! - **Remote Integration**: Built-in support for `bevy_remote` protocol
//! - **Modular Design**: Use individual components or the full editor
//! - **Scrollable Views**: Native Bevy scrolling with bevy_core_widgets integration
//!
//! ## Quick Start
//!
//! ```rust
//! use bevy::prelude::*;
//! use bevy_editor::prelude::EditorPlugin;
//!
//! fn main() {
//! App::new()
//! .add_plugins(DefaultPlugins)
//! .add_plugins(EditorPlugin)
//! .run();
//! }
//! ```
//!
//! ## Architecture
//!
//! The editor is built with a modular architecture that allows for flexible usage:
//!
//! - **Core Editor**: Main editor plugin that orchestrates all components
//! - **Panels**: Individual UI panels (entity list, component inspector)
//! - **Widgets**: Reusable UI components (scroll views, expansion buttons)
//! - **Remote Client**: HTTP client for bevy_remote protocol
//! - **Formatting**: Component data formatting and display utilities
//! - **Themes**: UI styling and theming system
//!
//! ## Modular Usage
//!
//! Individual components can be used separately for custom editor implementations:
//!
//! ```rust,no_run
//! use bevy::prelude::*;
//! use bevy_editor::panels::EntityListPlugin;
//! use bevy_editor::widgets::WidgetsPlugin;
//!
//! fn main() {
//! App::new()
//! .add_plugins(DefaultPlugins)
//! .add_plugins((EntityListPlugin, WidgetsPlugin))
//! .run();
//! }
//! ```
pub mod editor;
pub mod widgets;
pub mod panels;
pub mod remote;
pub mod formatting;
pub mod themes;
/// Convenient re-exports for common editor functionality.
pub mod prelude {
//! Common imports for bevy_editor usage.
// Main plugin
pub use crate::editor::EditorPlugin;
// Individual plugins for modular usage
pub use crate::panels::{EntityListPlugin, ComponentInspectorPlugin};
pub use crate::widgets::WidgetsPlugin;
pub use crate::remote::RemoteClientPlugin;
// Core types for remote connection
pub use crate::remote::types::{
RemoteEntity, ConnectionStatus, EntitiesFetched, ComponentDataFetched
};
// Widget builders for custom implementations
pub use crate::widgets::{ScrollViewBuilder, CoreScrollArea, ScrollContent};
// Theme system
pub use crate::widgets::EditorTheme;
}