You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.2 KiB
40 lines
1.2 KiB
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
// SPDX-FileCopyrightText: Copyright 2024 Pomelo, TechGuy
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
import SwiftUI
|
|
import Foundation
|
|
import UIKit
|
|
|
|
struct GameButtonListView: View {
|
|
var game: EmulationGame
|
|
@Environment(\.colorScheme) var colorScheme
|
|
|
|
var body: some View {
|
|
HStack(spacing: 15) {
|
|
if let image = UIImage(data: game.imageData) {
|
|
Image(uiImage: image)
|
|
.resizable()
|
|
.frame(width: 60, height: 60)
|
|
.cornerRadius(8)
|
|
} else {
|
|
Image(systemName: "photo")
|
|
.resizable()
|
|
.frame(width: 60, height: 60)
|
|
.cornerRadius(8)
|
|
}
|
|
|
|
VStack(alignment: .leading, spacing: 4) {
|
|
Text(game.title)
|
|
.font(.headline)
|
|
.foregroundColor(colorScheme == .dark ? Color.white : Color.black)
|
|
Text(game.developer)
|
|
.font(.subheadline)
|
|
.foregroundColor(.gray)
|
|
}
|
|
Spacer()
|
|
}
|
|
.padding(.vertical, 8)
|
|
}
|
|
}
|