Giter VIP home page Giter VIP logo

loopscorllviewforngui's Introduction

LoopScorllViewForNGUI

Easy endless loop scroll view for Unity3d.

-----Developed under unity3d version 5.x-----

Introduction:

Endless loop scroll view for NGUI.

Features:

  1. easy to add base endless , loop scrollview in your project for showing up big data(particularly the rank list)
  2. dynamic add new data to the endless scroll view.
  3. dynamic delete data in list without resetting the scroll view(delete all the item recreate them all.)
  4. ......Some script for NGUI's scrollview extension......

Develop status

  1. base endless and loop feature,both vertical and horizon(done)
  2. dynamic add new data(done)
  3. dynamic delete(done)
  4. dynamic calculate min loop item cout(done)

Start to Use (Example)

  1. Very easy to use.Just deal with the data list (add, delete , update) and Call one method**[RefreshLoopScrollView()]** everything will be done.
  2. Find [DebugSystem] to enable or disable the log

Show items

Fill the data list and call RefreshLoopScrollView();


        scrollViewManager = this.GetComponent< LoopScrollViewManager >();
        scrollViewManager.itemDatas.Clear();
        for (int i = 0; i < dataCount; i++)
        {
            RankItemData data = new RankItemData();
            data.rank = i + 1;
            scrollViewManager.itemDatas.Add(data);
        }
        scrollViewManager.RefreshLoopScrollView();

Add new item

add new item data to list and call RefreshLoopScrollView();


        for (int i = 0; i < perAddItemCount; i++)
        {
            RankItemData data = new RankItemData();
            data.rank = (addCount++) * 100;
            scrollViewManager.itemDatas.Add(data);
        }
        scrollViewManager.RefreshLoopScrollView();

Remove item

remove item data from data list call RefreshLoopScrollView();


        if (this.scrollViewManager.itemDatas.Count == 0)
        {
            Debuger.LogWarning("@ item count is zero.");
            return;
        }
        int index = Random.Range(0, scrollViewManager.itemDatas.Count);
        this.scrollViewManager.itemDatas.RemoveAt(index);
        this.scrollViewManager.RefreshLoopScrollView();

ScreenShot

ScreenShot

loopscorllviewforngui's People

Contributors

frideal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.