mirror of
https://github.com/LCE-Hub/LCE-Emerald-Launcher.git
synced 2026-08-03 15:52:41 +00:00
feat: stop game button
This commit is contained in:
parent
1e5ea97e86
commit
f811c79934
|
|
@ -18,6 +18,8 @@ const HomeView = memo(function HomeView() {
|
|||
installs,
|
||||
toggleInstall,
|
||||
downloadingId,
|
||||
isGameRunning,
|
||||
stopGame,
|
||||
} = useGame();
|
||||
|
||||
const isFocusedSection = focusSection === "menu";
|
||||
|
|
@ -33,19 +35,23 @@ const HomeView = memo(function HomeView() {
|
|||
{
|
||||
label: !hasAnyInstall
|
||||
? "Install a version"
|
||||
: isDownloading
|
||||
? "Installation in progress..."
|
||||
: isInstalled
|
||||
? "Play Game"
|
||||
: `Download ${selectedVersionName}`,
|
||||
: isGameRunning
|
||||
? "Stop Game"
|
||||
: isDownloading
|
||||
? "Installation in progress..."
|
||||
: isInstalled
|
||||
? "Play Game"
|
||||
: `Download ${selectedVersionName}`,
|
||||
action: !hasAnyInstall
|
||||
? () => setActiveView("versions")
|
||||
: isDownloading
|
||||
? () => {}
|
||||
: isInstalled
|
||||
? handleLaunch
|
||||
: () => toggleInstall(profile),
|
||||
isDanger: false,
|
||||
: isGameRunning
|
||||
? stopGame
|
||||
: isDownloading
|
||||
? () => {}
|
||||
: isInstalled
|
||||
? handleLaunch
|
||||
: () => toggleInstall(profile),
|
||||
isDanger: isGameRunning,
|
||||
disabled: isDownloading,
|
||||
},
|
||||
{ label: "Help & Options", action: () => setActiveView("settings"), disabled: false },
|
||||
|
|
@ -62,6 +68,8 @@ const HomeView = memo(function HomeView() {
|
|||
toggleInstall,
|
||||
profile,
|
||||
setActiveView,
|
||||
isGameRunning,
|
||||
stopGame,
|
||||
],
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue