mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 23:57:19 +02:00
31 lines
875 B
TypeScript
31 lines
875 B
TypeScript
import { BxEvent } from "@/utils/bx-event";
|
|
import { BxIcon } from "@/utils/bx-icon";
|
|
import { createButton, ButtonStyle } from "@/utils/html";
|
|
import { t } from "@/utils/translation";
|
|
import { BaseGameBarAction } from "./action-base";
|
|
import { TrueAchievements } from "@/utils/true-achievements";
|
|
|
|
export class TrueAchievementsAction extends BaseGameBarAction {
|
|
$content: HTMLElement;
|
|
|
|
constructor() {
|
|
super();
|
|
|
|
const onClick = (e: Event) => {
|
|
BxEvent.dispatch(window, BxEvent.GAME_BAR_ACTION_ACTIVATED);
|
|
TrueAchievements.open(false);
|
|
};
|
|
|
|
this.$content = createButton({
|
|
style: ButtonStyle.GHOST,
|
|
icon: BxIcon.TRUE_ACHIEVEMENTS,
|
|
title: t('true-achievements'),
|
|
onClick: onClick,
|
|
});
|
|
}
|
|
|
|
render(): HTMLElement {
|
|
return this.$content;
|
|
}
|
|
}
|