Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased]

### Added
- Replace isIPad device checks with size classes and trait collections (#24)
- Replace deprecated UITableViewCellAccessoryDetailDisclosureButton in SSWorldCell (#19)
- Replace hardcoded 320pt popover widths with adaptive sizing (#18)
- UI modernization for iPad and Mac Catalyst (#17)
- Scale SSRadialControl size adaptively for iPad and Mac (#21)
- Keep sent command in input field with select-all for easy resend (#28)
- Add GMCP support to telnet stack (#104)
- Implement Client.Media.Play/Stop audio playback via GMCP (#107)
Expand All @@ -28,6 +33,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fix libtelnet missing HAVE_ZLIB define causing MCCP2 gibberish (#56)

### Changed
- Audit UISwitch tint color across all themes (#26)
- Verify swiftlint passes (#27)
- Add visionOS app icon to asset catalog for App Store submission (#29)
- Restore historical update notes in updates.txt (#3)
- Add mudrammer and rammer back to keywords (#2)
- Update App Store text for MUDWammer rebrand (#1)
Expand Down
2 changes: 1 addition & 1 deletion Vendored/QuickDialog/Sources/QLabelElement.m
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ - (UITableViewCell *)getCellForTableView:(QuickDialogTableView *)tableView contr
cell.textLabel.text = _title;
cell.detailTextLabel.text = [_value description];
cell.imageView.image = _image;
cell.accessoryType = _accessoryType != UITableViewCellAccessoryNone ? _accessoryType : self.controllerAccessoryAction != nil ? UITableViewCellAccessoryDetailDisclosureButton : ( self.sections!= nil || self.controllerAction!=nil ? UITableViewCellAccessoryDisclosureIndicator : UITableViewCellAccessoryNone);
cell.accessoryType = _accessoryType != UITableViewCellAccessoryNone ? _accessoryType : self.controllerAccessoryAction != nil ? UITableViewCellAccessoryDetailButton : ( self.sections!= nil || self.controllerAction!=nil ? UITableViewCellAccessoryDisclosureIndicator : UITableViewCellAccessoryNone);
cell.selectionStyle = self.sections!= nil || self.controllerAction!=nil || self.onSelected!=nil ? UITableViewCellSelectionStyleBlue: UITableViewCellSelectionStyleNone;
return cell;
}
Expand Down
2 changes: 1 addition & 1 deletion Vendored/QuickDialog/Sources/QRootBuilder.m
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ - (void)initializeMappings {
nil], @"indicatorViewStyle",

[[NSDictionary alloc] initWithObjectsAndKeys:
[NSNumber numberWithInt:UITableViewCellAccessoryDetailDisclosureButton], @"DetailDisclosureButton",
[NSNumber numberWithInt:UITableViewCellAccessoryDetailButton], @"DetailDisclosureButton",
[NSNumber numberWithInt:UITableViewCellAccessoryCheckmark], @"Checkmark",
[NSNumber numberWithInt:UITableViewCellAccessoryDisclosureIndicator], @"DisclosureIndicator",
[NSNumber numberWithInt:UITableViewCellAccessoryNone], @"None",
Expand Down
2 changes: 1 addition & 1 deletion src/Mudrammer/Controllers/Client/SPLMSSPViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ - (void)configureCell {
[self.contentView addSubview:self.label];
[self.label mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.and.right.and.bottom.equalTo(self.contentView);
make.left.equalTo(self.contentView).offset([[UIDevice currentDevice] isIPad] ? 20 : 16);
make.left.equalTo(self.contentView).offset(16);
}];
}

Expand Down
8 changes: 4 additions & 4 deletions src/Mudrammer/Controllers/Client/SSClientViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ - (SSClientViewController *) init {
_readParsingQueue = [NSOperationQueue ss_serialOperationQueueNamed:@"Read Queue"];
_writeQueue = [NSOperationQueue ss_serialOperationQueueNamed:@"Write Queue"];

_titleView = [[SPLMUDTitleView alloc] initWithFrame:CGRectMake(0, 0, ([[UIDevice currentDevice] isIPad] ? 320 : 200), 44)];
_titleView = [[SPLMUDTitleView alloc] initWithFrame:CGRectMake(0, 0, (self.traitCollection.horizontalSizeClass == UIUserInterfaceSizeClassRegular ? 320 : 200), 44)];
[self updateTitle:NSLocalizedString(@"DISCONNECTED", @"Disconnected")];

@weakify(self);
Expand Down Expand Up @@ -485,7 +485,7 @@ - (void)tappedSettings:(id)sender {
UINavigationController *settingsNav = [settings wrappedNavigationController];
settingsNav.delegate = self;

if ([[UIDevice currentDevice] isIPad]) {
if (self.traitCollection.horizontalSizeClass == UIUserInterfaceSizeClassRegular) {
settingsNav.modalPresentationStyle = UIModalPresentationPopover;
settingsNav.preferredContentSize = CGSizeMake([UIDevice preferredPopoverWidth], 600);
UIPopoverPresentationController *popover = settingsNav.popoverPresentationController;
Expand Down Expand Up @@ -533,7 +533,7 @@ - (void)editCurrentWorld:(id)sender {
nav.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentViewController:nav animated:YES completion:nil];
#else
if( [[UIDevice currentDevice] isIPad] ) {
if( self.traitCollection.horizontalSizeClass == UIUserInterfaceSizeClassRegular ) {
nav.modalPresentationStyle = UIModalPresentationPopover;
UIPopoverPresentationController *popover = nav.popoverPresentationController;
popover.barButtonItem = self.editWorldButton;
Expand Down Expand Up @@ -585,7 +585,7 @@ - (void)tappedMusic:(id)sender {
picker.currentWorldIdentifier = currentWorldIdentifier;
UINavigationController *nav = [picker wrappedNavigationController];

if ([[UIDevice currentDevice] isIPad]) {
if (self.traitCollection.horizontalSizeClass == UIUserInterfaceSizeClassRegular) {
nav.modalPresentationStyle = UIModalPresentationPopover;
nav.preferredContentSize = CGSizeMake([UIDevice preferredPopoverWidth], 400);
UIPopoverPresentationController *popover = nav.popoverPresentationController;
Expand Down
4 changes: 2 additions & 2 deletions src/Mudrammer/Controllers/Client/SSWorldDisplayController.m
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath

WorldPickerSelectionBlock pickblock = ^(NSString *pickedWorldIdentifier) {
@strongify(self);
if ([[UIDevice currentDevice] isIPad]) {
if (self.traitCollection.horizontalSizeClass == UIUserInterfaceSizeClassRegular) {
[self.popoverPresenter dismissViewControllerAnimated:YES completion:nil];
[self addClientWithWorld:pickedWorldIdentifier];
} else {
Expand All @@ -275,7 +275,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
UINavigationController *nav = [picker wrappedNavigationController];
//nav.delegate = self;

if( [[UIDevice currentDevice] isIPad] ) {
if( self.traitCollection.horizontalSizeClass == UIUserInterfaceSizeClassRegular ) {
nav.modalPresentationStyle = UIModalPresentationPopover;
nav.preferredContentSize = [picker preferredContentSize];
UIPopoverPresentationController *popover = nav.popoverPresentationController;
Expand Down
2 changes: 1 addition & 1 deletion src/Mudrammer/Controllers/Settings/SPLFXWorldEditor.m
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ - (void)viewDidLoad {

[SSThemes configureTable:self.tableView];

if (![[UIDevice currentDevice] isIPad]) {
if (self.traitCollection.horizontalSizeClass != UIUserInterfaceSizeClassRegular) {
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel
target:self
action:@selector(cancelEditing:)];
Expand Down
12 changes: 6 additions & 6 deletions src/Mudrammer/Controllers/Settings/SSSettingsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ - (SSSettingsViewController *) init {

[SSThemes configureTable:self.tableView];

if( ![[UIDevice currentDevice] isIPad] ) {
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone
target:self
action:@selector(closeSettings:)];
}

_kvoController = [FBKVOController controllerWithObserver:self];

for( NSString *key in OBS ) {
Expand Down Expand Up @@ -85,6 +79,12 @@ - (void)dealloc {
- (void)viewDidLoad {
[super viewDidLoad];

if (self.traitCollection.horizontalSizeClass != UIUserInterfaceSizeClassRegular) {
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone
target:self
action:@selector(closeSettings:)];
}

@weakify(self);

_dataSource = [[SSSectionedDataSource alloc] initWithItems:nil];
Expand Down
2 changes: 1 addition & 1 deletion src/Mudrammer/Controllers/Settings/SSTGAEditor.m
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ - (void)commonSetup {
- (void)viewDidLoad {
[super viewDidLoad];

if(![[UIDevice currentDevice] isIPad] || self.navigationController.SPLNavigationIsAtRoot) {
if(self.traitCollection.horizontalSizeClass != UIUserInterfaceSizeClassRegular || self.navigationController.SPLNavigationIsAtRoot) {
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel
target:self
action:@selector(cancelEditing:)];
Expand Down
16 changes: 10 additions & 6 deletions src/Mudrammer/Controllers/Settings/SSWorldEditViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ - (SSWorldEditViewController *) initWithWorldIdentifier:(NSString *)identifier {
target:self
action:@selector(saveWorld:)];

if( ![[UIDevice currentDevice] isIPad] ) {
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel
target:self
action:@selector(cancelEditing:)];
}

self.navigationItem.rightBarButtonItem = saveButton;
}

Expand All @@ -58,6 +52,16 @@ + (instancetype)editorForWorldIdentifier:(NSString *)worldIdentifier {
return [[SSWorldEditViewController alloc] initWithWorldIdentifier:worldIdentifier];
}

- (void)viewDidLoad {
[super viewDidLoad];

if (self.traitCollection.horizontalSizeClass != UIUserInterfaceSizeClassRegular) {
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel
target:self
action:@selector(cancelEditing:)];
}
}

- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];

Expand Down
6 changes: 2 additions & 4 deletions src/Mudrammer/SSThemes.m
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,7 @@ - (void)applyAppThemes {
navAppearance.backgroundColor = [self valueForThemeKey:kThemeBackgroundColor];
navAppearance.titleTextAttributes = @{
NSForegroundColorAttributeName : [self valueForThemeKey:kThemeFontColor],
NSFontAttributeName : [UIFont boldSystemFontOfSize:([[UIDevice currentDevice] isIPad]
? 18.0f
: 16.0f)]
NSFontAttributeName : [UIFont boldSystemFontOfSize:17.0f]
};
[[UINavigationBar appearance] setStandardAppearance:navAppearance];
[[UINavigationBar appearance] setCompactAppearance:navAppearance];
Expand Down Expand Up @@ -497,7 +495,7 @@ + (void)configureTable:(UITableView *)tableView {
if (tableView.style == UITableViewStylePlain) {
tableView.backgroundColor = bgColor;

if (![[UIDevice currentDevice] isIPad]) {
if (tableView.traitCollection.horizontalSizeClass != UIUserInterfaceSizeClassRegular) {
[tableView addCenteredFooterWithImage:([[self sharedThemer] isUsingDarkTheme]
? [SPLImagesCatalog tildeWhiteImage]
: [SPLImagesCatalog tildeDarkImage])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
fontNameLabel.font = [UIFont fontWithName:fontFamilyName size:18.0];

if ([[UIFont fontNamesForFamilyName:fontFamilyName] count] > 1) {
cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
cell.accessoryType = UITableViewCellAccessoryDetailButton;
}
else {
cell.accessoryType = UITableViewCellAccessoryNone;
Expand Down
2 changes: 1 addition & 1 deletion src/Mudrammer/Views/Cells/SSThemeCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ - (void)configureCell {
action:@selector(fontSizeChanged:)
forControlEvents:UIControlEventValueChanged];

CGFloat sizerWidth = [UIDevice currentDevice].isIPad ? 150 : 120;
CGFloat sizerWidth = self.traitCollection.horizontalSizeClass == UIUserInterfaceSizeClassRegular ? 150 : 120;
[sizer setFrame:CGRectMake(0, 0, sizerWidth, 60)];

self.accessoryView = sizer;
Expand Down
2 changes: 1 addition & 1 deletion src/Mudrammer/Views/SSMudView.m
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ - (BOOL)canBecomeFirstResponder {
#pragma mark - UIScrollViewDelegate

- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
if (![[UIDevice currentDevice] isIPad]) {
if (self.traitCollection.horizontalSizeClass != UIUserInterfaceSizeClassRegular) {
[self endEditing:YES];
}

Expand Down
Loading