mirror of
https://github.com/LCE-Hub/LCE-Emerald-Launcher.git
synced 2026-09-23 08:32:51 +00:00
fix: panorama
This commit is contained in:
@@ -8,10 +8,10 @@ interface PanoramaProps {
|
|||||||
|
|
||||||
const PanoramaBackground = React.memo(({ profile, isDay }: PanoramaProps) => {
|
const PanoramaBackground = React.memo(({ profile, isDay }: PanoramaProps) => {
|
||||||
const { isWindowVisible } = useUI();
|
const { isWindowVisible } = useUI();
|
||||||
const PANORAMA_PROFILES = ['legacy_evolved', '360revived'];
|
const PANORAMA_PROFILES = ['legacy_evolved', 'vanilla_tu19', '360revived', 'vanilla_tu24'];
|
||||||
const profileId = PANORAMA_PROFILES.includes(profile) ? profile : 'legacy_evolved';
|
const baseId = profile;
|
||||||
|
const profileId = PANORAMA_PROFILES.includes(baseId) ? baseId : 'vanilla_tu19';
|
||||||
const currentPanorama = `/panorama/${profileId}_Panorama_Background_${isDay ? 'Day' : 'Night'}.png`;
|
const currentPanorama = `/panorama/${profileId}_Panorama_Background_${isDay ? 'Day' : 'Night'}.png`;
|
||||||
|
|
||||||
const [bgWidth, setBgWidth] = useState<number | null>(null);
|
const [bgWidth, setBgWidth] = useState<number | null>(null);
|
||||||
const containerRef = useRef<HTMLDivElement>(null);
|
const containerRef = useRef<HTMLDivElement>(null);
|
||||||
|
|
||||||
|
|||||||
@@ -439,8 +439,8 @@ const VersionsView = memo(function VersionsView() {
|
|||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
playPressSound();
|
playPressSound();
|
||||||
const PANORAMA_PROFILES = ['legacy_evolved', '360revived'];
|
const PANORAMA_PROFILES = ['legacy_evolved', 'vanilla_tu19', '360revived', 'vanilla_tu24'];
|
||||||
const panoId = PANORAMA_PROFILES.includes(edition.id) ? edition.id : 'legacy_evolved';
|
const panoId = PANORAMA_PROFILES.includes(edition.id) ? edition.id : 'vanilla_tu19';
|
||||||
const panoramaUrl = `/panorama/${panoId}_Panorama_Background_${isDayTime ? 'Day' : 'Night'}.png`;
|
const panoramaUrl = `/panorama/${panoId}_Panorama_Background_${isDayTime ? 'Day' : 'Night'}.png`;
|
||||||
addToSteam(edition.instanceId, edition.name, edition.titleImage, panoramaUrl);
|
addToSteam(edition.instanceId, edition.name, edition.titleImage, panoramaUrl);
|
||||||
setOpenMenuId(null);
|
setOpenMenuId(null);
|
||||||
|
|||||||
+1
-1
@@ -59,7 +59,7 @@ export default function App() {
|
|||||||
}, [config.isDayTime]);
|
}, [config.isDayTime]);
|
||||||
|
|
||||||
const selectedEdition = game.editions.find(
|
const selectedEdition = game.editions.find(
|
||||||
(e: any) => e.id === config.profile,
|
(e: any) => e.instanceId === config.profile,
|
||||||
);
|
);
|
||||||
const selectedVersionName = selectedEdition?.name || "";
|
const selectedVersionName = selectedEdition?.name || "";
|
||||||
const hasAnyInstall = game.installs.length > 0;
|
const hasAnyInstall = game.installs.length > 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user