mirror of
https://github.com/encounter/objdiff.git
synced 2025-12-16 08:27:04 +00:00
18 lines
540 B
Rust
18 lines
540 B
Rust
use crate::views::{appearance::Appearance, frame_history::FrameHistory};
|
|
|
|
pub fn debug_window(
|
|
ctx: &egui::Context,
|
|
show: &mut bool,
|
|
frame_history: &mut FrameHistory,
|
|
appearance: &Appearance,
|
|
) {
|
|
egui::Window::new("Debug").open(show).show(ctx, |ui| {
|
|
debug_ui(ui, frame_history, appearance);
|
|
});
|
|
}
|
|
|
|
fn debug_ui(ui: &mut egui::Ui, frame_history: &mut FrameHistory, _appearance: &Appearance) {
|
|
ui.label(format!("Repainting the UI each frame. FPS: {:.1}", frame_history.fps()));
|
|
frame_history.ui(ui);
|
|
}
|