public void SetUp()
        {
            BuildModeHUDInitializationModel testControllers = new BuildModeHUDInitializationModel
            {
                tooltipController                    = Substitute.For <ITooltipController>(),
                sceneCatalogController               = Substitute.For <ISceneCatalogController>(),
                quickBarController                   = Substitute.For <IQuickBarController>(),
                entityInformationController          = Substitute.For <IEntityInformationController>(),
                firstPersonModeController            = Substitute.For <IFirstPersonModeController>(),
                shortcutsController                  = Substitute.For <IShortcutsController>(),
                publishPopupController               = Substitute.For <IPublishPopupController>(),
                dragAndDropSceneObjectController     = Substitute.For <IDragAndDropSceneObjectController>(),
                publishBtnController                 = Substitute.For <IPublishBtnController>(),
                inspectorBtnController               = Substitute.For <IInspectorBtnController>(),
                catalogBtnController                 = Substitute.For <ICatalogBtnController>(),
                inspectorController                  = Substitute.For <IInspectorController>(),
                buildModeConfirmationModalController = Substitute.For <IBuildModeConfirmationModalController>(),
                topActionsButtonsController          = Substitute.For <ITopActionsButtonsController>(),
                saveHUDController                    = Substitute.For <ISaveHUDController>(),
                newProjectDetailsController          = Substitute.For <IPublicationDetailsController>(),
                publicationDetailsController         = Substitute.For <IPublicationDetailsController>()
            };

            buildModeHUDController = Substitute.ForPartsOf <BuildModeHUDController>();
            buildModeHUDController.Configure().CreateView().Returns(info => Substitute.For <IBuildModeHUDView>());
            buildModeHUDController.Initialize(testControllers);
        }
    public override void Init(BIWContext context)
    {
        base.Init(context);
        if (HUDController.i.builderInWorldMainHud != null)
        {
            hudController = HUDController.i.builderInWorldMainHud;
            hudController.OnEntityDelete            += DeleteSingleEntity;
            hudController.OnDuplicateSelectedAction += DuplicateSelectedEntitiesInput;
            hudController.OnDeleteSelectedAction    += DeleteSelectedEntitiesInput;
            hudController.OnEntityClick             += ChangeEntitySelectionFromList;
            hudController.OnEntityLock                     += ChangeEntityLockStatus;
            hudController.OnEntityChangeVisibility         += ChangeEntityVisibilityStatus;
            hudController.OnEntityRename                   += SetEntityName;
            hudController.OnEntitySmartItemComponentUpdate += UpdateSmartItemComponentInKernel;
        }


        BIWInputWrapper.OnMouseDown += OnInputMouseDown;
        BIWInputWrapper.OnMouseUp   += OnInputMouseUp;

        DCL.Environment.i.world.sceneBoundsChecker.OnEntityBoundsCheckerStatusChanged += ChangeEntityBoundsCheckerStatus;

        bridge = context.sceneReferences.builderInWorldBridge;

        outlinerController = context.outlinerController;

        modeController    = context.modeController;
        actionController  = context.actionController;
        creatorController = context.creatorController;
        raycastController = context.raycastController;

        editMaterial = context.projectReferencesAsset.editMaterial;

        hideSelectedEntitiesAction = context.inputsReferencesAsset.hideSelectedEntitiesAction;
        showAllEntitiesAction      = context.inputsReferencesAsset.showAllEntitiesAction;

        hideSelectedEntitiesDelegate = (action) => ChangeShowStateSelectedEntities();
        showAllEntitiesDelegate      = (action) => ShowAllEntities();

        hideSelectedEntitiesAction.OnTriggered += hideSelectedEntitiesDelegate;
        showAllEntitiesAction.OnTriggered      += showAllEntitiesDelegate;

        actionController.OnRedo += ReSelectEntities;
        actionController.OnUndo += ReSelectEntities;
    }
Esempio n. 3
0
    public override void Init()
    {
        base.Init();
        if (HUDController.i.builderInWorldMainHud != null)
        {
            hudController = HUDController.i.builderInWorldMainHud;
            hudController.OnEntityDelete            += DeleteSingleEntity;
            hudController.OnDuplicateSelectedAction += DuplicateSelectedEntitiesInput;
            hudController.OnDeleteSelectedAction    += DeleteSelectedEntitiesInput;
            hudController.OnEntityClick             += ChangeEntitySelectionFromList;
            hudController.OnEntityLock                     += ChangeEntityLockStatus;
            hudController.OnEntityChangeVisibility         += ChangeEntityVisibilityStatus;
            hudController.OnEntityRename                   += SetEntityName;
            hudController.OnEntitySmartItemComponentUpdate += UpdateSmartItemComponentInKernel;
        }

        actionController.OnRedo += ReSelectEntities;
        actionController.OnUndo += ReSelectEntities;
    }
Esempio n. 4
0
    public virtual IHUD CreateHUD(HUDElementID hudElementId)
    {
        IHUD hudElement = null;

        switch (hudElementId)
        {
        case HUDElementID.NONE:
            break;

        case HUDElementID.MINIMAP:
            hudElement = new MinimapHUDController();
            break;

        case HUDElementID.PROFILE_HUD:
            hudElement = new ProfileHUDController();
            break;

        case HUDElementID.NOTIFICATION:
            hudElement = new NotificationHUDController();
            break;

        case HUDElementID.AVATAR_EDITOR:
            hudElement = new AvatarEditorHUDController();
            break;

        case HUDElementID.SETTINGS_PANEL:
            hudElement = new SettingsPanelHUDController();
            break;

        case HUDElementID.EXPRESSIONS:
            hudElement = new ExpressionsHUDController();
            break;

        case HUDElementID.PLAYER_INFO_CARD:
            hudElement = new PlayerInfoCardHUDController();
            break;

        case HUDElementID.AIRDROPPING:
            hudElement = new AirdroppingHUDController();
            break;

        case HUDElementID.TERMS_OF_SERVICE:
            hudElement = new TermsOfServiceHUDController();
            break;

        case HUDElementID.WORLD_CHAT_WINDOW:
            hudElement = new WorldChatWindowHUDController();
            break;

        case HUDElementID.FRIENDS:
            hudElement = new FriendsHUDController();
            break;

        case HUDElementID.PRIVATE_CHAT_WINDOW:
            hudElement = new PrivateChatWindowHUDController();
            break;

        case HUDElementID.TASKBAR:
            hudElement = new TaskbarHUDController();
            break;

        case HUDElementID.MESSAGE_OF_THE_DAY:
            hudElement = new WelcomeHUDController();
            break;

        case HUDElementID.OPEN_EXTERNAL_URL_PROMPT:
            hudElement = new ExternalUrlPromptHUDController();
            break;

        case HUDElementID.NFT_INFO_DIALOG:
            hudElement = new NFTPromptHUDController();
            break;

        case HUDElementID.TELEPORT_DIALOG:
            hudElement = new TeleportPromptHUDController();
            break;

        case HUDElementID.CONTROLS_HUD:
            hudElement = new ControlsHUDController();
            break;

        case HUDElementID.EXPLORE_HUD:
            hudElement = new ExploreHUDController();
            break;

        case HUDElementID.HELP_AND_SUPPORT_HUD:
            hudElement = new HelpAndSupportHUDController();
            break;

        case HUDElementID.USERS_AROUND_LIST_HUD:
            hudElement = new UsersAroundListHUDController();
            break;

        case HUDElementID.GRAPHIC_CARD_WARNING:
            hudElement = new GraphicCardWarningHUDController();
            break;

        case HUDElementID.BUILDER_IN_WORLD_MAIN:
            hudElement = new BuildModeHUDController();
            break;

        case HUDElementID.QUESTS_PANEL:
            hudElement = new QuestsPanelHUDController();
            break;

        case HUDElementID.QUESTS_TRACKER:
            hudElement = new QuestsTrackerHUDController();
            break;

        case HUDElementID.SIGNUP:
            hudElement = new SignupHUDController();
            break;

        case HUDElementID.BUILDER_PROJECTS_PANEL:
            hudElement = new BuilderProjectsPanelController();
            break;

        case HUDElementID.LOADING:
            hudElement = new LoadingHUDController();
            break;

        case HUDElementID.AVATAR_NAMES:
            hudElement = new AvatarNamesHUDController();
            break;
        }

        return(hudElement);
    }