saim80 / cocos2d-extensions Goto Github PK
View Code? Open in Web Editor NEWA set of classes to extend Cocos2D Library functionalities
A set of classes to extend Cocos2D Library functionalities
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
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
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.
The scrollable region is incorrect when zooming.
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.
In Mullti Column Table View, if you have let's say 4 columns and only 13 cells, tapping on the space after the last cell will be registered as tapping on the last cell.
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?
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.
This is due to the recent version of Cocos2D uses different anchorpoint value for CCLayer. Caculate the clip region independant from anchorpoint.
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
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
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.
Cells in Horizontal Table View are aligned to the right instead of to the left.
Left side seems like the 'natural' choice.
Is there any way to change that?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.