예제 #1
0
    void InitBrowserTexture()
    {
        bTex = GetComponent <CollabBrowserTexture>();
        bTex.AddLoadCompleteEventListener(OnLoadComplete);
        if (bTex.id == CollabBrowserId.NONE)
        {
            bTex.id = CollabBrowserId.TEAMWEB + id;
        }

        if (GameManager.Inst.ServerConfig == "LocalTest" && id == 6)
        {
            VDebug.LogError("UCI Hack for id 6 -- making id slide presenter for backwards compatiblity");
            bTex.id = CollabBrowserId.SLIDEPRESENT;
            return;
        }

        if (CommunicationManager.redirectVideo)
        {
            bTex.redirectLoadingURL.Add("www.youtube.com", RedirectHelper.HandleYouTube);
            bTex.redirectLoadingURL.Add("vimeo.com", RedirectHelper.HandleVimeo);
        }

        // lock down team room screens, open them up on the guilayer side.
        if (GameManager.Inst.ServerConfig != "UCI")
        {
            bTex.minWriteAccessType = PlayerType.LEADER;
        }
    }
예제 #2
0
    void Start()
    {
        int teamID = CommunicationManager.CurrentTeamID;

        if (useScaleForPixelDimensions)
        {
            pixelHeight = PanelHelpers.GetPxHeightFromTransform(this.transform, pixelWidth);
        }
        browserTexture = gameObject.AddComponent <CollabBrowserTexture>();
        browserTexture.useTransparentMaterial = false;
        browserTexture.Width      = pixelWidth;
        browserTexture.Height     = pixelHeight;
        browserTexture.id         = CollabBrowserId.TEAMNOTES;
        browserTexture.InitialURL = GetNotesURL(teamID);
        browserTexture.ShowMouseRepresentation = (GetComponent <Billboard>() == null || !GetComponent <Billboard>().enabled); // sphere's don't currently move with the billboard controlled orientation
        browserTexture.FocusChange            += OnFocusChange;
        browserTexture.AddLoadCompleteEventListener(OnLoadComplete);
        if (activeOnFocusObj != null)
        {
            activeOnFocusObj.SetActive(false); // initialized assuming screen doesn't have focus.
        }
        // shouldn't need these, but in case user puts video url in notes panel.
        if (CommunicationManager.redirectVideo)
        {
            browserTexture.redirectLoadingURL.Add("www.youtube.com", RedirectHelper.HandleYouTube);
            browserTexture.redirectLoadingURL.Add("vimeo.com", RedirectHelper.HandleVimeo);
        }

        WebPanel webPanel = gameObject.AddComponent <WebPanel>();

        webPanel.focusGainEngagesSnapCam      = true;
        webPanel.focusCameraOnInputFieldClick = false; // already handled on focus
    }
예제 #3
0
    void Awake()
    {
        browserTexture = GetComponent <CollabBrowserTexture>();
        browserTexture.ShowMouseRepresentation = true;
        browserTexture.enableScrollWheel       = enableScrollWheel;
        browserTexture.allowURLBroadcast       = false;
        browserTexture.AddLoadCompleteEventListener(OnLoadComplete);
        browserTexture.ClickBlocked += OnClickBlocked;

        if (browserTexture.id == CollabBrowserId.NONE)
        {
            browserTexture.id = CollabBrowserId.SLIDEPRESENT;
        }

        if (CommunicationManager.redirectVideo)
        {
            browserTexture.redirectLoadingURL.Add("www.youtube.com", RedirectHelper.HandleYouTube);
            browserTexture.redirectLoadingURL.Add("vimeo.com", RedirectHelper.HandleVimeo);
        }

        WebPanel webPanel = gameObject.AddComponent <WebPanel>();

        webPanel.goToActivateOnFocus = goToActivateOnFocus;
        if (browserTexture.KeyInputEnabled)
        {
            webPanel.allowKeyInputOnZoom = true;
        }

        urlController                = gameObject.AddComponent <RoomVariableUrlController>();
        urlController.RoomVarName    = "purl";
        urlController.BrowserTexture = browserTexture;
    }
예제 #4
0
파일: HTMLPanelGUI.cs 프로젝트: shldn/mdons
 void Start()
 {
     browserTexture = overlayGO.AddComponent <CollabBrowserTexture>();
     browserTexture.useCollabFeatures      = browserId != -1; // true let's us use the webpanel command
     browserTexture.Width                  = width;
     browserTexture.Height                 = height;
     browserTexture.useTransparentMaterial = useTransparentMaterial;
     browserTexture.id = browserId;
     if (initUrl != "")
     {
         browserTexture.InitialURL = initUrl;
     }
     browserTexture.AddLoadCompleteEventListener(OnWebViewLoaded);
 }
예제 #5
0
    public virtual void Initialize()
    {
        MeshFilter mf = GetComponent <MeshFilter>();

        if (mf != null)
        {
            MeshCollider mc = GetComponent <MeshCollider>();
            if (mc == null)
            {
                mc            = gameObject.AddComponent <MeshCollider>();
                mc.sharedMesh = mf.mesh;
            }
            if (useScaleForPixelDimensions)
            {
                pixelHeight = PanelHelpers.GetPxHeightFromTransform(this.transform, pixelWidth);
            }
            bTex                 = gameObject.AddComponent <CollabBrowserTexture>();
            bTex.Width           = pixelWidth;
            bTex.Height          = pixelHeight;
            bTex.id              = bssId;
            bTex.InitialURL      = url;
            bTex.KeyInputEnabled = false;
            bTex.blacklistRequestURLFragments.AddRange(blacklistRequestURLFragments);
            bTex.requestReplacements = requestReplacements;
            bTex.LoadingTexture      = refreshTex;
            bTex.FocusChange        += OnFocusChange;
        }
        else
        {
            PlaneMesh bPlane = PlaneMeshFactory.GetPlane(pixelWidth, pixelHeight, gameObject.name + "-bplane", true, url);
            bTex = bPlane.go.GetComponent <CollabBrowserTexture>();
        }
        bTex.AllowURLChanges = false;
        bTex.AddLoadCompleteEventListener(OnLoadCompleted);

        // web panel for focus control
        WebPanel webPanel = gameObject.AddComponent <WebPanel>();

        webPanel.focusCameraOnInputFieldClick = false; // not currently needed for bizsim panels
    }
예제 #6
0
 public WebCallbackHandler(CollabBrowserTexture bTex_)
 {
     bTex = bTex_;
     bTex.AddLoadCompleteEventListener(OnLoadComplete);
 }