use crate::DevToolsState;
#[derive(Clone, Debug, PartialEq)]
pub struct DevToolsEguiPanel {
title: String,
}
impl DevToolsEguiPanel {
pub fn new() -> Self {
Self {
title: "Animato DevTools".to_owned(),
}
}
pub fn with_title(title: impl Into<String>) -> Self {
Self {
title: title.into(),
}
}
pub fn title(&self) -> &str {
&self.title
}
pub fn render_summary(&self, state: &DevToolsState) -> String {
format!("{} open={}", self.title, state.is_open())
}
}
impl Default for DevToolsEguiPanel {
fn default() -> Self {
Self::new()
}
}