Permalink
Browse files

taglist hinzugefuegt

  • Loading branch information...
1 parent f71d6cc commit 0615a85c8d59c5fdda036745661ab60015517640 Michael Markowski committed Feb 15, 2010
View
@@ -70,5 +70,7 @@ enum {
- (IBAction)removeSelectedLevels:(id)sender;
- (NSArray *)sortDescriptors;
- (NSDictionary*)texturesForAtlasNamed:(NSString*)name;
+- (IBAction)addNewSpriteSheet:(id)sender;
+- (IBAction)removeSelectedSpriteSheets:(id)sender;
@end
View
@@ -297,6 +297,28 @@ - (IBAction)removeSelectedLayers:(id)sender
[helper renumberViewPositions];
}
+- (IBAction)addNewSpriteSheet:(id)sender {
+ TextureAtlas *newTextureAtlas = [NSEntityDescription insertNewObjectForEntityForName:@"TextureAtlas"
+ inManagedObjectContext:[self managedObjectContext]];
+ newTextureAtlas.name = @"New SpriteSheet";
+ newTextureAtlas.game = game;
+// NSMutableSet *gameSpriteSheets = [self.game valueForKey:@"textureAtlases"];
+// [gameSpriteSheets addObject:newTextureAtlas];
+// [self.game setValue:gameSpriteSheets forKey:@"textureAtlases"];
+}
+
+- (IBAction)removeSelectedSpriteSheets:(id)sender
+{
+ NSArray *selectedTextureAtlases = [textureAtlasArrayController selectedObjects];
+ int count;
+ for( count = 0; count < [selectedTextureAtlases count]; count ++ )
+ {
+ NSManagedObject *currentObject = [selectedTextureAtlases objectAtIndex:count];
+ [[self managedObjectContext] deleteObject:currentObject];
+ }
+}
+
+
- (NSArray *)sortDescriptors {
if( _sortDescriptors == nil ) {
_sortDescriptors = [NSArray arrayWithObject:[[NSSortDescriptor alloc] initWithKey:@"viewPosition" ascending:YES]];
Oops, something went wrong.
View
@@ -22,5 +22,6 @@
@property (nonatomic, retain) NSSet* levels;
@property (nonatomic, retain) NSSet* textureAtlases;
@property (nonatomic, retain) NSNumber * showBoundsInEditor;
+@property (nonatomic, retain) NSSet * highscores;
@end
View
@@ -15,6 +15,6 @@ @implementation Game
@implementation Game (CoreDataGeneratedAccessors)
-@dynamic showGridInEditor, levels, textureAtlases, showBoundsInEditor;
+@dynamic showGridInEditor, levels, textureAtlases, showBoundsInEditor, highscores;
@end
@@ -3,6 +3,6 @@
<plist version="1.0">
<dict>
<key>_XCCurrentVersionName</key>
- <string>Game0.2.xcdatamodel</string>
+ <string>Game0.5.xcdatamodel</string>
</dict>
</plist>
Binary file not shown.
Binary file not shown.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 0615a85

Please sign in to comment.