示例#1
0
 protected override void StartListeners(IDataObject data)
 {
     if (this.DropTarget != null)
     {
         this.hoverHelper             = new HoverHelper((UIElement)this.DropTarget);
         this.hoverHelper.HoverEnter += new EventHandler <EventArgs>(this.HoverEnter);
         this.hoverHelper.HoverLeave += new EventHandler <EventArgs>(this.HoverLeave);
         this.hoverHelper.HandleMouseEnter(Mouse.GetPosition((IInputElement)this.DropTarget));
     }
     base.StartListeners(data);
 }
示例#2
0
 protected override void StopListeners(IDataObject data)
 {
     base.StopListeners(data);
     if (this.hoverHelper == null)
     {
         return;
     }
     this.hoverHelper.HandleMouseLeave();
     this.hoverHelper.HoverEnter -= new EventHandler <EventArgs>(this.HoverEnter);
     this.hoverHelper.HoverLeave -= new EventHandler <EventArgs>(this.HoverLeave);
     this.hoverHelper             = (HoverHelper)null;
 }
示例#3
0
    public void FadeIn(float ft)
    {
        HoverHelper hh = hoverHelper[helperIndex];

        if (!fading)
        {
            fadeTimer = ft;
//			// commented Debug.Log("started fading.");
            hh.parent.gameObject.SetActive(true);

//			fadingHelper = hh;
            fadeImages = new Image[] {
                hh.arrow,
                hh.backboard,
            };

            fadeBackgrounds = new Image[] {
                hh.arrowShadow,
                hh.backboardShadow
            };
            fadeText = new Text[] {
                hh.title,
                hh.description,
                hh.skipText
            };
            foreach (Image im in fadeImages)
            {
                im.color = GameConfig.juneYellowTransparent;
            }
            foreach (Text t in fadeText)
            {
                t.color = GameConfig.darkGrayTransparent;
            }
            foreach (Image im in fadeBackgrounds)
            {
                im.color = new Color(0, 0, 0, 0);
            }
            fading = true;
        }
    }