mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-08 22:27:44 +02:00
6.0
This commit is contained in:
25
src/modules/game-bar/screenshot-action.ts
Executable file
25
src/modules/game-bar/screenshot-action.ts
Executable file
@@ -0,0 +1,25 @@
|
||||
import { BxIcon } from "@utils/bx-icon";
|
||||
import { createButton, ButtonStyle } from "@utils/html";
|
||||
import { BaseGameBarAction } from "./base-action";
|
||||
import { t } from "@utils/translation";
|
||||
import { ScreenshotManager } from "@/utils/screenshot-manager";
|
||||
|
||||
export class ScreenshotAction extends BaseGameBarAction {
|
||||
$content: HTMLElement;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.$content = createButton({
|
||||
style: ButtonStyle.GHOST,
|
||||
icon: BxIcon.SCREENSHOT,
|
||||
title: t('take-screenshot'),
|
||||
onClick: this.onClick,
|
||||
});
|
||||
}
|
||||
|
||||
onClick = (e: Event) => {
|
||||
super.onClick(e);
|
||||
ScreenshotManager.getInstance().takeScreenshot();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user