1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Add more links to main menu

This commit is contained in:
tobspr
2020-06-22 15:21:47 +02:00
parent e9581c653f
commit 28b2dc008c
7 changed files with 79 additions and 18 deletions

View File

@@ -19,6 +19,7 @@ const smoothCanvas = true;
export const THIRDPARTY_URLS = {
discord: "https://discord.gg/HN7EVzV",
github: "https://github.com/tobspr/shapez.io",
reddit: "https://www.reddit.com/r/shapezio",
standaloneStorePage: "https://store.steampowered.com/app/1318690/shapezio/",
};

View File

@@ -91,10 +91,14 @@ export class MainMenuState extends GameState {
<span class="thirdpartyLogo discordLogo"></span>
</a>
<a class="changelog">${T.changelog.title}</a>
<a class="helpTranslate">${T.mainMenu.helpTranslate}</a>
<div class="sidelinks">
<a class="redditLink">${T.mainMenu.subreddit}</a>
<a class="changelog">${T.changelog.title}</a>
<a class="helpTranslate">${T.mainMenu.helpTranslate}</a>
</div>
<div class="author">${T.mainMenu.madeBy.replace(
"<author-link>",
'<a class="producerLink" target="_blank">Tobias Springer</a>'
@@ -215,6 +219,7 @@ export class MainMenuState extends GameState {
this.trackClicks(qs(".settingsButton"), this.onSettingsButtonClicked);
this.trackClicks(qs(".changelog"), this.onChangelogClicked);
this.trackClicks(qs(".redditLink"), this.onRedditClicked);
this.trackClicks(qs(".languageChoose"), this.onLanguageChooseClicked);
this.trackClicks(qs(".helpTranslate"), this.onTranslationHelpLinkClicked);
@@ -307,6 +312,11 @@ export class MainMenuState extends GameState {
this.moveToState("ChangelogState");
}
onRedditClicked() {
this.app.analytics.trackUiClick("main_menu_reddit_link");
this.app.platformWrapper.openExternalLink(THIRDPARTY_URLS.reddit);
}
onContestClicked() {
this.app.analytics.trackUiClick("contest_click");