mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-23 08:00:51 +01:00
Update youtube widget
This commit is contained in:
parent
dafd567b9a
commit
dc68ff069c
@ -289,6 +289,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
|
||||
case RoomObjectWidgetRequestEvent.HIDE_HIGH_SCORE_DISPLAY:
|
||||
case RoomObjectWidgetRequestEvent.INERNAL_LINK:
|
||||
case RoomObjectWidgetRequestEvent.ROOM_LINK:
|
||||
case RoomObjectWidgetRequestEvent.YOUTUBE:
|
||||
this.onRoomObjectWidgetRequestEvent((event as RoomObjectWidgetRequestEvent), roomId);
|
||||
return;
|
||||
case RoomObjectFurnitureActionEvent.DICE_ACTIVATE:
|
||||
@ -873,6 +874,9 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
|
||||
case RoomObjectWidgetRequestEvent.ROOM_LINK:
|
||||
eventDispatcher.dispatchEvent(new RoomEngineTriggerWidgetEvent(RoomEngineTriggerWidgetEvent.REQUEST_ROOM_LINK, roomId, objectId, objectCategory));
|
||||
return;
|
||||
case RoomObjectWidgetRequestEvent.YOUTUBE:
|
||||
eventDispatcher.dispatchEvent(new RoomEngineTriggerWidgetEvent(RoomEngineTriggerWidgetEvent.REQUEST_YOUTUBE, roomId, objectId, objectCategory));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,7 @@ export class RoomEngineTriggerWidgetEvent extends RoomEngineObjectEvent
|
||||
public static REQUEST_HIDE_HIGH_SCORE_DISPLAY: string = 'RETWE_REQUEST_HIDE_HIGH_SCORE_DISPLAY';
|
||||
public static REQUEST_INTERNAL_LINK: string = 'RETWE_REQUEST_INTERNAL_LINK';
|
||||
public static REQUEST_ROOM_LINK: string = 'RETWE_REQUEST_ROOM_LINK';
|
||||
public static REQUEST_YOUTUBE: string = 'RETWE_REQUEST_YOUTUBE';
|
||||
|
||||
private _widget: string;
|
||||
|
||||
|
@ -39,6 +39,7 @@ export class RoomObjectWidgetRequestEvent extends RoomObjectEvent
|
||||
public static HIDE_HIGH_SCORE_DISPLAY: string = 'ROWRE_HIDE_HIGH_SCORE_DISPLAY';
|
||||
public static INERNAL_LINK: string = 'ROWRE_INTERNAL_LINK';
|
||||
public static ROOM_LINK: string = 'ROWRE_ROOM_LINK';
|
||||
public static YOUTUBE: string = 'ROWRE_YOUTUBE';
|
||||
|
||||
constructor(type: string, roomObject: IRoomObject)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { RoomWidgetEnum } from '../../../../ui/widget/enums/RoomWidgetEnum';
|
||||
import { RoomObjectWidgetRequestEvent } from '../../../events';
|
||||
import { RoomObjectDataRequestEvent } from '../../../events/RoomObjectDataRequestEvent';
|
||||
import { RoomObjectVariable } from '../../RoomObjectVariable';
|
||||
import { FurnitureLogic } from './FurnitureLogic';
|
||||
@ -8,6 +8,7 @@ export class FurnitureYoutubeLogic extends FurnitureLogic
|
||||
public getEventTypes(): string[]
|
||||
{
|
||||
const types = [
|
||||
RoomObjectWidgetRequestEvent.YOUTUBE,
|
||||
RoomObjectDataRequestEvent.RODRE_URL_PREFIX
|
||||
];
|
||||
|
||||
@ -24,8 +25,12 @@ export class FurnitureYoutubeLogic extends FurnitureLogic
|
||||
}
|
||||
}
|
||||
|
||||
public get widget(): string
|
||||
public useObject(): void
|
||||
{
|
||||
return RoomWidgetEnum.YOUTUBE;
|
||||
if(!this.object || !this.eventDispatcher) return;
|
||||
|
||||
console.log(this.object);
|
||||
|
||||
this.eventDispatcher.dispatchEvent(new RoomObjectWidgetRequestEvent(RoomObjectWidgetRequestEvent.YOUTUBE, this.object));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user