Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
a77bacc22f | |||
a5a5b59719 | |||
77db075915 | |||
d1c48a8f7a |
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -4,7 +4,7 @@ version = 4
|
||||
|
||||
[[package]]
|
||||
name = "CraftX"
|
||||
version = "0.1.2"
|
||||
version = "0.1.3"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"dirs",
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "CraftX"
|
||||
version = "0.1.2"
|
||||
version = "0.1.3"
|
||||
edition = "2024"
|
||||
build = "build.rs"
|
||||
|
||||
|
21
README.md
21
README.md
@ -1,4 +1,18 @@
|
||||
# XCraft - A Modern Minecraft Launcher
|
||||
<img align="left" width="100" height="100" src="https://w0n.zip/file/bWJVJa">
|
||||
|
||||
### XCraft
|
||||
A Modern Minecraft Launcher
|
||||
|
||||
#
|
||||
|
||||
<div align="center">
|
||||
<img src="https://w0n.zip/file/Xe0zXb">
|
||||
<p>
|
||||
<small>
|
||||
Screenshot from Windows 10
|
||||
</small>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
XCraft is a custom Minecraft launcher written in Rust, designed to provide enhanced flexibility and customization. It supports a custom online mode, skin and cape editing, and seamless integration with MultiMC instances.
|
||||
|
||||
@ -13,8 +27,8 @@ XCraft is a custom Minecraft launcher written in Rust, designed to provide enhan
|
||||
## Installation
|
||||
|
||||
### Download Stable Build
|
||||
You can download the latest stable build of XCraft from our Jenkins CI server:
|
||||
[Download from Jenkins](https://jenkins.awain.net/job/XCraft/lastStableBuild/).
|
||||
You can download the latest stable build of XCraft from releases section:
|
||||
[Download from Gitea](https://gitea.awain.net/alterwain/XCraft/releases/latest).
|
||||
|
||||
### Build from Source
|
||||
|
||||
@ -42,6 +56,7 @@ To make your Minecraft server compatible with XCraft, install the [**XCraftAuth*
|
||||
|
||||
## Roadmap
|
||||
- [ ] Cross-platform support improvements
|
||||
- [ ] Fabric integration
|
||||
|
||||
## License
|
||||
This project is licensed under the MIT License.
|
16
src/main.rs
16
src/main.rs
@ -38,7 +38,7 @@ struct App {
|
||||
impl ApplicationHandler for App {
|
||||
fn resumed(&mut self, event_loop: &ActiveEventLoop) {
|
||||
let window = event_loop.create_window(Window::default_attributes().with_inner_size(LogicalSize::new(900, 600)).with_min_inner_size(LogicalSize::new(900, 600)).with_title("XCraft")).unwrap();
|
||||
let webview = WebViewBuilder::new()
|
||||
let mut webview_builder = WebViewBuilder::new()
|
||||
.with_asynchronous_custom_protocol("xcraft".into(), move |_wid, request, responder| {
|
||||
let uri = request.uri().to_string();
|
||||
if let Ok(msg) = serde_json::from_slice(request.body()) {
|
||||
@ -47,9 +47,17 @@ impl ApplicationHandler for App {
|
||||
}
|
||||
let _ = SENDER.lock().unwrap().as_ref().unwrap().send((uri, None, responder));
|
||||
})
|
||||
.with_url("xcraft://custom/ui")
|
||||
.build(&window)
|
||||
.unwrap();
|
||||
.with_url("xcraft://custom/ui");
|
||||
|
||||
if !cfg!(debug_assertions) {
|
||||
webview_builder = webview_builder.with_initialization_script(r#"
|
||||
document.addEventListener("contextmenu", event => event.preventDefault());
|
||||
"#);
|
||||
}
|
||||
|
||||
let webview = webview_builder
|
||||
.build(&window)
|
||||
.unwrap();
|
||||
|
||||
self.window = Some(window);
|
||||
self.webview = Some(webview);
|
||||
|
Loading…
x
Reference in New Issue
Block a user