home *** CD-ROM | disk | FTP | other *** search
- #import "GameInfoInspector.h"
- #import <appkit/appkit.h>
- #import "GameInfo.h"
-
- @implementation GameInfoInspector
-
- - init
- {
- char buf[MAXPATHLEN + 1];
- id bundle;
-
- [super init];
- bundle = [NXBundle bundleForClass:[GameInfo class]];
- [bundle getPath:buf forResource:"GameInfoInspector" ofType:"nib"];
- [NXApp loadNibFile:buf owner:self withNames:NO fromZone:[self zone]];
- return self;
- }
-
- - (BOOL)wantsButtons { return YES; }
-
- - revert:sender
- {
- // Put string in text object
- [numSoundsText setIntValue:[object numSounds]];
- [numTypesText setIntValue:[object numSoundTypes]];
- [numStreamsText setIntValue:[object numSoundStreams]];
- [maxHighScoresText setIntValue:[object maxHighScores]];
- [numTablesText setIntValue:[object numHighScoreTables]];
- [numOneUpsText setIntValue:[object numOneUps]];
- [slotTypeText setStringValue:[[object slotType] stringValue]];
- [passwordText setStringValue:[[object encryptedPassword] stringValue]];
- return [super revert:sender];
- }
-
- - ok:sender
- {
- [object setnumSoundTypes: [numTypesText intValue]];
- [object setnumSoundStreams: [numStreamsText intValue]];
- [object setnumSounds: [numSoundsText intValue]];
- [object setnumHighScoreTables: [numTablesText intValue]];
- [object setMaxHighScores: [maxHighScoresText intValue]];
- [object setNumOneUps: [numOneUpsText intValue]];
- [object setSlotType: [slotTypeText stringValue]];
- [object setEncryptedPassword: [passwordText stringValue]];
- return [super ok:sender];
- }
-
- @end
-