Skip to content

Commit

Permalink
Actually make the game launchable
Browse files Browse the repository at this point in the history
  • Loading branch information
EliteAsian123 committed Jul 20, 2023
1 parent 4645879 commit 5bdea1c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/LaunchPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ const LaunchPage: React.FC<Props> = ({ version, releaseTag, playName, descriptio
const dialogManager = useDialogManager();

function LaunchButton(props: LaunchButtonProps) {
if (version.state === YARGStates.AVAILABLE) {
return <Button style={props.style} color={ButtonColor.BLUE}>
Play {playName}
if (version.state === YARGStates.NEW_UPDATE) {
return <Button style={props.style} color={ButtonColor.GREEN} onClick={() => version.download(dialogManager)}>
<UpdateIcon /> Update {playName}
</Button>;
} else if (version.state === YARGStates.DOWNLOADING) {
if (!version.payload) {
Expand All @@ -48,8 +48,8 @@ const LaunchPage: React.FC<Props> = ({ version, releaseTag, playName, descriptio
<PayloadProgress payload={version.payload} />
</Button>;
} else {
return <Button style={props.style} color={ButtonColor.GREEN} onClick={() => version.download(dialogManager)}>
<UpdateIcon /> Update {playName}
return <Button style={props.style} color={ButtonColor.BLUE} onClick={() => version.play(dialogManager)}>
Play {playName}
</Button>;
}
}
Expand Down

0 comments on commit 5bdea1c

Please sign in to comment.