mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 14:03:42 +02:00
Move image render functions into pages (#291)
Move image page renderes into seperate files
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
use crate::ui::images::{useraction::UserAction, gametype::GameType, image_select_state::ImageSelectState};
|
||||
|
||||
pub fn render_page_steam_images_overview(ui: &mut egui::Ui, state: &ImageSelectState) -> Option<UserAction> {
|
||||
if let Some(steam_games) = state.steam_games.as_ref() {
|
||||
for game in steam_games {
|
||||
if ui.button(&game.name).clicked() {
|
||||
return Some(UserAction::ShortcutSelected(GameType::SteamGame(
|
||||
game.clone(),
|
||||
)));
|
||||
}
|
||||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
Reference in New Issue
Block a user