Open avatar editor from context menu

This commit is contained in:
Bill 2021-07-21 23:54:13 -04:00
parent 629d231887
commit ac392c71cf

View File

@ -1,6 +1,8 @@
import { AvatarAction, AvatarExpressionEnum, RoomObjectCategory } from 'nitro-renderer';
import { FC, useCallback, useState } from 'react';
import { GetCanStandUp, GetCanUseExpression, GetOwnPosture, HasHabboClub, HasHabboVip, IsRidingHorse } from '../../../../../../api';
import { AvatarEditorEvent } from '../../../../../../events';
import { dispatchUiEvent } from '../../../../../../hooks';
import { LocalizeText } from '../../../../../../utils/LocalizeText';
import { CurrencyIcon } from '../../../../../shared/currency-icon/CurrencyIcon';
import { useRoomContext } from '../../../../context/RoomContext';
@ -43,6 +45,7 @@ export const AvatarInfoWidgetOwnAvatarView: FC<AvatarInfoWidgetOwnAvatarViewProp
setIsDecorating(true);
break;
case 'change_looks':
dispatchUiEvent(new AvatarEditorEvent(AvatarEditorEvent.SHOW_EDITOR));
break;
case 'expressions':
hideMenu = false;