mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-07-01 14:15:16 +02:00
adjust touchbar layout when both reset and f1 menu are disabled
This commit is contained in:
parent
0ec885e640
commit
97e4314a87
1 changed files with 6 additions and 1 deletions
|
@ -52,12 +52,17 @@ MKXPZTouchBar *_sharedTouchBar;
|
|||
bool showReset = [showResetButton boolValue];
|
||||
bool showSettings = [showSettingsButton boolValue];
|
||||
|
||||
NSMutableArray *items = [NSMutableArray arrayWithArray:@[@"function", NSTouchBarItemIdentifierFlexibleSpace, @"icon", @"fps"]];
|
||||
NSMutableArray *items = [NSMutableArray arrayWithArray:@[@"function", NSTouchBarItemIdentifierFlexibleSpace]];
|
||||
|
||||
if (showReset || showSettings) {
|
||||
[items addObject:@"icon"];
|
||||
[items addObject:@"fps"];
|
||||
[items addObject:NSTouchBarItemIdentifierFlexibleSpace];
|
||||
if (showReset) [items addObject:@"reset"];
|
||||
if (showSettings) [items addObject:@"rebind"];
|
||||
} else {
|
||||
[items addObject:@"fps"];
|
||||
[items addObject:@"icon"];
|
||||
}
|
||||
self.defaultItemIdentifiers = items;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue