added steam init

This commit is contained in:
2025-05-04 18:46:00 -05:00
parent 41daa9b0d3
commit 63525b28ea
3 changed files with 21 additions and 0 deletions
+4
View File
@@ -23,6 +23,9 @@ use global_hotkey::{
// Import our platform-specific module
mod platform;
pub mod steam;
use steam::*;
// Define a struct to hold cursor information
#[derive(Clone)]
struct CursorInfo {
@@ -257,6 +260,7 @@ fn boot() -> (CursorRush, Task<Message>) {
}
fn main() -> iced::Result {
let _steam = steam::Steam::new();
iced::application("Cursor Rush", update, view)
.theme(|_| Theme::Dark)
.subscription(subscription)
+16
View File
@@ -0,0 +1,16 @@
use steamworks::{AppId, Client, SingleClient};
pub struct Steam {
client: Client,
single: SingleClient
}
impl Steam {
pub fn new() -> Self {
let (client, single) = Client::init_app(AppId(1430270)).unwrap();
Self {
client, single
}
}
}