generated from PlexSheep/rs-base
34 lines
802 B
Rust
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
|
|
}
|
|
}
|