mirror of
https://github.com/LCE-Hub/LCE-Emerald-Launcher.git
synced 2026-08-20 04:27:29 +00:00
feat: hide title image on workshop, lceonline and devtools
This commit is contained in:
parent
d49622495f
commit
bef3532c93
|
|
@ -724,10 +724,6 @@ const WorkshopView = memo(function WorkshopView({
|
|||
transition={{ duration: config.animationsEnabled ? 0.3 : 0 }}
|
||||
className="flex flex-col items-center w-full h-full max-h-full relative font-['Mojangles'] text-white select-none outline-none focus:outline-none"
|
||||
>
|
||||
<h2 className="text-2xl text-white mc-text-shadow mt-4 mb-6 border-b-2 border-[#373737] pb-2 w-[30%] max-w-[250px] text-center tracking-widest uppercase opacity-80 font-bold whitespace-nowrap px-4">
|
||||
Workshop
|
||||
</h2>
|
||||
|
||||
<div className="flex items-center justify-center gap-0 mb-4 w-full px-4">
|
||||
<div
|
||||
className="flex items-center gap-1 px-[11px] py-1 rounded-sm bg-[#696969] border-2 border-black"
|
||||
|
|
@ -2039,9 +2035,11 @@ function InstallModal({
|
|||
const targets: { id: string; zips: number }[] = [];
|
||||
for (const depId of dependencies) {
|
||||
const dep = allPackages.find((p) => p.id === depId);
|
||||
if (dep?.zips) targets.push({ id: dep.id, zips: Object.keys(dep.zips).length });
|
||||
if (dep?.zips)
|
||||
targets.push({ id: dep.id, zips: Object.keys(dep.zips).length });
|
||||
}
|
||||
if (pkg.zips) targets.push({ id: pkg.id, zips: Object.keys(pkg.zips).length });
|
||||
if (pkg.zips)
|
||||
targets.push({ id: pkg.id, zips: Object.keys(pkg.zips).length });
|
||||
return targets;
|
||||
}, [dependencies, allPackages, pkg.zips, pkg.id]);
|
||||
|
||||
|
|
@ -2266,7 +2264,9 @@ function InstallModal({
|
|||
<div className="flex items-center justify-between gap-2">
|
||||
<span className="text-[11px] text-[#FFFF55] mc-text-shadow truncate">
|
||||
{progressLabel ||
|
||||
(isPluginTab ? "Downloading plugin files" : "Downloading assets")}
|
||||
(isPluginTab
|
||||
? "Downloading plugin files"
|
||||
: "Downloading assets")}
|
||||
</span>
|
||||
<span className="text-[11px] text-[#FFFF55] mc-text-shadow shrink-0">
|
||||
{Math.floor(isPluginTab ? progress : overallProgress)}%
|
||||
|
|
|
|||
|
|
@ -290,6 +290,21 @@ export default function App() {
|
|||
const selectedVersionName = selectedEdition?.name ?? "";
|
||||
const hasAnyInstall = game.installs.length > 0;
|
||||
const titleImage = selectedEdition?.titleImage ?? "/images/MenuTitle.png";
|
||||
const TITLE_HIDDEN_VIEWS = new Set([
|
||||
//neo: why an entire Set for that? yes. the answer is yes.
|
||||
"workshop",
|
||||
"lceonline",
|
||||
"devtools",
|
||||
"guides",
|
||||
"pck-editor",
|
||||
"arc-editor",
|
||||
"loc-editor",
|
||||
"grf-editor",
|
||||
"col-editor",
|
||||
"options-editor",
|
||||
"model-editor",
|
||||
"swf-editor",
|
||||
]);
|
||||
useEffect(() => {
|
||||
const handleContextMenu = (e: MouseEvent) => e.preventDefault();
|
||||
document.addEventListener("contextmenu", handleContextMenu);
|
||||
|
|
@ -492,12 +507,15 @@ export default function App() {
|
|||
imageRendering: "pixelated",
|
||||
}}
|
||||
onMouseEnter={(e) =>
|
||||
((e.currentTarget as HTMLButtonElement).style.backgroundImage =
|
||||
((
|
||||
e.currentTarget as HTMLButtonElement
|
||||
).style.backgroundImage =
|
||||
"url('/images/Button_Square_Highlighted.png')")
|
||||
}
|
||||
onMouseLeave={(e) =>
|
||||
((e.currentTarget as HTMLButtonElement).style.backgroundImage =
|
||||
"url('/images/Button_Square.png')")
|
||||
((
|
||||
e.currentTarget as HTMLButtonElement
|
||||
).style.backgroundImage = "url('/images/Button_Square.png')")
|
||||
}
|
||||
>
|
||||
<svg
|
||||
|
|
@ -579,35 +597,37 @@ export default function App() {
|
|||
|
||||
<div className="shrink-0 flex justify-center py-4 relative w-full pt-4">
|
||||
<div className="relative w-full max-w-135 flex justify-center">
|
||||
{activeView !== "credits" && (
|
||||
<motion.img
|
||||
layoutId="mainLogo"
|
||||
src={titleImage}
|
||||
transition={{
|
||||
type: "spring",
|
||||
stiffness: 300,
|
||||
damping: 25,
|
||||
}}
|
||||
className="w-full drop-shadow-[0_8px_6px_rgba(0,0,0,0.8)] pointer-events-none"
|
||||
style={{ imageRendering: "pixelated" }}
|
||||
/>
|
||||
)}
|
||||
{activeView !== "credits" && (
|
||||
<motion.div
|
||||
{...uiFade}
|
||||
className="absolute bottom-[20%] right-[5%] w-0 h-0 flex items-center justify-center"
|
||||
>
|
||||
<div
|
||||
onClick={audio.cycleSplash}
|
||||
className="mc-splash text-[#FFFF55] text-[28px] z-100 cursor-pointer whitespace-nowrap"
|
||||
style={{ textShadow: "2px 2px 0px #3F3F00" }}
|
||||
{activeView !== "credits" &&
|
||||
!TITLE_HIDDEN_VIEWS.has(activeView) && (
|
||||
<motion.img
|
||||
layoutId="mainLogo"
|
||||
src={titleImage}
|
||||
transition={{
|
||||
type: "spring",
|
||||
stiffness: 300,
|
||||
damping: 25,
|
||||
}}
|
||||
className="w-full drop-shadow-[0_8px_6px_rgba(0,0,0,0.8)] pointer-events-none"
|
||||
style={{ imageRendering: "pixelated" }}
|
||||
/>
|
||||
)}
|
||||
{activeView !== "credits" &&
|
||||
!TITLE_HIDDEN_VIEWS.has(activeView) && (
|
||||
<motion.div
|
||||
{...uiFade}
|
||||
className="absolute bottom-[20%] right-[5%] w-0 h-0 flex items-center justify-center"
|
||||
>
|
||||
{audio.splashIndex === -1
|
||||
? `Welcome ${config.username}!`
|
||||
: audio.splashes[audio.splashIndex]}
|
||||
</div>
|
||||
</motion.div>
|
||||
)}
|
||||
<div
|
||||
onClick={audio.cycleSplash}
|
||||
className="mc-splash text-[#FFFF55] text-[28px] z-100 cursor-pointer whitespace-nowrap"
|
||||
style={{ textShadow: "2px 2px 0px #3F3F00" }}
|
||||
>
|
||||
{audio.splashIndex === -1
|
||||
? `Welcome ${config.username}!`
|
||||
: audio.splashes[audio.splashIndex]}
|
||||
</div>
|
||||
</motion.div>
|
||||
)}
|
||||
{activeView === "main" &&
|
||||
hasAnyInstall &&
|
||||
titleImage === "/images/MenuTitle.png" && (
|
||||
|
|
|
|||
Loading…
Reference in a new issue