Git Product home page Git Product logo

cocos2d-extensions's Introduction

README

Cocos2D-Extensions
Sangwoo Im

Classes:
SWScrollView: UIScrollView counterpart for cocos2d environment
SWTableView: UITableView counterpart for cocos2d environment
SWTableViewCell: Table view cell. override this to present your own cell contents.
SWTableViewSpriteCell: An example to show how to override SWTableViewCell
SWMultiColumnTableView: Multi-column table view
CCNode+Autolayout: Support for layout mechanism which gets triggered automatically.
Cocos2DViewController: Self-contained Cocos2D environment which supports all device orientations. Use the UIViewController way to limit orientation changes.
SWSorting: Sorting extensions to both NSArray and CCArray

cocos2d-extensions's People

Contributors

saim80 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cocos2d-extensions's Issues

ScrollView clip region miscaluated

This is due to the recent version of Cocos2D uses different anchorpoint value for CCLayer. Caculate the clip region independant from anchorpoint.

SWTableView doesn't display correctly on Retina devices

I've got a vertical table with single column topdown list, which looks great on normal devices. (See serban's fork for actual table view test that works. )

However, on a Retina device the table's cells and clipping are all wrong.

Pretty unusable in this state.

Cannot create horizontal table view

I want to create horizontal table view. It works fine when I set it to Vertical, but once I change direction all the elements in the table look like moved to the right side and I cannot scroll them.

This is how I initiate the table view:

CGSize winSize = CGSizeMake(400, 65);
    tableView = [SWTableView viewWithDataSource:self size:winSize];
    tableView.direction = SWScrollViewDirectionHorizontal;
    tableView.position = ccp(40, 200);
    tableView.delegate = self;
    tableView.bounces = YES;
    [self addChild:tableView];

and like I've said. If I change direction to Vertical it works just fine!
Unfortunately there are no tests in the sample project for table view so I cannot check it.

Reload data does not regroup elements

When I remove an element from the datasource of the table view & reload the table I will get empty space instead of the element.
What I expect after removal of an element and running reloadData is a regroup of all of the elements.

SWTableView clips incorrect

SWTableView clips incorrect:
SWTableView *scroller = [SWTableView viewWithDataSource:self size:CGSizeMake(1024, 600)];
scroller.direction = SWScrollViewDirectionVertical;
scroller.verticalFillOrder = SWTableViewFillTopDown;
scroller.delegate = self;
scroller.position = ccp(0, 0); // left bottom corner
[self addChild:scroller];

Only right part of table visible, if i set size to (1024,1024) the table displayed whole.

Cocos version 1.0.1

Improve Documentation

Hello ..

I was trying to use SWScrollView in my project, but could not use it properly.
I could not understand, anything from the sample project also.

I possible, please try and improve the documentation of this libraries. Make them in details so that it will be easy to understand and implement them.

Table view scrolled to the bottom after creation

I have a vertical tablew view with quite a few elements and I use top down approach.
When my table view is created I can see the bottom part of the table rather than the top.
How can I fix this?

boundingBox property has wrong values when adding to node other than CCLayer

Here's what I did - when doing same thing as in sample project, it works as expected.
In samples table view node is added as subview to CCLayer.

But everything goes amiss, when adding table view as a child to another CCNode.
My layout is as follows:
3 CCNode subviews are children of CCLayer

  • CCLayer
    • CCNode 1, rect=(0, 320, 320, 180)
    • CCNode 2, rect=(0, 160, 320, 180)
    • CCNode 3, rect=(0, 0, 320, 180)

Then I try to add SWTableView to CCNode 2
It is added, but it's bounding box size is wrong, while origin is still correct.
boundingBox size=(0.000000, 0.000000)
boundingBox origin=(0.000000, 160.000000)

I run this test in iPhone Simulator (both Retina and non-Retina have this error)
Cocos2D version is 1.0.1
Source downloaded from github 25 Jan 2012

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.