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 |
|---------|-------------|
| **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!) |
| **Lightweight** | Very light RAM usage thanks to Rust backend and Tauri framework |
| **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 |
| **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! |
| **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! |
---
+13 -14
View File
@@ -1,6 +1,5 @@
import { useState, useEffect, useRef, useCallback, useMemo, memo } from "react";
import { useTranslation } from "react-i18next";
import { motion } from "framer-motion";
import {
TauriService,
type GoldMapperMapping,
@@ -19,7 +18,6 @@ const KEY_FALLBACK = [
];
const MOUSE_IDS = ["MOUSE_LEFT", "MOUSE_MIDDLE", "MOUSE_RIGHT"];
const CONTROLLER_FALLBACK = [
"PAD_A",
"PAD_B",
@@ -61,8 +59,7 @@ const stoneButtonStyle = (highlighted: boolean) => ({
const GoldMapperView = memo(function GoldMapperView() {
const { t } = useTranslation();
const { setActiveView } = useUI();
const { animationsEnabled, goldmapperEnabled, setGoldmapperEnabled } =
useConfig();
const { goldmapperEnabled, setGoldmapperEnabled } = useConfig();
const { playPressSound, playBackSound } = useAudio();
const [keyboardIds, setKeyboardIds] = useState<string[]>(KEY_FALLBACK);
const [controllerIds, setControllerIds] =
@@ -206,7 +203,11 @@ const GoldMapperView = memo(function GoldMapperView() {
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) {
list.push({
kind: "bind",
@@ -215,7 +216,11 @@ const GoldMapperView = memo(function GoldMapperView() {
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) {
list.push({
kind: "bind",
@@ -409,13 +414,7 @@ const GoldMapperView = memo(function GoldMapperView() {
};
return (
<motion.div
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 className="flex flex-col items-center w-full max-w-5xl">
<div
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"
@@ -565,7 +564,7 @@ const GoldMapperView = memo(function GoldMapperView() {
</div>
</div>
)}
</motion.div>
</div>
);
});
+13 -31
View File
@@ -56,11 +56,8 @@ const SettingsView = memo(function SettingsView() {
} = useConfig();
const { currentTrack, skipTrack, tracks, playPressSound, playBackSound } =
useAudio();
const {
isRunnerDownloading,
runnerDownloadProgress,
downloadRunner,
} = useGame();
const { isRunnerDownloading, runnerDownloadProgress, downloadRunner } =
useGame();
const { isLinux, isMac, isAndroid, arch } = usePlatform();
const [focusIndex, setFocusIndex] = useState<number | null>(null);
const [currentSubMenu, setCurrentSubMenu] = useState<
@@ -313,16 +310,6 @@ const SettingsView = memo(function SettingsView() {
setFocusIndex(0);
},
});
items.push({
id: "video_menu",
label: t("settings.video"),
type: "button",
onClick: () => {
playPressSound();
setCurrentSubMenu("video");
setFocusIndex(0);
},
});
items.push({
id: "launcher_menu",
label: t("settings.launcher"),
@@ -417,19 +404,7 @@ const SettingsView = memo(function SettingsView() {
type: "button",
onClick: handleTrackToggle,
});
} else if (currentSubMenu === "video") {
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,
});
} else if (currentSubMenu === "game") {
if (isMac) {
items.push({
id: "perf",
@@ -438,7 +413,6 @@ const SettingsView = memo(function SettingsView() {
onClick: handlePerfToggle,
});
}
} else if (currentSubMenu === "game") {
const envVarsCount = launchEnvVars
? Object.keys(launchEnvVars).length
: 0;
@@ -560,6 +534,12 @@ const SettingsView = memo(function SettingsView() {
type: "button",
onClick: handleAnimationsToggle,
});
items.push({
id: "vfx",
label: `${t("settings.clickEffects")}: ${vfxEnabled ? t("common.on") : t("common.off")}`,
type: "button",
onClick: handleVfxToggle,
});
items.push({
id: "skip_intro",
label: `${t("settings.skipIntro")}: ${skipIntro ? t("common.on") : t("common.off")}`,
@@ -925,9 +905,11 @@ const SettingsView = memo(function SettingsView() {
<motion.div
ref={containerRef}
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 }}
exit={{ opacity: animationsEnabled ? 0 : 1, scale: animationsEnabled ? 0.95 : 1 }}
transition={{ duration: animationsEnabled ? 0.3 : 0 }}
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
//officialDLC: "main:https://git.neolegacy.dev/LegacyOrbis/Store",
},
/*{
{
id: "cafeberry",
name: "Cafeberry",
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
panorama: "vanilla_tu24",
lceOnline: false, //neo: for now.
},*/
},
{
id: "lostlegacy",
name: "Project Lost Legacy",