feat: move video settings to launcher submenu

This commit is contained in:
neoapps-dev
2026-09-14 12:52:46 +03:00
parent db639bcac6
commit 894063561e
4 changed files with 30 additions and 49 deletions
+2 -2
View File
@@ -57,7 +57,7 @@ LCE Emerald Launcher is the easiest way to play Minecraft Legacy Console Edition
| Feature | Description | | Feature | Description |
|---------|-------------| |---------|-------------|
| **Automated Setup** | One-click installation for neoLegacy, Revelations, 360 Revived, Hellish Ends and others | | **Automated Setup** | One-click installation for neoLegacy, Revelations, Hellish Ends, Moon Edition and others |
| **Cross-Platform** | Native support for Windows, macOS (Intel & Apple Silicon), and Linux (Steam Deck is also supported!) | | **Cross-Platform** | Native support for Windows, macOS (Intel & Apple Silicon), and Linux (Steam Deck is also supported!) |
| **Lightweight** | Very light RAM usage thanks to Rust backend and Tauri framework | | **Lightweight** | Very light RAM usage thanks to Rust backend and Tauri framework |
| **Easy Configuration** | Built-in settings for username, game parameters, and profiles | | **Easy Configuration** | Built-in settings for username, game parameters, and profiles |
@@ -68,7 +68,7 @@ LCE Emerald Launcher is the easiest way to play Minecraft Legacy Console Edition
| **Workshop** | Community content like DLCs, Textures, Skins and more | | **Workshop** | Community content like DLCs, Textures, Skins and more |
| **Free Multiplayer** | Powered by LCEOnline, Emerald provides a free multiplayer service so you can play with anyone without port forwarding! | | **Free Multiplayer** | Powered by LCEOnline, Emerald provides a free multiplayer service so you can play with anyone without port forwarding! |
| **Developer Tools** | Create and edit 4J's propriatery file formats with ease! | | **Developer Tools** | Create and edit 4J's propriatery file formats with ease! |
| **World conversion** | Import `.ms` files, Java worlds or even an Xbox 360/PS3 world! | | **World conversion** | Import `.ms` files, Java worlds or even an Xbox 360/PS3 world! (Beta) |
| **Playtime counting** | Count your playtime and see your most active days! | | **Playtime counting** | Count your playtime and see your most active days! |
--- ---
+13 -14
View File
@@ -1,6 +1,5 @@
import { useState, useEffect, useRef, useCallback, useMemo, memo } from "react"; import { useState, useEffect, useRef, useCallback, useMemo, memo } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { motion } from "framer-motion";
import { import {
TauriService, TauriService,
type GoldMapperMapping, type GoldMapperMapping,
@@ -19,7 +18,6 @@ const KEY_FALLBACK = [
]; ];
const MOUSE_IDS = ["MOUSE_LEFT", "MOUSE_MIDDLE", "MOUSE_RIGHT"]; const MOUSE_IDS = ["MOUSE_LEFT", "MOUSE_MIDDLE", "MOUSE_RIGHT"];
const CONTROLLER_FALLBACK = [ const CONTROLLER_FALLBACK = [
"PAD_A", "PAD_A",
"PAD_B", "PAD_B",
@@ -61,8 +59,7 @@ const stoneButtonStyle = (highlighted: boolean) => ({
const GoldMapperView = memo(function GoldMapperView() { const GoldMapperView = memo(function GoldMapperView() {
const { t } = useTranslation(); const { t } = useTranslation();
const { setActiveView } = useUI(); const { setActiveView } = useUI();
const { animationsEnabled, goldmapperEnabled, setGoldmapperEnabled } = const { goldmapperEnabled, setGoldmapperEnabled } = useConfig();
useConfig();
const { playPressSound, playBackSound } = useAudio(); const { playPressSound, playBackSound } = useAudio();
const [keyboardIds, setKeyboardIds] = useState<string[]>(KEY_FALLBACK); const [keyboardIds, setKeyboardIds] = useState<string[]>(KEY_FALLBACK);
const [controllerIds, setControllerIds] = const [controllerIds, setControllerIds] =
@@ -206,7 +203,11 @@ const GoldMapperView = memo(function GoldMapperView() {
label: displayName(id), label: displayName(id),
}); });
} }
list.push({ kind: "header", key: "mouse_header", label: t("goldMapper.mouse") }); list.push({
kind: "header",
key: "mouse_header",
label: t("goldMapper.mouse"),
});
for (const id of MOUSE_IDS) { for (const id of MOUSE_IDS) {
list.push({ list.push({
kind: "bind", kind: "bind",
@@ -215,7 +216,11 @@ const GoldMapperView = memo(function GoldMapperView() {
label: mouseLabel(id), label: mouseLabel(id),
}); });
} }
list.push({ kind: "header", key: "keyboard_header", label: t("goldMapper.keyboard") }); list.push({
kind: "header",
key: "keyboard_header",
label: t("goldMapper.keyboard"),
});
for (const id of keyboardIds) { for (const id of keyboardIds) {
list.push({ list.push({
kind: "bind", kind: "bind",
@@ -409,13 +414,7 @@ const GoldMapperView = memo(function GoldMapperView() {
}; };
return ( return (
<motion.div <div className="flex flex-col items-center w-full max-w-5xl">
initial={{ opacity: 0, scale: 0.95 }}
animate={{ opacity: 1, scale: 1 }}
exit={{ opacity: 0, scale: 0.95 }}
transition={{ duration: animationsEnabled ? 0.3 : 0 }}
className="flex flex-col items-center w-full max-w-5xl"
>
<div <div
ref={containerRef} ref={containerRef}
className="w-[720px] max-w-[92vw] h-[560px] max-h-[62vh] p-4 flex flex-col gap-2 overflow-y-auto settings-scrollbar mc-options-bg" className="w-[720px] max-w-[92vw] h-[560px] max-h-[62vh] p-4 flex flex-col gap-2 overflow-y-auto settings-scrollbar mc-options-bg"
@@ -565,7 +564,7 @@ const GoldMapperView = memo(function GoldMapperView() {
</div> </div>
</div> </div>
)} )}
</motion.div> </div>
); );
}); });
+13 -31
View File
@@ -56,11 +56,8 @@ const SettingsView = memo(function SettingsView() {
} = useConfig(); } = useConfig();
const { currentTrack, skipTrack, tracks, playPressSound, playBackSound } = const { currentTrack, skipTrack, tracks, playPressSound, playBackSound } =
useAudio(); useAudio();
const { const { isRunnerDownloading, runnerDownloadProgress, downloadRunner } =
isRunnerDownloading, useGame();
runnerDownloadProgress,
downloadRunner,
} = useGame();
const { isLinux, isMac, isAndroid, arch } = usePlatform(); const { isLinux, isMac, isAndroid, arch } = usePlatform();
const [focusIndex, setFocusIndex] = useState<number | null>(null); const [focusIndex, setFocusIndex] = useState<number | null>(null);
const [currentSubMenu, setCurrentSubMenu] = useState< const [currentSubMenu, setCurrentSubMenu] = useState<
@@ -313,16 +310,6 @@ const SettingsView = memo(function SettingsView() {
setFocusIndex(0); setFocusIndex(0);
}, },
}); });
items.push({
id: "video_menu",
label: t("settings.video"),
type: "button",
onClick: () => {
playPressSound();
setCurrentSubMenu("video");
setFocusIndex(0);
},
});
items.push({ items.push({
id: "launcher_menu", id: "launcher_menu",
label: t("settings.launcher"), label: t("settings.launcher"),
@@ -417,19 +404,7 @@ const SettingsView = memo(function SettingsView() {
type: "button", type: "button",
onClick: handleTrackToggle, onClick: handleTrackToggle,
}); });
} else if (currentSubMenu === "video") { } else if (currentSubMenu === "game") {
items.push({
id: "vfx",
label: `${t("settings.clickEffects")}: ${vfxEnabled ? t("common.on") : t("common.off")}`,
type: "button",
onClick: handleVfxToggle,
});
items.push({
id: "animations",
label: `${t("settings.animations")}: ${animationsEnabled ? t("common.on") : t("common.off")}`,
type: "button",
onClick: handleAnimationsToggle,
});
if (isMac) { if (isMac) {
items.push({ items.push({
id: "perf", id: "perf",
@@ -438,7 +413,6 @@ const SettingsView = memo(function SettingsView() {
onClick: handlePerfToggle, onClick: handlePerfToggle,
}); });
} }
} else if (currentSubMenu === "game") {
const envVarsCount = launchEnvVars const envVarsCount = launchEnvVars
? Object.keys(launchEnvVars).length ? Object.keys(launchEnvVars).length
: 0; : 0;
@@ -560,6 +534,12 @@ const SettingsView = memo(function SettingsView() {
type: "button", type: "button",
onClick: handleAnimationsToggle, onClick: handleAnimationsToggle,
}); });
items.push({
id: "vfx",
label: `${t("settings.clickEffects")}: ${vfxEnabled ? t("common.on") : t("common.off")}`,
type: "button",
onClick: handleVfxToggle,
});
items.push({ items.push({
id: "skip_intro", id: "skip_intro",
label: `${t("settings.skipIntro")}: ${skipIntro ? t("common.on") : t("common.off")}`, label: `${t("settings.skipIntro")}: ${skipIntro ? t("common.on") : t("common.off")}`,
@@ -925,9 +905,11 @@ const SettingsView = memo(function SettingsView() {
<motion.div <motion.div
ref={containerRef} ref={containerRef}
tabIndex={-1} tabIndex={-1}
initial={{ opacity: animationsEnabled ? 0 : 1, scale: animationsEnabled ? 0.95 : 1 }} initial={{
opacity: animationsEnabled ? 0 : 1,
scale: animationsEnabled ? 0.95 : 1,
}}
animate={{ opacity: 1, scale: 1 }} animate={{ opacity: 1, scale: 1 }}
exit={{ opacity: animationsEnabled ? 0 : 1, scale: animationsEnabled ? 0.95 : 1 }}
transition={{ duration: animationsEnabled ? 0.3 : 0 }} transition={{ duration: animationsEnabled ? 0.3 : 0 }}
className="flex flex-col items-center w-full max-w-5xl outline-none" className="flex flex-col items-center w-full max-w-5xl outline-none"
> >
+2 -2
View File
@@ -60,7 +60,7 @@ export const BASE_EDITIONS = [
// LO-Byte: Store is built differently to what emerald expects, branch for emerald will be added soon // LO-Byte: Store is built differently to what emerald expects, branch for emerald will be added soon
//officialDLC: "main:https://git.neolegacy.dev/LegacyOrbis/Store", //officialDLC: "main:https://git.neolegacy.dev/LegacyOrbis/Store",
}, },
/*{ {
id: "cafeberry", id: "cafeberry",
name: "Cafeberry", name: "Cafeberry",
desc: "Project aiming to faithfully backport TUs, add cross-play and more!", desc: "Project aiming to faithfully backport TUs, add cross-play and more!",
@@ -70,7 +70,7 @@ export const BASE_EDITIONS = [
logo: "", //neo: TODO: add Cafeberry logo logo: "", //neo: TODO: add Cafeberry logo
panorama: "vanilla_tu24", panorama: "vanilla_tu24",
lceOnline: false, //neo: for now. lceOnline: false, //neo: for now.
},*/ },
{ {
id: "lostlegacy", id: "lostlegacy",
name: "Project Lost Legacy", name: "Project Lost Legacy",