예제 #1
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);
        }
예제 #2
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);
        }
        /// <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;
            }
        }