Exemplo n.º 1
0
        /// <summary>
        /// Changes the position and dimensions of current webview.
        /// If the width or height value is greater than 0, the webview is displayed as a fixed size.
        /// It also becomes the reference size of the margin specified by left, top, right and bottom value.
        /// </summary>
        /// <param name="left">The new value of the left margin of the webview.</param>
        /// <param name="top">The new value of the top margin of the webview.</param>
        /// <param name="right">The new value of the right margin of the webview.</param>
        /// <param name="bottom">The new value of the bottom margin of the webview.</param>
        /// <param name="width">The new width of the webview.</param>
        /// <param name="height">The new height of the webview.</param>
        public void SetWindowLayout(int left, int top, int right, int bottom, int width, int height)
#endif
        {
            Setup();

#if UNIWEBVIEW3_SUPPORTED
            UniWebViewInterface.SetFrame(listener.Name, left, top, width, height);
#elif UNIWEBVIEW2_SUPPORTED
            UniWebViewPlugin.ChangeInsets(listener.Name, top, left, bottom, right);
#else
            WWebViewPlugin.ChangeInsets(listener.Name, top, left, bottom, right, width, height);
#endif
        }
Exemplo n.º 2
0
 private void ForceUpdateInsetsInternal(UniWebViewEdgeInsets insets)
 {
     _insets = insets;
     UniWebViewPlugin.ChangeInsets(gameObject.name,
                                   this.insets.top,
                                   this.insets.left,
                                   this.insets.bottom,
                                   this.insets.right);
     #if UNITY_EDITOR
     CreateTexture(this.insets.left,
                   this.insets.bottom,
                   Screen.width - this.insets.left - this.insets.right,
                   Screen.height - this.insets.top - this.insets.bottom
                   );
     #endif
 }
Exemplo n.º 3
0
 private void ForceUpdateInsetsInternal(UniWebViewEdgeInsets insets)
 {
     this._insets = insets;
     UniWebViewPlugin.ChangeInsets(((Object)((Component)this).get_gameObject()).get_name(), this.insets.top, this.insets.left, this.insets.bottom, this.insets.right);
 }
Exemplo n.º 4
0
 private void ForceUpdateInsetsInternal(UniWebViewEdgeInsets insets)
 {
     this._insets = insets;
     UniWebViewPlugin.ChangeInsets(base.gameObject.name, this.insets.top, this.insets.left, this.insets.bottom, this.insets.right);
 }