示例#1
0
        public void ShowOptionsForOwnerDeployedScene()
        {
            contextMenu.Show("", isSceneDeployed: true, isOwnerOrOperator: true, isContributor: false);

            Assert.IsFalse(contextMenu.deleteButton.gameObject.activeSelf, "Option should not be displayed");
            Assert.IsFalse(contextMenu.shareButton.gameObject.activeSelf, "Option should not be displayed");
            Assert.IsFalse(contextMenu.duplicateButton.gameObject.activeSelf, "Option should not be displayed");
            Assert.IsFalse(contextMenu.quitContributorButton.gameObject.activeSelf, "Option should not be displayed");

            Assert.IsTrue(contextMenu.settingsButton.gameObject.activeSelf, "Option should be displayed");
            Assert.IsTrue(contextMenu.duplicateAsProjectButton.gameObject.activeSelf, "Option should be displayed");
            Assert.IsTrue(contextMenu.downloadButton.gameObject.activeSelf, "Option should be displayed");
            Assert.IsTrue(contextMenu.unpublishButton.gameObject.activeSelf, "Option should be displayed");
        }
示例#2
0
 void OnContextMenuOpen(ISceneData sceneData, ISceneCardView sceneCard)
 {
     contextMenu.transform.position = sceneCard.contextMenuButtonPosition;
     contextMenu.Show(sceneData.id, sceneData.isDeployed,
                      sceneData.isOwner || sceneData.isOperator, sceneData.isContributor);
     sceneCoords = sceneData.coords;
     sceneSource = sceneData.source;
 }