コード例 #1
0
 public void InitScrollSprites(UXFactory source, UIScrollView scrollView, float scrollPosition, bool isScrollable)
 {
     if (scrollView != null && source != null)
     {
         string text  = "Sprite" + scrollView.name;
         string text2 = text;
         string text3 = text;
         UIScrollView.Movement movement = scrollView.movement;
         if (movement != UIScrollView.Movement.Horizontal)
         {
             if (movement == UIScrollView.Movement.Vertical)
             {
                 text2 += "ScrollUp";
                 text3 += "ScrollDown";
             }
         }
         else
         {
             text2 += "ScrollLeft";
             text3 += "ScrollRight";
         }
         this.scrollBackSprite    = source.GetOptionalElement <UXSprite>(text2);
         this.scrollForwardSprite = source.GetOptionalElement <UXSprite>(text3);
         this.UpdateScrollSprites(scrollView, scrollPosition, isScrollable);
     }
 }
コード例 #2
0
 private void OnLoadSuccess(object asset, object cookie)
 {
     if (this.onLoadCompleteCallback != null)
     {
         this.onLoadCompleteCallback();
     }
     if (this.component != null)
     {
         this.MainTexture = (Texture2D)asset;
         this.component.gameObject.SetActive(true);
         if (this.spinner != null)
         {
             this.spinner.OnDestroyElement();
             UnityEngine.Object.Destroy(this.spinner.Root);
             this.spinner = null;
         }
     }
     else
     {
         this.UnloadCurrentTexture();
         this.DestroyCurrentTexture();
     }
 }
コード例 #3
0
 public void SetAnimationAndSprite(UXSprite uxSprite)
 {
     this.component.NGUICheckbox.activeAnimation = uxSprite.Root.GetComponent <Animation>();
     this.component.NGUICheckbox.activeSprite    = uxSprite.GetUIWidget;
 }