mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 05:53:41 +02:00
Make image clickable by making it an image button
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
use eframe::{egui, epi::{self, IconData},};
|
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 futures::executor::block_on;
|
||||||
use steam_shortcuts_util::shortcut::ShortcutOwned;
|
use steam_shortcuts_util::shortcut::ShortcutOwned;
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
@@ -95,7 +95,7 @@ impl epi::App for MyEguiApp {
|
|||||||
.show(ctx,|ui|{
|
.show(ctx,|ui|{
|
||||||
let texture = self.get_import_image(ui);
|
let texture = self.get_import_image(ui);
|
||||||
let size = texture.size_vec2();
|
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() {
|
if ui.add(image_button).on_hover_text("Import your games into steam").clicked() {
|
||||||
self.run_sync();
|
self.run_sync();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user