From f720478d5030ce4839d7a2c3f7e73ced021285d8 Mon Sep 17 00:00:00 2001 From: Bill Date: Tue, 3 Aug 2021 16:35:47 -0400 Subject: [PATCH] Fix screenshot command --- src/views/room/handlers/RoomWidgetChatInputHandler.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/views/room/handlers/RoomWidgetChatInputHandler.ts b/src/views/room/handlers/RoomWidgetChatInputHandler.ts index 31b4e797..1b21ff2d 100644 --- a/src/views/room/handlers/RoomWidgetChatInputHandler.ts +++ b/src/views/room/handlers/RoomWidgetChatInputHandler.ts @@ -1,4 +1,4 @@ -import { AvatarExpressionEnum, HabboClubLevelEnum, NitroEvent, RoomControllerLevel, RoomSessionChatEvent, RoomSettingsComposer, RoomWidgetEnum, RoomZoomEvent } from 'nitro-renderer'; +import { AvatarExpressionEnum, HabboClubLevelEnum, NitroEvent, RoomControllerLevel, RoomSessionChatEvent, RoomSettingsComposer, RoomWidgetEnum, RoomZoomEvent, TextureUtils } from 'nitro-renderer'; import { GetRoomEngine, GetSessionDataManager } from '../../../api'; import { SendMessageHook } from '../../../hooks/messages'; import { RoomWidgetFloodControlEvent, RoomWidgetUpdateEvent } from '../events'; @@ -114,8 +114,11 @@ export class RoomWidgetChatInputHandler extends RoomWidgetHandler return null; case ':screenshot': - GetRoomEngine().createRoomScreenshot(this.container.roomSession.roomId, 1); - + const texture = GetRoomEngine().createTextureFromRoom(this.container.roomSession.roomId, 1); + + const newWindow = window.open(''); + + newWindow.document.write(TextureUtils.generateImageUrl(texture)); return null; case ':pickall': // this.container.notificationService.alertWithConfirm('${room.confirm.pick_all}', '${generic.alert.title}', () =>