beatbaer/src/player/ui/showbox.rs
2024-08-22 23:04:40 +00:00

34 lines
802 B
Rust

use egui::ImageSource;
use super::{Entry, ICON_RAW};
pub struct ShowBox {
entry: Entry,
frame: egui::Frame,
}
impl ShowBox {
pub fn new(entry: &Entry) -> Self {
let frame = egui::Frame::none();
Self {
entry: entry.to_owned(),
frame,
}
}
}
impl egui::Widget for ShowBox {
fn ui(self, ui: &mut egui::Ui) -> egui::Response {
ui.vertical_centered(|ui| {
ui.add(
egui::Image::new(ImageSource::Bytes {
uri: std::borrow::Cow::Borrowed("fuck you"),
bytes: egui::load::Bytes::Static(ICON_RAW),
})
.rounding(5.0),
);
ui.button("i dont get it").union(ui.label("caption"))
})
.response
}
}