mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-26 09:19:31 +02:00
Move links
Links have been removed from the page A new section for viewing the pages' contents has been added to the menu Achievements, Stats, and Vouchers have been moved to a single panel to make space in the menu
This commit is contained in:
parent
52099a1080
commit
3c99c727c3
@ -116,10 +116,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="tnc-links">
|
<div id="tnc-links">
|
||||||
<a href="#" class="termly-display-preferences" style="display: none;" target="_blank" rel="noreferrer noopener">Consent Preferences</a>
|
<a href="#" class="termly-display-preferences" style="display: none;" target="_blank" rel="noreferrer noopener">Consent Preferences</a>
|
||||||
<a href="https://app.termly.io/policy-viewer/policy.html?policyUUID=bc96778b-3f04-4d25-bafc-0deba53e8bec" target="_blank" rel="noreferrer noopener">Privacy Policy</a>
|
<!--a href="https://app.termly.io/policy-viewer/policy.html?policyUUID=bc96778b-3f04-4d25-bafc-0deba53e8bec" target="_blank" rel="noreferrer noopener">Privacy Policy</a>
|
||||||
<a href="https://app.termly.io/policy-viewer/policy.html?policyUUID=8b523c05-7ec2-4646-9534-5bd61b386e2a" target="_blank" rel="noreferrer noopener">Cookie Disclaimer</a>
|
<a href="https://app.termly.io/policy-viewer/policy.html?policyUUID=8b523c05-7ec2-4646-9534-5bd61b386e2a" target="_blank" rel="noreferrer noopener">Cookie Disclaimer</a>
|
||||||
<a href="https://app.termly.io/policy-viewer/policy.html?policyUUID=b01e092a-9721-477f-8356-45576702ff9e" target="_blank" rel="noreferrer noopener">Terms & Conditions</a>
|
<a href="https://app.termly.io/policy-viewer/policy.html?policyUUID=b01e092a-9721-477f-8356-45576702ff9e" target="_blank" rel="noreferrer noopener">Terms & Conditions</a>
|
||||||
<a href="https://app.termly.io/policy-viewer/policy.html?policyUUID=3b5d1928-3f5b-4ee1-b8df-2d6c276b0bcc" target="_blank" rel="noreferrer noopener">Acceptable Use Policy</a>
|
<a href="https://app.termly.io/policy-viewer/policy.html?policyUUID=3b5d1928-3f5b-4ee1-b8df-2d6c276b0bcc" target="_blank" rel="noreferrer noopener">Acceptable Use Policy</a>
|
||||||
|
<!-->
|
||||||
</div>
|
</div>
|
||||||
<script type="module" src="./src/main.ts"></script>
|
<script type="module" src="./src/main.ts"></script>
|
||||||
<script src="./src/touch-controls.ts" type="module"></script>
|
<script src="./src/touch-controls.ts" type="module"></script>
|
||||||
|
@ -1262,14 +1262,12 @@ function printItemNoNewline(inData: string, indent: string, item: ItemData) {
|
|||||||
* Sets the name, author, and label for a file.
|
* Sets the name, author, and label for a file.
|
||||||
* @param title The display name of the file.
|
* @param title The display name of the file.
|
||||||
* @param authors The author(s) of the file.
|
* @param authors The author(s) of the file.
|
||||||
* @todo Add label field.
|
|
||||||
*/
|
*/
|
||||||
export function setFileInfo(title: string, authors: string[], label: string) {
|
export function setFileInfo(title: string, authors: string[], label: string) {
|
||||||
console.log("Setting file " + rarityslot[1] + " to " + title + " / [" + authors.join(", ") + "]")
|
console.log("Setting file " + rarityslot[1] + " to " + title + " / [" + authors.join(", ") + "]")
|
||||||
var fileID = rarityslot[1] as string
|
var fileID = rarityslot[1] as string
|
||||||
var drpd = JSON.parse(localStorage.getItem(fileID)) as DRPD;
|
var drpd = JSON.parse(localStorage.getItem(fileID)) as DRPD;
|
||||||
drpd = updateLog(drpd)
|
drpd = updateLog(drpd)
|
||||||
drpd.title = title;
|
|
||||||
for (var i = 0; i < authors.length; i++) {
|
for (var i = 0; i < authors.length; i++) {
|
||||||
while (authors[i][0] == " ") {
|
while (authors[i][0] == " ") {
|
||||||
authors[i] = authors[i].substring(1)
|
authors[i] = authors[i].substring(1)
|
||||||
@ -1284,6 +1282,7 @@ export function setFileInfo(title: string, authors: string[], label: string) {
|
|||||||
i--;
|
i--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
drpd.title = title;
|
||||||
drpd.authors = authors;
|
drpd.authors = authors;
|
||||||
drpd.label = label;
|
drpd.label = label;
|
||||||
localStorage.setItem(fileID, JSON.stringify(drpd))
|
localStorage.setItem(fileID, JSON.stringify(drpd))
|
||||||
|
@ -21,12 +21,13 @@ export interface OptionSelectConfig {
|
|||||||
|
|
||||||
export interface OptionSelectItem {
|
export interface OptionSelectItem {
|
||||||
label: string;
|
label: string;
|
||||||
handler: () => boolean;
|
handler: (s?: any) => boolean;
|
||||||
onHover?: () => void;
|
onHover?: () => void;
|
||||||
keepOpen?: boolean;
|
keepOpen?: boolean;
|
||||||
overrideSound?: boolean;
|
overrideSound?: boolean;
|
||||||
item?: string;
|
item?: string;
|
||||||
itemArgs?: any[];
|
itemArgs?: any[];
|
||||||
|
specialData?: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
const scrollUpLabel = "↑";
|
const scrollUpLabel = "↑";
|
||||||
@ -179,7 +180,7 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const option = this.config?.options[this.cursor + (this.scrollCursor - (this.scrollCursor ? 1 : 0))];
|
const option = this.config?.options[this.cursor + (this.scrollCursor - (this.scrollCursor ? 1 : 0))];
|
||||||
if (option?.handler()) {
|
if (option?.handler(option.specialData)) {
|
||||||
if (!option.keepOpen) {
|
if (!option.keepOpen) {
|
||||||
this.clear();
|
this.clear();
|
||||||
}
|
}
|
||||||
|
@ -14,9 +14,8 @@ import BgmBar from "#app/ui/bgm-bar";
|
|||||||
|
|
||||||
enum MenuOptions {
|
enum MenuOptions {
|
||||||
GAME_SETTINGS,
|
GAME_SETTINGS,
|
||||||
ACHIEVEMENTS,
|
|
||||||
STATS,
|
STATS,
|
||||||
VOUCHERS,
|
LINKS,
|
||||||
EGG_LIST,
|
EGG_LIST,
|
||||||
EGG_GACHA,
|
EGG_GACHA,
|
||||||
MANAGE_DATA,
|
MANAGE_DATA,
|
||||||
@ -30,6 +29,20 @@ let wikiUrl = "https://wiki.pokerogue.net/start";
|
|||||||
const discordUrl = "https://discord.gg/uWpTfdKG49";
|
const discordUrl = "https://discord.gg/uWpTfdKG49";
|
||||||
const githubUrl = "https://github.com/pagefaultgames/pokerogue";
|
const githubUrl = "https://github.com/pagefaultgames/pokerogue";
|
||||||
const redditUrl = "https://www.reddit.com/r/pokerogue";
|
const redditUrl = "https://www.reddit.com/r/pokerogue";
|
||||||
|
const links = [
|
||||||
|
["Privacy Policy", "https://app.termly.io/policy-viewer/policy.html?policyUUID=bc96778b-3f04-4d25-bafc-0deba53e8bec"],
|
||||||
|
["Cookie Disclaimer", "https://app.termly.io/policy-viewer/policy.html?policyUUID=8b523c05-7ec2-4646-9534-5bd61b386e2a"],
|
||||||
|
["Terms & Conditions", "https://app.termly.io/policy-viewer/policy.html?policyUUID=b01e092a-9721-477f-8356-45576702ff9e"],
|
||||||
|
["Acceptable Use Policy", "https://app.termly.io/policy-viewer/policy.html?policyUUID=3b5d1928-3f5b-4ee1-b8df-2d6c276b0bcc"]
|
||||||
|
]
|
||||||
|
function goToWebpage(urlIndex: integer) {
|
||||||
|
const link = document.createElement("a");
|
||||||
|
link.href = links[urlIndex][1];
|
||||||
|
link.target = "_blank"
|
||||||
|
link.rel = "noreferrer noopener"
|
||||||
|
link.click();
|
||||||
|
link.remove();
|
||||||
|
}
|
||||||
|
|
||||||
export default class MenuUiHandler extends MessageUiHandler {
|
export default class MenuUiHandler extends MessageUiHandler {
|
||||||
private menuContainer: Phaser.GameObjects.Container;
|
private menuContainer: Phaser.GameObjects.Container;
|
||||||
@ -46,6 +59,8 @@ export default class MenuUiHandler extends MessageUiHandler {
|
|||||||
|
|
||||||
protected manageDataConfig: OptionSelectConfig;
|
protected manageDataConfig: OptionSelectConfig;
|
||||||
protected communityConfig: OptionSelectConfig;
|
protected communityConfig: OptionSelectConfig;
|
||||||
|
protected accountStatsConfig: OptionSelectConfig;
|
||||||
|
protected legalLinksConfig: OptionSelectConfig;
|
||||||
|
|
||||||
public bgmBar: BgmBar;
|
public bgmBar: BgmBar;
|
||||||
|
|
||||||
@ -196,21 +211,6 @@ export default class MenuUiHandler extends MessageUiHandler {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: "Consent Preferences",
|
|
||||||
handler: () => {
|
|
||||||
const consentLink = document.querySelector(".termly-display-preferences") as HTMLInputElement;
|
|
||||||
const clickEvent = new MouseEvent("click", {
|
|
||||||
view: window,
|
|
||||||
bubbles: true,
|
|
||||||
cancelable: true
|
|
||||||
});
|
|
||||||
consentLink.dispatchEvent(clickEvent);
|
|
||||||
consentLink.focus();
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
keepOpen: true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: i18next.t("menuUiHandler:cancel"),
|
label: i18next.t("menuUiHandler:cancel"),
|
||||||
handler: () => {
|
handler: () => {
|
||||||
@ -225,6 +225,84 @@ export default class MenuUiHandler extends MessageUiHandler {
|
|||||||
options: manageDataOptions
|
options: manageDataOptions
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const accountOptions: OptionSelectItem[] = [
|
||||||
|
{
|
||||||
|
label: "Stats",
|
||||||
|
handler: () => {
|
||||||
|
ui.setOverlayMode(Mode.GAME_STATS);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Achievements",
|
||||||
|
handler: () => {
|
||||||
|
ui.setOverlayMode(Mode.ACHIEVEMENTS);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Vouchers",
|
||||||
|
handler: () => {
|
||||||
|
ui.setOverlayMode(Mode.VOUCHERS);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: i18next.t("menuUiHandler:cancel"),
|
||||||
|
handler: () => {
|
||||||
|
this.scene.ui.revertMode();
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
keepOpen: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
this.accountStatsConfig = {
|
||||||
|
xOffset: 98,
|
||||||
|
options: accountOptions
|
||||||
|
};
|
||||||
|
|
||||||
|
const siteOptions: OptionSelectItem[] = [
|
||||||
|
{
|
||||||
|
label: "Consent Preferences",
|
||||||
|
handler: () => {
|
||||||
|
const consentLink = document.querySelector(".termly-display-preferences") as HTMLInputElement;
|
||||||
|
const clickEvent = new MouseEvent("click", {
|
||||||
|
view: window,
|
||||||
|
bubbles: true,
|
||||||
|
cancelable: true
|
||||||
|
});
|
||||||
|
consentLink.dispatchEvent(clickEvent);
|
||||||
|
consentLink.focus();
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
keepOpen: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
for (var i = 0; i < links.length; i++) {
|
||||||
|
siteOptions.push({
|
||||||
|
label: links[i][0],
|
||||||
|
handler: () => {
|
||||||
|
window.open(links[i][1], "_blank").focus();
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
keepOpen: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
siteOptions.push({
|
||||||
|
label: i18next.t("menuUiHandler:cancel"),
|
||||||
|
handler: () => {
|
||||||
|
this.scene.ui.revertMode();
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
keepOpen: true
|
||||||
|
})
|
||||||
|
|
||||||
|
this.legalLinksConfig = {
|
||||||
|
xOffset: 98,
|
||||||
|
options: siteOptions
|
||||||
|
};
|
||||||
|
|
||||||
const communityOptions: OptionSelectItem[] = [
|
const communityOptions: OptionSelectItem[] = [
|
||||||
{
|
{
|
||||||
label: "Wiki",
|
label: "Wiki",
|
||||||
@ -318,16 +396,12 @@ export default class MenuUiHandler extends MessageUiHandler {
|
|||||||
ui.setOverlayMode(Mode.SETTINGS);
|
ui.setOverlayMode(Mode.SETTINGS);
|
||||||
success = true;
|
success = true;
|
||||||
break;
|
break;
|
||||||
case MenuOptions.ACHIEVEMENTS:
|
|
||||||
ui.setOverlayMode(Mode.ACHIEVEMENTS);
|
|
||||||
success = true;
|
|
||||||
break;
|
|
||||||
case MenuOptions.STATS:
|
case MenuOptions.STATS:
|
||||||
ui.setOverlayMode(Mode.GAME_STATS);
|
ui.setOverlayMode(Mode.MENU_OPTION_SELECT, this.accountStatsConfig);
|
||||||
success = true;
|
success = true;
|
||||||
break;
|
break;
|
||||||
case MenuOptions.VOUCHERS:
|
case MenuOptions.LINKS:
|
||||||
ui.setOverlayMode(Mode.VOUCHERS);
|
ui.setOverlayMode(Mode.MENU_OPTION_SELECT, this.legalLinksConfig);
|
||||||
success = true;
|
success = true;
|
||||||
break;
|
break;
|
||||||
case MenuOptions.EGG_LIST:
|
case MenuOptions.EGG_LIST:
|
||||||
|
Loading…
Reference in New Issue
Block a user