From f2965507c466a903ab7dc9e0cfd58cbcc2c396c6 Mon Sep 17 00:00:00 2001 From: Philip Kristoffersen Date: Sun, 10 Apr 2022 14:20:53 +0200 Subject: [PATCH] Make image clickable by making it an image button --- src/ui/uiapp.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/uiapp.rs b/src/ui/uiapp.rs index d1fa5e3..afd2e32 100644 --- a/src/ui/uiapp.rs +++ b/src/ui/uiapp.rs @@ -1,5 +1,5 @@ use eframe::{egui, epi::{self, IconData},}; -use egui::{ScrollArea, TextureHandle, Stroke, Rounding, Image}; +use egui::{ScrollArea, TextureHandle, Stroke, Rounding, Image, ImageButton}; use futures::executor::block_on; use steam_shortcuts_util::shortcut::ShortcutOwned; use std::error::Error; @@ -95,7 +95,7 @@ impl epi::App for MyEguiApp { .show(ctx,|ui|{ let texture = self.get_import_image(ui); let size = texture.size_vec2(); - let image_button = Image::new(texture, size); + let image_button = ImageButton::new(texture, size); if ui.add(image_button).on_hover_text("Import your games into steam").clicked() { self.run_sync(); }