Exemple #1
0
        /// <summary>
        /// Bind events to the WebOverlayRenderer
        /// </summary>
        private void Bind()
        {
            WebOverlayRenderer overlay = ClientContext.WebOverlayRenderer;

            overlay.Bind("hotbarBindSlots", this.BindSlots);
            overlay.Bind("hotbarAfterShow", this.OnShow);
            overlay.Bind("hotbarAfterHide", this.OnHide);
        }
Exemple #2
0
        /// <summary>
        /// Bind events from the UI
        /// </summary>
        private void Bind()
        {
            WebOverlayRenderer overlay = ClientContext.WebOverlayRenderer;

            overlay.Bind("onShowSignInfo", this.OnShow);
            overlay.Bind("onHideSignInfo", this.OnHide);
            overlay.Bind("onChangeSignInfo", this.OnChange);
        }
Exemple #3
0
 /// <summary>
 /// Open up the sign UI
 /// </summary>
 public void Show()
 {
     if (!this._open)
     {
         this._open = true;
         WebOverlayRenderer overlay = ClientContext.WebOverlayRenderer;
         overlay.Call("showSignInfo", this._data, null, null, null, null, null);
     }
 }
Exemple #4
0
 /// <summary>
 /// Close the sign UI
 /// </summary>
 public void Hide()
 {
     if (this._open)
     {
         this._open = false;
         WebOverlayRenderer overlay = ClientContext.WebOverlayRenderer;
         overlay.Call("hideSignInfo", null, null, null, null, null, null);
     }
 }
        /// <summary>
        /// Bind events to the WebOverlayRenderer
        /// </summary>
        private void Bind()
        {
            WebOverlayRenderer overlay = ClientContext.WebOverlayRenderer;

            var surface   = overlay.GetPrivateFieldValue <BrowserRenderSurface>("_surface");
            var functions = surface.GetPrivateFieldValue <Dictionary <string, Action <string> > >("_functions");

            if (!functions.ContainsKey("hotbarBindSlots"))
            {
                overlay.Bind("hotbarBindSlots", this.BindSlots);
                overlay.Bind("hotbarAfterShow", this.OnShow);
                overlay.Bind("hotbarAfterHide", this.OnHide);
            }
            else
            {
                functions["hotbarBindSlots"] = this.BindSlots;
                functions["hotbarAfterShow"] = this.OnShow;
                functions["hotbarAfterHide"] = this.OnHide;
            }
        }