Esempio n. 1
0
    //void Start() {
    //    Debug.Log("Start");
    //}

    public override void Reload(InfinityScrollView _infinity, int _index)
    {
        //Debug.Log("Reload");
        base.Reload(_infinity, _index);
        mIndex = _index;

        WujiangBean general = mCanvasExecutive.GetCity().GetWujiangBeans()[_index];

        if (mCanvasExecutive.CantainWujiangId(general.id))
        {
            mIsSeclet = true;
            mSelectImage.SetActive(true);
        }
        else
        {
            mIsSeclet = false;
            mSelectImage.SetActive(false);
        }
        mWujiang.text   = general.name;
        mTongshuai.text = general.tongshuai;
        mWuli.text      = general.wuli;
        mZhili.text     = general.zhili;
        mZhengzhi.text  = general.zhengzhi;
        mMeili.text     = general.meili;
    }
Esempio n. 2
0
    public override void Reload(InfinityScrollView _infinity, int _index)
    {
        base.Reload(_infinity, _index);
        //reset
        StopAllCoroutines();

        text.text = "User " + (Index + 1);
        string idStr = Sample3.Instance.GetIDUser(Index);

        if (string.IsNullOrEmpty(idStr))
        {
            avatar.sprite = spriteDefault;
        }
        else
        {
            string path = "http://graph.facebook.com/" + idStr + "/picture?type=square";
            urlAva = path;
            Sprite sprite = ResourceLoaderManager.Instance.GetMemorySprite(path);
            if (sprite != null)
            {
                avatar.sprite = sprite;
            }
            else
            {
                //Load new avatar
                avatar.sprite = spriteDefault;

                StartCoroutine(LoadAvatar(path));
            }
        }
    }
    // Token: 0x0600079C RID: 1948 RVA: 0x0001FF24 File Offset: 0x0001E324
    public override void Reload(InfinityScrollView _infinity, int _index)
    {
        base.Reload(_infinity, _index);
        base.StopAllCoroutines();
        this.text.text = "User " + (base.Index + 1);
        string iduser = SingletonMono <Sample3> .Instance.GetIDUser(base.Index);

        if (string.IsNullOrEmpty(iduser))
        {
            this.avatar.sprite = this.spriteDefault;
        }
        else
        {
            string text = "http://graph.facebook.com/" + iduser + "/picture?type=square";
            this.urlAva = text;
            Sprite memorySprite = Singleton <ResourceLoaderManager> .Instance.GetMemorySprite(text);

            if (memorySprite != null)
            {
                this.avatar.sprite = memorySprite;
            }
            else
            {
                this.avatar.sprite = this.spriteDefault;
                base.StartCoroutine(this.LoadAvatar(text));
            }
        }
    }
 // Token: 0x060007C6 RID: 1990 RVA: 0x00020D74 File Offset: 0x0001F174
 public override void Reload(InfinityScrollView _infinity, int _index)
 {
     base.Reload(_infinity, _index);
     if (this.listSample != null && this.listSample.listString.Count > base.Index)
     {
         this.text.text = this.listSample.listString[base.Index];
     }
 }
Esempio n. 5
0
 //reload is autocall
 public override void Reload(InfinityScrollView _infinity, int _index)
 {
     base.Reload(_infinity, _index);
     if (listSample != null)
     {
         if (listSample.listString.Count > Index)
         {
             text.text = listSample.listString [Index];
         }
     }
 }
Esempio n. 6
0
    // Token: 0x06000788 RID: 1928 RVA: 0x0001FCEC File Offset: 0x0001E0EC
    public override void Reload(InfinityScrollView _infinity, int _index)
    {
        base.Reload(_infinity, _index);
        this.text1.text = (base.Index * 2 + 1).ToString();
        this.text2.text = (base.Index * 2 + 2).ToString();
        int totalItem = SingletonMono <Sample2> .Instance.GetTotalItem();

        if (_index * 2 + 1 < totalItem)
        {
            this.item2.SetActive(true);
        }
        else
        {
            this.item2.SetActive(false);
        }
    }
Esempio n. 7
0
    public override void Reload(InfinityScrollView _infinity, int _index)
    {
        base.Reload(_infinity, _index);
        text1.text = (Index * 2 + 1).ToString();
        text2.text = (Index * 2 + 2).ToString();

        int total = Sample2.Instance.GetTotalItem();

        if (_index * 2 + 1 < total)
        {
            item2.SetActive(true);
        }
        else
        {
            item2.SetActive(false);
        }
    }
Esempio n. 8
0
    // Token: 0x06000A2D RID: 2605 RVA: 0x0002C120 File Offset: 0x0002A520
    public override void Reload(InfinityScrollView _infinity, int _index)
    {
        base.Reload(_infinity, _index);
        this._categoryIndex = _infinity.categoryIndex;
        int          initTotalNumber = _infinity.initTotalNumber;
        DataCategory dataCategory    = DataManager.Instance.dataDirectoryGroup.dataCategoryList[this._categoryIndex];

        this._TID_0 = dataCategory.picList[base.Index * 2];
        this.AddThumb(this._TID_0, 0);
        if (_index * 2 + 1 < initTotalNumber)
        {
            this.item1.SetActive(true);
            this._TID_1 = dataCategory.picList[base.Index * 2 + 1];
            this.AddThumb(this._TID_1, 1);
        }
        else
        {
            this.item1.SetActive(false);
        }
    }
 // Token: 0x0600078E RID: 1934 RVA: 0x0001FDB4 File Offset: 0x0001E1B4
 public override void Reload(InfinityScrollView _infinity, int _index)
 {
     base.Reload(_infinity, _index);
     this.text.text = (base.Index + 1).ToString();
 }
    // Use this for initialization
    public override void OnInspectorGUI()
    {
        EditorGUILayout.BeginVertical();
        infinityScrollView = (InfinityScrollView)target;
        GUILayout.Label("Setting Auto", EditorStyles.boldLabel);
        infinityScrollView.isAutoLinking = EditorGUILayout.Toggle("Auto Setup reference object", infinityScrollView.isAutoLinking);
        Color color = GUI.color;

        GUI.color = Color.blue;
        GUILayout.Box("", new GUILayoutOption[] { GUILayout.ExpandWidth(true), GUILayout.Height(2) });
        GUI.color = color;

        GUILayout.Label("Linking references", EditorStyles.boldLabel);
        infinityScrollView.scrollRect = (ScrollRect)EditorGUILayout.ObjectField("ScrollRect", infinityScrollView.scrollRect, typeof(ScrollRect), true, null);
        infinityScrollView.content    = (RectTransform)EditorGUILayout.ObjectField("Content", infinityScrollView.content, typeof(RectTransform), true, null);
        infinityScrollView.prefab     = (GameObject)EditorGUILayout.ObjectField("Prefab Item", infinityScrollView.prefab, typeof(GameObject), true, null);

        GUI.color = Color.blue;
        GUILayout.Box("", new GUILayoutOption[] { GUILayout.ExpandWidth(true), GUILayout.Height(2) });
        GUI.color = color;

        GUILayout.Label("Setting Type of Infinity scrollview", EditorStyles.boldLabel);
        infinityScrollView.type = (InfinityType)EditorGUILayout.EnumPopup("ScrollView Type", infinityScrollView.type);
        if (infinityScrollView.type == InfinityType.Vertical)
        {
            infinityScrollView.verticalType = (VerticalType)EditorGUILayout.EnumPopup("Direction", infinityScrollView.verticalType);
        }
        else
        {
            infinityScrollView.horizontalType = (HorizontalType)EditorGUILayout.EnumPopup("Direction", infinityScrollView.horizontalType);
        }
        infinityScrollView.isOverrideSettingScrollbar = EditorGUILayout.Toggle("Also Change Direction Scrollbar", infinityScrollView.isOverrideSettingScrollbar);
        GUI.color = Color.blue;
        GUILayout.Box("", new GUILayoutOption[] { GUILayout.ExpandWidth(true), GUILayout.Height(2) });
        GUI.color = color;
        GUILayout.Label("Setting Custom data", EditorStyles.boldLabel);
        if (infinityScrollView.type == InfinityType.Vertical)
        {
            infinityScrollView.itemSize = EditorGUILayout.FloatField("Item Height", infinityScrollView.itemSize);
        }
        else
        {
            infinityScrollView.itemSize = EditorGUILayout.FloatField("Item Width", infinityScrollView.itemSize);
        }



        infinityScrollView.itemGenerate = EditorGUILayout.IntField("Item in Screen", infinityScrollView.itemGenerate);
        if (infinityScrollView.itemGenerate <= 0)
        {
            infinityScrollView.itemGenerate = 0;
        }
        infinityScrollView.totalNumberItem = EditorGUILayout.IntField("Total Items", infinityScrollView.totalNumberItem);
        if (infinityScrollView.totalNumberItem <= 0)
        {
            infinityScrollView.totalNumberItem = 0;
        }
        if (infinityScrollView.totalNumberItem <= 0)
        {
            infinityScrollView.totalNumberItem = 0;
        }
        infinityScrollView.setupOnAwake = EditorGUILayout.Toggle("Setup On Awake", infinityScrollView.setupOnAwake);
        infinityScrollView.locationType = (DetemineLocationType)EditorGUILayout.EnumPopup("Setting Item Location", infinityScrollView.locationType);
        if (infinityScrollView.locationType == DetemineLocationType.OverrideLocation)
        {
            if (infinityScrollView.type == InfinityType.Vertical)
            {
                infinityScrollView.overrideX = EditorGUILayout.FloatField("Init pos X", infinityScrollView.overrideX);
            }
            else
            {
                infinityScrollView.overrideY = EditorGUILayout.FloatField("Init pos Y", infinityScrollView.overrideY);
            }
        }
        infinityScrollView.extraContentLength = EditorGUILayout.FloatField("Extra Content Length", infinityScrollView.extraContentLength);

        GUI.color = Color.blue;
        GUILayout.Box("", new GUILayoutOption[] { GUILayout.ExpandWidth(true), GUILayout.Height(2) });
        GUI.color = color;

        SetSkipIndex();
        EditorGUILayout.EndVertical();
        if (GUI.changed)
        {
            EditorUtility.SetDirty(target);
            FixValue();
        }
        else if (count == 0)
        {
            FixValue();
        }
        count++;
    }
Esempio n. 11
0
 public override void Reload(InfinityScrollView _infinity, int _index)
 {
     // Index is order item in scrollview
     base.Reload(_infinity, _index);
 }
Esempio n. 12
0
 // Token: 0x0600077C RID: 1916 RVA: 0x0001FA9A File Offset: 0x0001DE9A
 public override void Reload(InfinityScrollView _infinity, int _index)
 {
     base.Reload(_infinity, _index);
 }