mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-27 08:00:51 +01:00
Fix some things
This commit is contained in:
parent
d6b146bd5b
commit
0aac6f0367
@ -1,11 +1,48 @@
|
||||
import { RoomWidgetObjectNameEvent } from '../../api';
|
||||
import { NitroEvent } from '@nitrots/nitro-renderer';
|
||||
|
||||
export class FriendEnteredRoomEvent extends RoomWidgetObjectNameEvent
|
||||
export class FriendEnteredRoomEvent extends NitroEvent
|
||||
{
|
||||
public static ENTERED: string = 'FERE_ENTERED';
|
||||
|
||||
private _roomIndex: number;
|
||||
private _category: number;
|
||||
private _id: number;
|
||||
private _name: string;
|
||||
private _userType: number;
|
||||
|
||||
constructor(roomIndex: number, category: number, id: number, name: string, userType: number)
|
||||
{
|
||||
super(FriendEnteredRoomEvent.ENTERED, roomIndex, category, id, name, userType);
|
||||
super(FriendEnteredRoomEvent.ENTERED);
|
||||
|
||||
this._roomIndex = roomIndex;
|
||||
this._category = category;
|
||||
this._id = id;
|
||||
this._name = name;
|
||||
this._userType = userType;
|
||||
}
|
||||
|
||||
public get roomIndex(): number
|
||||
{
|
||||
return this._roomIndex;
|
||||
}
|
||||
|
||||
public get category(): number
|
||||
{
|
||||
return this._category;
|
||||
}
|
||||
|
||||
public get id(): number
|
||||
{
|
||||
return this._id;
|
||||
}
|
||||
|
||||
public get name(): string
|
||||
{
|
||||
return this._name;
|
||||
}
|
||||
|
||||
public get userType(): number
|
||||
{
|
||||
return this._userType;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { RoomWidgetUpdateEvent } from '../../../api';
|
||||
import { NitroEvent } from '@nitrots/nitro-renderer';
|
||||
|
||||
export class RoomWidgetCameraEvent extends RoomWidgetUpdateEvent
|
||||
export class RoomWidgetCameraEvent extends NitroEvent
|
||||
{
|
||||
public static SHOW_CAMERA: string = 'NE_SHOW_CAMERA';
|
||||
public static HIDE_CAMERA: string = 'NE_HIDE_CAMERA';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { RoomWidgetUpdateEvent } from '../../../api';
|
||||
import { NitroEvent } from '@nitrots/nitro-renderer';
|
||||
|
||||
export class RoomWidgetThumbnailEvent extends RoomWidgetUpdateEvent
|
||||
export class RoomWidgetThumbnailEvent extends NitroEvent
|
||||
{
|
||||
public static SHOW_THUMBNAIL: string = 'NE_SHOW_THUMBNAIL';
|
||||
public static HIDE_THUMBNAIL: string = 'NE_HIDE_THUMBNAIL';
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { RoomEnterEffect, RoomObjectCategory } from '@nitrots/nitro-renderer';
|
||||
import { FC, useCallback, useMemo, useState } from 'react';
|
||||
import { GetRoomSession, GetSessionDataManager, RoomWidgetObjectNameEvent, RoomWidgetRoomEngineUpdateEvent, RoomWidgetRoomObjectMessage, RoomWidgetRoomObjectUpdateEvent, RoomWidgetUpdateDanceStatusEvent, RoomWidgetUpdateInfostandEvent, RoomWidgetUpdateInfostandFurniEvent, RoomWidgetUpdateInfostandPetEvent, RoomWidgetUpdateInfostandRentableBotEvent, RoomWidgetUpdateInfostandUserEvent, RoomWidgetUpdateRentableBotChatEvent, RoomWidgetUseProductBubbleEvent, UseProductItem } from '../../../../api';
|
||||
import { FriendEnteredRoomEvent } from '../../../../events';
|
||||
import { useUiEvent } from '../../../../hooks/events';
|
||||
import { CreateEventDispatcherHook } from '../../../../hooks/events/event-dispatcher.base';
|
||||
import { useRoomContext } from '../../context/RoomContext';
|
||||
import { AvatarInfoWidgetAvatarView } from './views/avatar/AvatarInfoWidgetAvatarView';
|
||||
@ -256,15 +254,15 @@ export const AvatarInfoWidgetView: FC<{}> = props =>
|
||||
|
||||
CreateEventDispatcherHook(RoomWidgetUseProductBubbleEvent.USE_PRODUCT_BUBBLES, eventDispatcher, onRoomWidgetUseProductBubbleEvent);
|
||||
|
||||
const onFriendEnteredRoomEvent = useCallback((event: FriendEnteredRoomEvent) =>
|
||||
{
|
||||
setNameBubbles(prevValue =>
|
||||
{
|
||||
return [ ...prevValue, event ];
|
||||
})
|
||||
}, []);
|
||||
// const onFriendEnteredRoomEvent = useCallback((event: FriendEnteredRoomEvent) =>
|
||||
// {
|
||||
// setNameBubbles(prevValue =>
|
||||
// {
|
||||
// return [ ...prevValue, event ];
|
||||
// })
|
||||
// }, []);
|
||||
|
||||
useUiEvent(FriendEnteredRoomEvent.ENTERED, onFriendEnteredRoomEvent);
|
||||
// useUiEvent(FriendEnteredRoomEvent.ENTERED, onFriendEnteredRoomEvent);
|
||||
|
||||
const decorateView = useMemo(() =>
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user