[PR #2602] [MERGED] Launcher: Packs section on Home, with drag and drop #4463

Closed
opened 2026-11-03 04:17:20 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2602
Author: @ludovic111
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: feat/launcher-packs-ui


📝 Commits (1)

  • e5c3d7c Launcher: Packs section on Home, with drag and drop

📊 Changes

3 files changed (+325 additions, -2 deletions)

View changed files

📝 launcher/README.md (+9 -0)
📝 launcher/src/main.rs (+10 -2)
➕ launcher/src/packs_page.rs (+306 -0)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Clean room: designed from the feature list in briefs/launcher-features-1.md; no other launcher's code, docs or assets were read.

Item 7 of the launcher features, part 2 of 2: the Home section. Stacked on #2601 (the library and CLI).

What

  • Home → Packs: the selected instance's resource packs (with their pack.png) and shader packs, by name, each with the launcher's switch. Rows stay where they are when turned on or off. Turning a shader pack on turns the other one off.
  • Add pack… (file picker, several at once) and drag and drop: a .zip or .hshader dropped anywhere on the section (outlined in the accent while dragging) goes to the right folder, turned off; a file that isn't a pack says why.
  • Remove asks first, then turns the pack off and moves it to the trash.
  • While the game runs the switches are disabled, with a line saying why: the game writes options.txt itself.
  • switch() takes any id now (it was &'static str).

Screenshots (scratch homes; generated packs)

The section:
packs

Dragging Bright Ores.zip over it (a small helper starts a real file drag with synthetic mouse events), then dropped:
hover
dropped

A file that isn't a pack, and Remove's confirmation:
error
confirm

Shader packs: turning Soft Shadows on turned Golden Hour off (pickedShaderPack:Soft Shadows.zip):
shader

Each click was checked in the files: resourcePacks:["vanilla","file/Dark UI.zip","file/Clear Glass.zip"] after the Clear Glass switch; Bright Ores.zip in resourcepacks/ after the drop and in the Trash after Move to trash.

Proof

  • cargo fmt --check, cargo clippy --all-targets --locked --features gpui/runtime_shaders -- -D warnings: clean; cargo test --locked --lib 154 passed, --bin horizon-launcher 35 passed.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/2602 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/launcher-packs-ui` --- ### 📝 Commits (1) - [`e5c3d7c`](https://github.com/horizon-rust/horizon/commit/e5c3d7cff7e5db03ccf11daacf7570e3365ae47b) Launcher: Packs section on Home, with drag and drop ### 📊 Changes **3 files changed** (+325 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `launcher/README.md` (+9 -0) 📝 `launcher/src/main.rs` (+10 -2) ➕ `launcher/src/packs_page.rs` (+306 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Clean room: designed from the feature list in briefs/launcher-features-1.md; no other launcher's code, docs or assets were read. Item 7 of the launcher features, part 2 of 2: the Home section. Stacked on #2601 (the library and CLI). ## What - Home → **Packs**: the selected instance's resource packs (with their `pack.png`) and shader packs, by name, each with the launcher's switch. Rows stay where they are when turned on or off. Turning a shader pack on turns the other one off. - **Add pack…** (file picker, several at once) and drag and drop: a `.zip` or `.hshader` dropped anywhere on the section (outlined in the accent while dragging) goes to the right folder, turned off; a file that isn't a pack says why. - **Remove** asks first, then turns the pack off and moves it to the trash. - While the game runs the switches are disabled, with a line saying why: the game writes options.txt itself. - `switch()` takes any id now (it was `&'static str`). ## Screenshots (scratch homes; generated packs) The section: ![packs](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/item-07-packs/pk_a.png) Dragging `Bright Ores.zip` over it (a small helper starts a real file drag with synthetic mouse events), then dropped: ![hover](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/item-07-packs/pk_hover.png) ![dropped](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/item-07-packs/pk_dropped.png) A file that isn't a pack, and Remove's confirmation: ![error](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/item-07-packs/pk_err.png) ![confirm](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/item-07-packs/pk_confirm.png) Shader packs: turning Soft Shadows on turned Golden Hour off (`pickedShaderPack:Soft Shadows.zip`): ![shader](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/item-07-packs/pk_shader.png) Each click was checked in the files: `resourcePacks:["vanilla","file/Dark UI.zip","file/Clear Glass.zip"]` after the Clear Glass switch; `Bright Ores.zip` in `resourcepacks/` after the drop and in the Trash after Move to trash. ## Proof - `cargo fmt --check`, `cargo clippy --all-targets --locked --features gpui/runtime_shaders -- -D warnings`: clean; `cargo test --locked --lib` 154 passed, `--bin horizon-launcher` 35 passed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:17:20 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#4463
No description provided.