Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Spaink committed Aug 18, 2023
1 parent 3f178a1 commit 12e6c54
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ impl Default for App {
removeThumb: RetainedImage::from_image_bytes(
"remove",
include_bytes!("../assets/remove_thumb.png"),
).unwrap(),
)
.unwrap(),
bodies: (|| {
// TODO: Move to a build script or read from file at startup
let mut images: HashMap<String, Image> = HashMap::new();
Expand Down Expand Up @@ -74,9 +75,11 @@ impl Default for App {
// TODO: Move to a build script or read from file at startup
let mut images: HashMap<String, Image> = HashMap::new();

let image =
RetainedImage::from_image_bytes("top", include_bytes!("../assets/hats/top.png"))
.unwrap();
let image = RetainedImage::from_image_bytes(
"top",
include_bytes!("../assets/hats/top.png"),
)
.unwrap();
let thumb = RetainedImage::from_image_bytes(
"orange",
include_bytes!("../assets/hats/top_thumb.png"),
Expand Down Expand Up @@ -174,17 +177,17 @@ impl eframe::App for App {
// crab.show(ui);
// });

ui.collapsing(RichText::new("Hats").size(20.0), |ui|{
ui.collapsing(RichText::new("Hats").size(20.0), |ui| {
egui::Grid::new("hats").show(ui, |ui| {
if ui
.add(egui::ImageButton::new(
removeThumb.texture_id(ctx),
removeThumb.size_vec2(),
))
.clicked()
{
ferris.hat = None
};
.add(egui::ImageButton::new(
removeThumb.texture_id(ctx),
removeThumb.size_vec2(),
))
.clicked()
{
ferris.hat = None
};

for (name, image) in hats.iter() {
if ui
Expand Down

0 comments on commit 12e6c54

Please sign in to comment.