5180 fichiers 38.5 Mo 0 téléchargements 567 vues mis à jour il y a 8 heures ui
nitro-v36-with-renderer-v36 / src / components / room / widgets / avatar-info / menu / AvatarInfoWidgetDecorateView.tsx
AvatarInfoWidgetDecorateView.tsx 1.5 Ko Télécharger le fichier
import { RoomObjectCategory } from '@octane/renderer';
import { Dispatch, FC, SetStateAction } from 'react';
import { LocalizeText } from '../../../../../api';
import { ContextMenuListItemView } from '../../context-menu/ContextMenuListItemView';
import { ContextMenuView } from '../../context-menu/ContextMenuView';

interface AvatarInfoWidgetDecorateViewProps {
    userId: number;
    userName: string;
    roomIndex: number;
    setIsDecorating: Dispatch<SetStateAction<boolean>>;
}

export const AvatarInfoWidgetDecorateView: FC<AvatarInfoWidgetDecorateViewProps> = (props) => {
    const { userId = -1, userName = '', roomIndex = -1, setIsDecorating = null } = props;

    return (
        // AIR DecorateModeView (own_avatar_decorating): the own-menu bubble with one button, at 80% opacity, 10 px up.
        <ContextMenuView
            anchorGap={-10}
            category={RoomObjectCategory.UNIT}
            classNames={['octane-avatar-action-menu', 'octane-avatar-action-menu--own', 'octane-avatar-action-menu--decorate']}
            freezePositionOnHover={true}
            maximumVerticalLeadRatio={0.05}
            objectId={roomIndex}
            showCaretIcon={false}
            style={{ opacity: 0.8 }}
            onClose={null}
        >
            <div className="air-avatar-menu-buttons">
                <ContextMenuListItemView onClick={() => setIsDecorating(false)}>{LocalizeText('widget.avatar.stop_decorating')}</ContextMenuListItemView>
            </div>
        </ContextMenuView>
    );
};
15Sujets
1Dépôts
20Membres
4En ligne
Profile
Inscrit
Dernière visite
Messages
0
Votes positifs
0
Votes négatifs
0

Nous utilisons des cookies pour assurer le bon fonctionnement du site et améliorer votre expérience. en savoir plus

Autoriser