Adds HP to monster card.
This commit is contained in:
@@ -16,6 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (weak, nonatomic) IBOutlet UILabel *monsterName;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *monsterMeta;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *monsterArmorClass;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *monsterHitPoints;
|
||||
|
||||
@property Monster* monster;
|
||||
|
||||
|
||||
@@ -52,6 +52,14 @@
|
||||
self.monsterArmorClass.attributedText = [HTMLHelper attributedStringFromHTML:[NSString stringWithFormat:@"<span style=\"font-family: helvetica; font-size: 12pt; color: #9B2818;\"><b>Armor Class</b> %@</span>", armorClassDescription]];
|
||||
}
|
||||
}
|
||||
if (self.monsterHitPoints != nil) {
|
||||
NSString *hitPointsDescription = self.monster.hitPointsDescription;
|
||||
if (hitPointsDescription == nil) {
|
||||
self.monsterHitPoints.text = @"";
|
||||
} else {
|
||||
self.monsterHitPoints.attributedText = [HTMLHelper attributedStringFromHTML:[NSString stringWithFormat:@"<span style=\"font-family: helvetica; font-size: 12pt; color: #9B2818;\"><b>Hit Points</b> %@</span>", hitPointsDescription]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)unwindWithSegue:(UIStoryboardSegue *)unwindSegue {
|
||||
|
||||
Reference in New Issue
Block a user