1 unstable release
Uses new Rust 2024
new 0.3.0-alpha.31 | Apr 25, 2025 |
---|
#1268 in GUI
165KB
2.5K
SLoC
egui_mobius_components
A collection of reusable UI components for the egui_mobius framework.
Features
The egui_mobius_components
crate provides high-level, reusable UI components built on top of the egui_mobius architecture:
- EventLogger: A sophisticated terminal-like widget for logging events with:
- Different severity levels (Info, Warn, Debug, Error)
- Rich text formatting with customizable colors
- Thread-safe implementation compatible with egui_mobius signal/slot
- Support for categorizing logs by sender type
- Built-in timestamping and filtering
- Complete with examples demonstrating usage in multi-threaded environments
Usage
Add the following to your Cargo.toml
:
[dependencies]
egui_mobius_components = "0.3.0-alpha.31"
And then import components via the prelude:
use egui_mobius_components::prelude::*;
Example: EventLogger
use eframe::egui;
use egui_mobius_components::prelude::*;
fn main() -> Result<(), eframe::Error> {
// Initialize logger with signal/slot
let (logger, event_slot, response_signal) = create_event_logger(
egui::Context::default(),
LogColors::default()
);
// Add a log entry
logger.info(
"Application started".to_string(),
LogSender::system(),
LogType::Default
);
// Show the logger in your UI
eframe::run_ui(&egui::Context::default(), |ui| {
logger.show(ui);
});
}
For more detailed examples, check out the logger_component example in the egui_mobius repository.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Dependencies
~21–61MB
~1M SLoC