Added About dialog, updated README-macOS

This commit is contained in:
Akop Karapetyan 2019-12-07 00:30:29 -08:00 committed by tmaul
parent 4b87fa68c3
commit 8009e60c2e
12 changed files with 237 additions and 8 deletions

View File

@ -1,7 +1,7 @@
# FinalBurn Neo for macOS
## Download
[Version 1.0](https://github.com/fbn-mac/FBNeo/releases/tag/macos-v1.0) is the
[Version 1.02](https://github.com/fbn-mac/FBNeo/releases/tag/macos-v1.02) is the
latest stable release. [View all releases](https://github.com/fbn-mac/FBNeo/releases).
## Compatibility
@ -10,11 +10,15 @@ likely that it may run on earlier versions (perhaps as low as Mountain Lion). If
can build and run successfully on an earlier version of macOS (OS X?), let me know.
## Use
Launch any set by dropping it on the app's icon or in the window. You can also
use `File/Open` and `File/Open Recent`. ROMs can reside anywhere, though if you
load a game that requires files from a parent set or BIOS (e.g. Neo-Geo),
the files are expected to be in the same directory. Supported archives
are `zip` and `7z`.
Drop a set into the Launcher window to import it, double-click to start it.
Supported archive formats are `zip` and `7z`.
You can also use `File/Open` and `File/Open Recent` to load ROMs directly.
Files can reside anywhere, though when loading a game that requires a parent set
or BIOS (e.g. Neo-Geo), the files are expected to be in the same directory.
If a game refuses to start, check the Log Viewer (Window/Log Viewer)
for diagnostic information.
## Input
Currently supported input devices are keyboard (using standard FinalBurn layout)

View File

@ -13,6 +13,8 @@
FE0A7EA12394B87B001E6997 /* FBRomSetStatusAsNSImage.m in Sources */ = {isa = PBXBuildFile; fileRef = FE0A7E9F2394B87B001E6997 /* FBRomSetStatusAsNSImage.m */; };
FE0A7EA42394ED91001E6997 /* FBDropFileScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = FE0A7EA32394ED91001E6997 /* FBDropFileScrollView.m */; };
FE0A7EA7239501FF001E6997 /* FBImporter.m in Sources */ = {isa = PBXBuildFile; fileRef = FE0A7EA5239501FF001E6997 /* FBImporter.m */; };
FE0A7EAA239B8A7E001E6997 /* About.xib in Resources */ = {isa = PBXBuildFile; fileRef = FE0A7EA8239B8A7E001E6997 /* About.xib */; };
FE0A7EAD239B8B4F001E6997 /* FBAboutController.m in Sources */ = {isa = PBXBuildFile; fileRef = FE0A7EAB239B8B4E001E6997 /* FBAboutController.m */; };
FE1B1092235615940065200C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = FE1B1091235615940065200C /* AppDelegate.m */; };
FE1B1094235615950065200C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FE1B1093235615950065200C /* Assets.xcassets */; };
FE1B1097235615950065200C /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = FE1B1095235615950065200C /* MainMenu.xib */; };
@ -1053,6 +1055,9 @@
FE0A7EA32394ED91001E6997 /* FBDropFileScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBDropFileScrollView.m; sourceTree = "<group>"; };
FE0A7EA5239501FF001E6997 /* FBImporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBImporter.m; sourceTree = "<group>"; };
FE0A7EA6239501FF001E6997 /* FBImporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBImporter.h; sourceTree = "<group>"; };
FE0A7EA9239B8A7E001E6997 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/About.xib; sourceTree = "<group>"; };
FE0A7EAB239B8B4E001E6997 /* FBAboutController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBAboutController.m; sourceTree = "<group>"; };
FE0A7EAC239B8B4F001E6997 /* FBAboutController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBAboutController.h; sourceTree = "<group>"; };
FE1B108D235615940065200C /* FinalBurn Neo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "FinalBurn Neo.app"; sourceTree = BUILT_PRODUCTS_DIR; };
FE1B1090235615940065200C /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
FE1B1091235615940065200C /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
@ -4666,6 +4671,8 @@
FE2BC6AF23615BBC00B9D150 /* Controllers */ = {
isa = PBXGroup;
children = (
FE0A7EAC239B8B4F001E6997 /* FBAboutController.h */,
FE0A7EAB239B8B4E001E6997 /* FBAboutController.m */,
FEF4EE7F23635500004E0DCE /* FBEmulatorController.h */,
FEF4EE8023635500004E0DCE /* FBEmulatorController.m */,
FE0A7E9623938CE6001E6997 /* FBLauncherController.h */,
@ -4688,6 +4695,7 @@
FE1B1095235615950065200C /* MainMenu.xib */,
FE2BC6C92362CFC000B9D150 /* Preferences.xib */,
FE0A7E9823938E9F001E6997 /* Launcher.xib */,
FE0A7EA8239B8A7E001E6997 /* About.xib */,
);
name = Nibs;
sourceTree = "<group>";
@ -4849,6 +4857,7 @@
FE0A7E9A23938E9F001E6997 /* Launcher.xib in Resources */,
FE2BC6BB2362B4E200B9D150 /* dsa_pub.pem in Resources */,
FEF4EE892363720B004E0DCE /* Defaults.plist in Resources */,
FE0A7EAA239B8A7E001E6997 /* About.xib in Resources */,
FE2BC6CB2362CFC100B9D150 /* Preferences.xib in Resources */,
FE1B241023561A750065200C /* license.txt in Resources */,
FEF4EE8423635521004E0DCE /* Emulator.xib in Resources */,
@ -5584,6 +5593,7 @@
FE1B26DB23561A780065200C /* d_beaminv.cpp in Sources */,
FE1B259F23561A760065200C /* timeplt_snd.cpp in Sources */,
FE1B26F723561A780065200C /* d_hvyunit.cpp in Sources */,
FE0A7EAD239B8B4F001E6997 /* FBAboutController.m in Sources */,
FE1B276023561A780065200C /* d_bombjack.cpp in Sources */,
FE1B263F23561A770065200C /* cps_scr.cpp in Sources */,
FE1B25DD23561A760065200C /* d_nemesis.cpp in Sources */,
@ -5984,6 +5994,14 @@
name = Launcher.xib;
sourceTree = "<group>";
};
FE0A7EA8239B8A7E001E6997 /* About.xib */ = {
isa = PBXVariantGroup;
children = (
FE0A7EA9239B8A7E001E6997 /* Base */,
);
name = About.xib;
sourceTree = "<group>";
};
FE1B1095235615950065200C /* MainMenu.xib */ = {
isa = PBXVariantGroup;
children = (

View File

@ -36,5 +36,6 @@
- (IBAction) displayLogViewer:(id) sender;
- (IBAction) displayPreferences:(id) sender;
- (IBAction) displayLauncher:(id) sender;
- (IBAction) displayAbout:(id) sender;
@end

View File

@ -14,6 +14,7 @@
#import "FBLogViewerController.h"
#import "FBPreferencesController.h"
#import "FBLauncherController.h"
#import "FBAboutController.h"
@interface AppDelegate ()
@ -29,6 +30,7 @@ static AppDelegate *sharedInstance = nil;
FBPreferencesController *prefs;
FBEmulatorController *emulator;
FBLauncherController *launcher;
FBAboutController *about;
IOPMAssertionID sleepAssertId;
}
@ -143,6 +145,13 @@ static AppDelegate *sharedInstance = nil;
[launcher showWindow:self];
}
- (void) displayAbout:(id) sender
{
if (!about)
about = [FBAboutController new];
[about showWindow:self];
}
#pragma mark - Public
- (void) loadPath:(NSString *) path

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "LargeAppIcon_256.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LargeAppIcon_512.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="15505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15505"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="FBAboutController">
<connections>
<outlet property="appNameField" destination="Jjg-9S-eKH" id="fni-tk-CJx"/>
<outlet property="versionNumberField" destination="7d6-UW-2Ea" id="sXO-Fs-dlx"/>
<outlet property="window" destination="bTo-iM-Ec6" id="ALq-zF-hNp"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<window title="About" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" animationBehavior="default" id="bTo-iM-Ec6">
<windowStyleMask key="styleMask" titled="YES" closable="YES"/>
<rect key="contentRect" x="966" y="610" width="562" height="357"/>
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/>
<view key="contentView" wantsLayer="YES" id="6iv-BA-5dG">
<rect key="frame" x="0.0" y="0.0" width="562" height="357"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="CEO-5c-W2b" customClass="FBWhitePanelView">
<rect key="frame" x="0.0" y="61" width="562" height="296"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bG4-40-Cpd">
<rect key="frame" x="20" y="20" width="256" height="256"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="AppIconLarge" id="ylD-tH-SYP"/>
</imageView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Jjg-9S-eKH">
<rect key="frame" x="284" y="231" width="260" height="45"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Doomsday Gap" id="ger-cR-GYg">
<font key="font" metaFont="system" size="32"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="7d6-UW-2Ea">
<rect key="frame" x="284" y="216" width="260" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Our source was the New York Times" id="ORu-f3-vn2">
<font key="font" metaFont="smallSystemBold"/>
<color key="textColor" name="controlShadowColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" preferredMaxLayoutWidth="256" translatesAutoresizingMaskIntoConstraints="NO" id="quT-zG-Yo1">
<rect key="frame" x="284" y="20" width="260" height="188"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" id="mqu-HR-p0a">
<font key="font" metaFont="system"/>
<string key="title">Ⓒ 2019 Akop Karapetyan© 2004-2019 Team FB Neo© 2001 DaveYou may freely use, modify, and distribute both the FB Neo source code and binary, however restrictions apply to the FB Neo original material.See License below for more information.
</string>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
<string key="userLabel">Ⓒ 2014-2019 Akop Karapetyan © 2004-2018 Team FB Alpha © 2001 Dave For FBA license information, see "FinalBurn Alpha License" below. For license information on FinalBurn X and its components, see "FinalBurn X License" below.</string>
</textFieldCell>
</textField>
</subviews>
</customView>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Srz-bG-wC9">
<rect key="frame" x="420" y="13" width="128" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="License" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Yaj-O6-wbH">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="openLicense:" target="-2" id="zRN-K4-Qm6"/>
</connections>
</button>
</subviews>
</view>
<point key="canvasLocation" x="173" y="205.5"/>
</window>
</objects>
<resources>
<image name="AppIconLarge" width="256" height="256"/>
</resources>
</document>

View File

@ -24,7 +24,7 @@
<menuItem title="About FinalBurn Neo" id="5kV-Vb-QxS">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="orderFrontStandardAboutPanel:" target="-1" id="Exp-CZ-Vem"/>
<action selector="displayAbout:" target="-1" id="HKs-yK-tDc"/>
</connections>
</menuItem>
<menuItem title="Check for Updates..." id="PWa-fO-f5X">

View File

@ -0,0 +1,23 @@
//
// FBAboutController.h
// Emulator
//
// Created by Akop Karapetyan on 12/06/19.
// Copyright © 2019 Akop Karapetyan. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface FBWhitePanelView : NSView
@end
@interface FBAboutController : NSWindowController
{
IBOutlet NSTextField *versionNumberField;
IBOutlet NSTextField *appNameField;
}
- (IBAction) openLicense:(id) sender;
@end

View File

@ -0,0 +1,65 @@
//
// FBAboutController.m
// Emulator
//
// Created by Akop Karapetyan on 12/06/19.
// Copyright © 2019 Akop Karapetyan. All rights reserved.
//
#import "FBAboutController.h"
#pragma mark - FBWhitePanelView
@implementation FBWhitePanelView
- (void) drawRect:(NSRect) dirtyRect
{
[NSColor.whiteColor setFill];
NSRectFill(dirtyRect);
}
@end
#pragma mark - FBAboutController
@interface FBAboutController ()
@end
@implementation FBAboutController
- (id) init
{
if (self = [super initWithWindowNibName:@"About"]) {
}
return self;
}
- (void) awakeFromNib
{
NSDictionary *infoDict = NSBundle.mainBundle.infoDictionary;
NSMutableAttributedString *appName = appNameField.attributedStringValue.mutableCopy;
[appName beginEditing];
[appName replaceCharactersInRange:NSMakeRange(0, appName.length)
withString:infoDict[@"CFBundleName"]];
[appName applyFontTraits:NSBoldFontMask
range:NSMakeRange(appName.length - 3, 3)];
[appName endEditing];
appNameField.attributedStringValue = appName;
versionNumberField.stringValue = [NSString stringWithFormat:NSLocalizedString(@"Version %@", nil),
infoDict[@"CFBundleShortVersionString"]];
}
#pragma mark - Actions
- (void) openLicense:(id) sender
{
NSString *documentPath = [NSBundle.mainBundle pathForResource:@"license"
ofType:@"txt"];
[NSWorkspace.sharedWorkspace openURL:[NSURL fileURLWithPath:documentPath]];
}
@end

View File

@ -252,7 +252,8 @@
[romSetTreeController rearrangeObjects];
// Restore selection
romSetTreeController.selectionIndexPaths = selection;
if (selection)
romSetTreeController.selectionIndexPaths = selection;
}
- (NSString *) setCachePath