X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=Classes%2FNJInputButton.m;h=caa759b6844888358eda0a95c718fe58f0073d13;hp=caa4d8e55c54ba1824ecd957228defab821f5c3d;hb=79b05c3cf1c75bc4f7078acde43aaf4215c6408a;hpb=235c087385a6e959ba7edefe4a3cbbbc00b2a534 diff --git a/Classes/NJInputButton.m b/Classes/NJInputButton.m index caa4d8e..caa759b 100644 --- a/Classes/NJInputButton.m +++ b/Classes/NJInputButton.m @@ -12,12 +12,12 @@ } - (id)initWithName:(NSString *)name idx:(int)idx max:(long)max { - if ((self = [super init])) { + NSString *fullname = [NSString stringWithFormat:NSLocalizedString(@"button %d", @"button name"), idx]; + if (name.length) + fullname = [fullname stringByAppendingFormat:@"- %@", name]; + NSString *did = [[NSString alloc] initWithFormat:@"Button %d", idx]; + if ((self = [super initWithName:fullname did:did base:nil])) { _max = max; - self.name = [NSString stringWithFormat:NSLocalizedString(@"button %d", @"button name"), idx]; - - if (name.length) - self.name = [self.name stringByAppendingFormat:@"- %@", name]; } return self; }