From f878efe456e8f5c557f2cde9d71f120f3e0b38cd Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Tue, 13 Jan 2026 14:31:37 +0800 Subject: feat: add Minecraft DropOut launcher with version fetching and basic UI - Implemented version manifest fetching from Mojang API. - Created launcher configuration and main launcher logic. - Added SVG and PNG icons for the application. - Developed a simple HTML/CSS interface for the launcher. - Integrated Tauri commands for backend communication. - Added utility functions for file operations and config parsing. --- src/ui/mod.rs | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 src/ui/mod.rs (limited to 'src/ui/mod.rs') diff --git a/src/ui/mod.rs b/src/ui/mod.rs deleted file mode 100644 index 3ee1e6a..0000000 --- a/src/ui/mod.rs +++ /dev/null @@ -1,39 +0,0 @@ -use gtk::prelude::*; -use gtk::{Button, Window, WindowType}; -use tokio::sync::mpsc::Sender; - -pub enum UiEvent { - StartGame, -} - -pub fn init(tx: Sender) { - if gtk::init().is_err() { - println!("Failed to initialize GTK."); - return; - } - - let window = Window::new(WindowType::Toplevel); - window.set_title("Minecraft 启动器"); - window.set_default_size(350, 70); - - let button = Button::with_label("开始游戏"); - let tx_clone = tx.clone(); - button.connect_clicked(move |_| { - println!("开始游戏按钮被点击"); - // Use blocking_send because we are in a synchronous callback - if let Err(e) = tx_clone.blocking_send(UiEvent::StartGame) { - eprintln!("Failed to send event: {}", e); - } - }); - - window.add(&button); - - window.connect_delete_event(|_, _| { - gtk::main_quit(); - Inhibit(false) - }); - - window.show_all(); - - gtk::main(); -} -- cgit v1.2.3-70-g09d2