Skip to content
This repository has been archived by the owner on Jul 6, 2021. It is now read-only.

CSDReader refactor #55

Open
psineur opened this issue Jun 22, 2011 · 1 comment
Open

CSDReader refactor #55

psineur opened this issue Jun 22, 2011 · 1 comment

Comments

@psineur
Copy link
Collaborator

psineur commented Jun 22, 2011

CSDSprite & CSDBackground should be renamed to CSDElementSprite & CSDElementBackground

CSDElementXXX - is something that holds info about creating nodes from info taken from CSD file.

New: CSDNode - CCNode subclass, that adds snapping and resizing features.
Should have resize and updateForScreenReshape methods.

CSDReader#setupXXX methods will remain designated methods, but if given CCNode is CSDNode - than additional info about snap position, max /min size for children can be used. That info will be stored in CSDElement's, but will be saved only in CSDNode, or others like it nodes (CSDSprite, CSDLabel).

Probably CSDElementXXX#smartNode can be used for creating CSDXXX nodes, and CSDElementXXX#node can be used for creating normal cocos nodes (CCSprite, CCLayerColor, etc)

Also after addition of CSDNode - it will be easy to close #10 (Include other Cocoshop projects)
Element for CSDNode: CSDElementCSDNode (bad name?) it should include CSDReader.

Or refactor CSDReader to CSDElements... - Probably that will be the best
[ CSDElements elementsWithFile: @"foo.csd" ]; //< looks nice

@psineur
Copy link
Collaborator Author

psineur commented Jun 22, 2011

Another feature for CSDNode:

  • (CCNode *) getChildByName: (NSString *) aName;
  • removeChildByName, etc...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant