mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-21 04:26:14 -04:00
Help
This commit is contained in:
parent
af65f22c70
commit
d31f8ef0b4
12 changed files with 124 additions and 115 deletions
60
src/help.ts
60
src/help.ts
|
@ -1,23 +1,22 @@
|
|||
import {allLevels, icons, upgrades} from "./loadGameData";
|
||||
import {t} from "./i18n/i18n";
|
||||
import {asyncAlert} from "./asyncAlert";
|
||||
import {miniMarkDown} from "./pure_functions";
|
||||
import { allLevels, icons, upgrades } from "./loadGameData";
|
||||
import { t } from "./i18n/i18n";
|
||||
import { asyncAlert } from "./asyncAlert";
|
||||
import { miniMarkDown } from "./pure_functions";
|
||||
|
||||
export function helpMenuEntry() {
|
||||
return {
|
||||
icon: icons['icon:help'],
|
||||
text: t('main_menu.help_title'),
|
||||
help: t('main_menu.help_help'),
|
||||
async value() {
|
||||
await asyncAlert({
|
||||
title:t('main_menu.help_title'),
|
||||
allowClose:true,
|
||||
content:[
|
||||
miniMarkDown(t('main_menu.help_content')),
|
||||
t('main_menu.help_upgrades'),
|
||||
...upgrades.map(u=>`
|
||||
|
||||
|
||||
return {
|
||||
icon: icons["icon:help"],
|
||||
text: t("main_menu.help_title"),
|
||||
help: t("main_menu.help_help"),
|
||||
async value() {
|
||||
await asyncAlert({
|
||||
title: t("main_menu.help_title"),
|
||||
allowClose: true,
|
||||
content: [
|
||||
miniMarkDown(t("main_menu.help_content")),
|
||||
t("main_menu.help_upgrades"),
|
||||
...upgrades.map(
|
||||
(u) => `
|
||||
<div class="upgrade used">
|
||||
${u.icon}
|
||||
<p>
|
||||
|
@ -27,22 +26,25 @@ export function helpMenuEntry() {
|
|||
</div>
|
||||
|
||||
${miniMarkDown(u.fullHelp)}
|
||||
`),
|
||||
miniMarkDown(t('main_menu.credits')),
|
||||
`,
|
||||
),
|
||||
miniMarkDown(t("main_menu.credits")),
|
||||
|
||||
t('main_menu.credit_levels'),
|
||||
...allLevels.filter(l=>l.credit?.startsWith('http')).map(l=>`
|
||||
t("main_menu.credit_levels"),
|
||||
...allLevels
|
||||
.filter((l) => l.credit?.startsWith("http"))
|
||||
.map(
|
||||
(l) => `
|
||||
<div class="upgrade used">
|
||||
${icons[l.name]}
|
||||
<p>
|
||||
<strong>${l.name}</strong><br/>
|
||||
<a href="${l.credit}" target="_blank">${l.credit}</a>
|
||||
</p>
|
||||
</div>`)
|
||||
|
||||
]
|
||||
})
|
||||
}
|
||||
}
|
||||
</div>`,
|
||||
),
|
||||
],
|
||||
});
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue