Refactors PauseViewController in preparation for pushing new view controllers
# PauseViewController has been renamed to PauseMenuViewController. # A new PauseViewController maintains a child UINavigationController, which has PauseMenuViewController as the root view controller.
This commit is contained in:
parent
08e46b9678
commit
b8b46f00a6
@ -22,6 +22,15 @@
|
||||
BF2A53FC1BB74FC10052BD0C /* SNESDeltaCore.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = BFC134E01AAD82460087AD7B /* SNESDeltaCore.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
BF2A53FD1BB74FC60052BD0C /* ZipZap.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF70798B1B6B464B0019077C /* ZipZap.framework */; };
|
||||
BF2A53FE1BB74FC60052BD0C /* ZipZap.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = BF70798B1B6B464B0019077C /* ZipZap.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
BF353FF21C5D7FB000C1184C /* PauseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF353FF11C5D7FB000C1184C /* PauseViewController.swift */; };
|
||||
BF353FF31C5D7FB000C1184C /* PauseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF353FF11C5D7FB000C1184C /* PauseViewController.swift */; };
|
||||
BF353FF61C5D837600C1184C /* PauseMenu.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BF353FF41C5D837600C1184C /* PauseMenu.storyboard */; };
|
||||
BF353FF71C5D837600C1184C /* PauseMenu.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BF353FF41C5D837600C1184C /* PauseMenu.storyboard */; };
|
||||
BF353FF91C5D870B00C1184C /* PauseItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF353FF81C5D870B00C1184C /* PauseItem.swift */; };
|
||||
BF353FFA1C5D870B00C1184C /* PauseItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF353FF81C5D870B00C1184C /* PauseItem.swift */; };
|
||||
BF353FFF1C5DA3C500C1184C /* PausePresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF353FFD1C5DA3C500C1184C /* PausePresentationController.swift */; };
|
||||
BF3540001C5DA3C500C1184C /* PausePresentationControllerContentView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BF353FFE1C5DA3C500C1184C /* PausePresentationControllerContentView.xib */; };
|
||||
BF3540021C5DA3D500C1184C /* PauseStoryboardSegue.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF3540011C5DA3D500C1184C /* PauseStoryboardSegue.swift */; };
|
||||
BF4566E81BC090B6007BFA1A /* Model.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = BF4566E61BC090B6007BFA1A /* Model.xcdatamodeld */; };
|
||||
BF4566E91BC090B6007BFA1A /* Model.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = BF4566E61BC090B6007BFA1A /* Model.xcdatamodeld */; };
|
||||
BF5E7F441B9A650B00AE44F8 /* SettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF5E7F431B9A650B00AE44F8 /* SettingsViewController.swift */; };
|
||||
@ -37,10 +46,7 @@
|
||||
BF762EAB1BC1B076002C8866 /* NSManagedObject+Conveniences.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF762EAA1BC1B076002C8866 /* NSManagedObject+Conveniences.swift */; };
|
||||
BF762EAC1BC1B076002C8866 /* NSManagedObject+Conveniences.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF762EAA1BC1B076002C8866 /* NSManagedObject+Conveniences.swift */; };
|
||||
BF797A2D1C2D339F00F1A000 /* UILabel+FontSize.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF797A2C1C2D339F00F1A000 /* UILabel+FontSize.swift */; };
|
||||
BF7AE8051C2E858400B1B5BC /* PausePresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF7AE8011C2E858400B1B5BC /* PausePresentationController.swift */; };
|
||||
BF7AE8061C2E858400B1B5BC /* PausePresentationControllerContentView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BF7AE8021C2E858400B1B5BC /* PausePresentationControllerContentView.xib */; };
|
||||
BF7AE8071C2E858400B1B5BC /* PauseStoryboardSegue.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF7AE8031C2E858400B1B5BC /* PauseStoryboardSegue.swift */; };
|
||||
BF7AE8081C2E858400B1B5BC /* PauseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF7AE8041C2E858400B1B5BC /* PauseViewController.swift */; };
|
||||
BF7AE8081C2E858400B1B5BC /* PauseMenuViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF7AE8041C2E858400B1B5BC /* PauseMenuViewController.swift */; };
|
||||
BF7AE80A1C2E8C7600B1B5BC /* UIColor+Delta.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF7AE8091C2E8C7600B1B5BC /* UIColor+Delta.swift */; };
|
||||
BF7AE81E1C2E984300B1B5BC /* GridCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF7AE81A1C2E984300B1B5BC /* GridCollectionViewCell.swift */; };
|
||||
BF7AE81F1C2E984300B1B5BC /* GridCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF7AE81A1C2E984300B1B5BC /* GridCollectionViewCell.swift */; };
|
||||
@ -122,6 +128,12 @@
|
||||
BF27CC901BCB156200A20D89 /* EmulationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EmulationViewController.swift; sourceTree = "<group>"; };
|
||||
BF27CC941BCB7B7A00A20D89 /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS9.0.sdk/System/Library/Frameworks/GameController.framework; sourceTree = DEVELOPER_DIR; };
|
||||
BF27CC961BCC890700A20D89 /* GamesCollectionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GamesCollectionViewController.swift; sourceTree = "<group>"; };
|
||||
BF353FF11C5D7FB000C1184C /* PauseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PauseViewController.swift; path = "Pause Menu/PauseViewController.swift"; sourceTree = "<group>"; };
|
||||
BF353FF51C5D837600C1184C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/PauseMenu.storyboard; sourceTree = "<group>"; };
|
||||
BF353FF81C5D870B00C1184C /* PauseItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PauseItem.swift; path = "Pause Menu/PauseItem.swift"; sourceTree = "<group>"; };
|
||||
BF353FFD1C5DA3C500C1184C /* PausePresentationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PausePresentationController.swift; path = "Pause Menu/Presentation Controller/PausePresentationController.swift"; sourceTree = "<group>"; };
|
||||
BF353FFE1C5DA3C500C1184C /* PausePresentationControllerContentView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = PausePresentationControllerContentView.xib; path = "Pause Menu/Presentation Controller/PausePresentationControllerContentView.xib"; sourceTree = "<group>"; };
|
||||
BF3540011C5DA3D500C1184C /* PauseStoryboardSegue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PauseStoryboardSegue.swift; path = "Pause Menu/Segues/PauseStoryboardSegue.swift"; sourceTree = "<group>"; };
|
||||
BF4566E71BC090B6007BFA1A /* Model.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Model.xcdatamodel; sourceTree = "<group>"; };
|
||||
BF5E7F431B9A650B00AE44F8 /* SettingsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsViewController.swift; sourceTree = "<group>"; };
|
||||
BF5E7F451B9A652600AE44F8 /* Settings.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Settings.storyboard; sourceTree = "<group>"; };
|
||||
@ -135,10 +147,7 @@
|
||||
BF762E9D1BC19D31002C8866 /* DatabaseManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatabaseManager.swift; sourceTree = "<group>"; };
|
||||
BF762EAA1BC1B076002C8866 /* NSManagedObject+Conveniences.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSManagedObject+Conveniences.swift"; sourceTree = "<group>"; };
|
||||
BF797A2C1C2D339F00F1A000 /* UILabel+FontSize.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UILabel+FontSize.swift"; sourceTree = "<group>"; };
|
||||
BF7AE8011C2E858400B1B5BC /* PausePresentationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PausePresentationController.swift; path = "Pause Menu/PausePresentationController.swift"; sourceTree = "<group>"; };
|
||||
BF7AE8021C2E858400B1B5BC /* PausePresentationControllerContentView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = PausePresentationControllerContentView.xib; path = "Pause Menu/PausePresentationControllerContentView.xib"; sourceTree = "<group>"; };
|
||||
BF7AE8031C2E858400B1B5BC /* PauseStoryboardSegue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PauseStoryboardSegue.swift; path = "Pause Menu/PauseStoryboardSegue.swift"; sourceTree = "<group>"; };
|
||||
BF7AE8041C2E858400B1B5BC /* PauseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PauseViewController.swift; path = "Pause Menu/PauseViewController.swift"; sourceTree = "<group>"; };
|
||||
BF7AE8041C2E858400B1B5BC /* PauseMenuViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PauseMenuViewController.swift; path = "Pause Menu/PauseMenuViewController.swift"; sourceTree = "<group>"; };
|
||||
BF7AE8091C2E8C7600B1B5BC /* UIColor+Delta.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+Delta.swift"; sourceTree = "<group>"; };
|
||||
BF7AE81A1C2E984300B1B5BC /* GridCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = GridCollectionViewCell.swift; path = "Collection View/GridCollectionViewCell.swift"; sourceTree = "<group>"; };
|
||||
BF7AE81D1C2E984300B1B5BC /* GridCollectionViewLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = GridCollectionViewLayout.swift; path = "Collection View/GridCollectionViewLayout.swift"; sourceTree = "<group>"; };
|
||||
@ -212,6 +221,15 @@
|
||||
path = Extensions;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BF353FFB1C5DA2F600C1184C /* Presentation Controller */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BF353FFD1C5DA3C500C1184C /* PausePresentationController.swift */,
|
||||
BF353FFE1C5DA3C500C1184C /* PausePresentationControllerContentView.xib */,
|
||||
);
|
||||
name = "Presentation Controller";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BF4566E31BC09026007BFA1A /* Common */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -277,10 +295,12 @@
|
||||
BF7AE7FA1C2E851F00B1B5BC /* Pause Menu */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BF7AE8041C2E858400B1B5BC /* PauseViewController.swift */,
|
||||
BF7AE8031C2E858400B1B5BC /* PauseStoryboardSegue.swift */,
|
||||
BF7AE8011C2E858400B1B5BC /* PausePresentationController.swift */,
|
||||
BF7AE8021C2E858400B1B5BC /* PausePresentationControllerContentView.xib */,
|
||||
BF353FF41C5D837600C1184C /* PauseMenu.storyboard */,
|
||||
BF353FF11C5D7FB000C1184C /* PauseViewController.swift */,
|
||||
BF7AE8041C2E858400B1B5BC /* PauseMenuViewController.swift */,
|
||||
BF353FF81C5D870B00C1184C /* PauseItem.swift */,
|
||||
BF353FFB1C5DA2F600C1184C /* Presentation Controller */,
|
||||
BF912E481C5CB5D50041527C /* Segues */,
|
||||
);
|
||||
name = "Pause Menu";
|
||||
sourceTree = "<group>";
|
||||
@ -293,6 +313,14 @@
|
||||
path = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BF912E481C5CB5D50041527C /* Segues */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BF3540011C5DA3D500C1184C /* PauseStoryboardSegue.swift */,
|
||||
);
|
||||
name = Segues;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BF9257571BD8244800B109DA /* Collection View */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -509,6 +537,7 @@
|
||||
files = (
|
||||
BF6BB2461BB73FE800CCF94A /* Assets.xcassets in Resources */,
|
||||
BF6BB2441BB73FE800CCF94A /* Main.storyboard in Resources */,
|
||||
BF353FF71C5D837600C1184C /* PauseMenu.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -517,9 +546,10 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
BFFA71E21AAC406100EE9DD1 /* Main.storyboard in Resources */,
|
||||
BF7AE8061C2E858400B1B5BC /* PausePresentationControllerContentView.xib in Resources */,
|
||||
BF3540001C5DA3C500C1184C /* PausePresentationControllerContentView.xib in Resources */,
|
||||
BFFA71E71AAC406100EE9DD1 /* LaunchScreen.xib in Resources */,
|
||||
BF5E7F461B9A652600AE44F8 /* Settings.storyboard in Resources */,
|
||||
BF353FF61C5D837600C1184C /* PauseMenu.storyboard in Resources */,
|
||||
BF27CC8E1BC9FEA200A20D89 /* Assets.xcassets in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@ -636,6 +666,8 @@
|
||||
BF27CC911BCB156200A20D89 /* EmulationViewController.swift in Sources */,
|
||||
BFB141191BE46934004FBF46 /* GameCollectionViewDataSource.swift in Sources */,
|
||||
BFF1E5651BE04CAF000E9EF6 /* BoxArtImageView.swift in Sources */,
|
||||
BF353FFA1C5D870B00C1184C /* PauseItem.swift in Sources */,
|
||||
BF353FF31C5D7FB000C1184C /* PauseViewController.swift in Sources */,
|
||||
BF6BB23F1BB73FE800CCF94A /* AppDelegate.swift in Sources */,
|
||||
BF4566E91BC090B6007BFA1A /* Model.xcdatamodeld in Sources */,
|
||||
BF762EAC1BC1B076002C8866 /* NSManagedObject+Conveniences.swift in Sources */,
|
||||
@ -651,7 +683,7 @@
|
||||
BFB141181BE46934004FBF46 /* GameCollectionViewDataSource.swift in Sources */,
|
||||
BFFB709F1AF99B1700DE56FE /* EmulationViewController.swift in Sources */,
|
||||
BFAA1FF41B8AD7F900495943 /* ControllersSettingsViewController.swift in Sources */,
|
||||
BF7AE8071C2E858400B1B5BC /* PauseStoryboardSegue.swift in Sources */,
|
||||
BF353FF91C5D870B00C1184C /* PauseItem.swift in Sources */,
|
||||
BF27CC971BCC890700A20D89 /* GamesCollectionViewController.swift in Sources */,
|
||||
BFFA71DD1AAC406100EE9DD1 /* AppDelegate.swift in Sources */,
|
||||
BF7AE81E1C2E984300B1B5BC /* GridCollectionViewCell.swift in Sources */,
|
||||
@ -661,22 +693,32 @@
|
||||
BFC2731A1BE6152200D22B05 /* GameCollection.swift in Sources */,
|
||||
BFF1E5641BE04CAF000E9EF6 /* BoxArtImageView.swift in Sources */,
|
||||
BF762EAB1BC1B076002C8866 /* NSManagedObject+Conveniences.swift in Sources */,
|
||||
BF353FFF1C5DA3C500C1184C /* PausePresentationController.swift in Sources */,
|
||||
BF7AE80A1C2E8C7600B1B5BC /* UIColor+Delta.swift in Sources */,
|
||||
BF762E9E1BC19D31002C8866 /* DatabaseManager.swift in Sources */,
|
||||
BF090CF41B490D8300DCAB45 /* UIDevice+Vibration.m in Sources */,
|
||||
BF797A2D1C2D339F00F1A000 /* UILabel+FontSize.swift in Sources */,
|
||||
BF3540021C5DA3D500C1184C /* PauseStoryboardSegue.swift in Sources */,
|
||||
BF107EC41BF413F000E0C32C /* GamesViewController.swift in Sources */,
|
||||
BF5E7F441B9A650B00AE44F8 /* SettingsViewController.swift in Sources */,
|
||||
BF353FF21C5D7FB000C1184C /* PauseViewController.swift in Sources */,
|
||||
BFDB28451BC9DA7B001D0C83 /* GamePickerController.swift in Sources */,
|
||||
BF7AE8051C2E858400B1B5BC /* PausePresentationController.swift in Sources */,
|
||||
BFDE393A1BC0CEDF003F72E8 /* Game+CoreDataProperties.swift in Sources */,
|
||||
BF7AE8081C2E858400B1B5BC /* PauseViewController.swift in Sources */,
|
||||
BF7AE8081C2E858400B1B5BC /* PauseMenuViewController.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
BF353FF41C5D837600C1184C /* PauseMenu.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
BF353FF51C5D837600C1184C /* Base */,
|
||||
);
|
||||
name = PauseMenu.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BF6BB2421BB73FE800CCF94A /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="wKV-3d-NIY">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="wKV-3d-NIY">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
<capability name="Segues with Peek and Pop" minToolsVersion="7.1"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
@ -152,123 +151,13 @@
|
||||
<outlet property="controllerView" destination="2W1-IT-Y2l" id="WCa-LM-fXF"/>
|
||||
<outlet property="controllerViewHeightConstraint" destination="PEV-zv-Buo" id="1jo-Kg-HpO"/>
|
||||
<outlet property="gameView" destination="GfI-Mx-CQT" id="HmP-OA-mci"/>
|
||||
<segue destination="YH4-Dy-8Mz" kind="presentation" identifier="pauseSegue" customClass="PauseStoryboardSegue" customModule="Delta" customModuleProvider="target" id="9cz-mr-lTk"/>
|
||||
<segue destination="Yrw-9v-Pcr" kind="presentation" identifier="pauseSegue" customClass="PauseStoryboardSegue" customModule="Delta" customModuleProvider="target" id="9cz-mr-lTk"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="ZYd-It-2t0" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="2361" y="1002"/>
|
||||
</scene>
|
||||
<!--Paused-->
|
||||
<scene sceneID="upW-21-c6e">
|
||||
<objects>
|
||||
<viewController id="fjf-Kd-NY2" customClass="PauseViewController" customModule="Delta" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="T5g-dU-mk3"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="2VR-he-PMF"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="NYe-l8-jSy">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<visualEffectView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BTf-mZ-pVi" userLabel="Primary Blur View">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="ahz-4E-cKV" userLabel="Content View">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
</view>
|
||||
<blurEffect style="dark"/>
|
||||
</visualEffectView>
|
||||
<visualEffectView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="t3G-Xl-Py3" userLabel="Secondary Blur View">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="L1l-tg-4su" userLabel="Content View">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
</view>
|
||||
<blurEffect style="dark"/>
|
||||
</visualEffectView>
|
||||
<visualEffectView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Upx-pN-cZS" userLabel="Vibrancy View">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="uto-dW-PGz" userLabel="Content View">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" bounces="NO" scrollEnabled="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="Jf9-Zr-SU1">
|
||||
<rect key="frame" x="0.0" y="64" width="600" height="536"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="20" minimumInteritemSpacing="10" id="0ze-Nw-POW" customClass="GridCollectionViewLayout" customModule="Delta" customModuleProvider="target">
|
||||
<size key="itemSize" width="60" height="80"/>
|
||||
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||
<inset key="sectionInset" minX="0.0" minY="20" maxX="0.0" maxY="20"/>
|
||||
</collectionViewFlowLayout>
|
||||
<cells>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="Cell" id="CkY-Fc-ejC" customClass="GridCollectionViewCell" customModule="Delta" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="20" width="60" height="80"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="60" height="80"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</collectionViewCell>
|
||||
</cells>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="fjf-Kd-NY2" id="NRE-Ov-Wbg"/>
|
||||
<outlet property="delegate" destination="fjf-Kd-NY2" id="QvV-VK-NvJ"/>
|
||||
</connections>
|
||||
</collectionView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="Jf9-Zr-SU1" secondAttribute="trailing" id="7h7-Xl-xbW"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Jf9-Zr-SU1" secondAttribute="bottom" id="IgH-PB-Yzm"/>
|
||||
<constraint firstItem="Jf9-Zr-SU1" firstAttribute="leading" secondItem="uto-dW-PGz" secondAttribute="leading" id="i9D-1X-Yhj"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<vibrancyEffect>
|
||||
<blurEffect style="dark"/>
|
||||
</vibrancyEffect>
|
||||
</visualEffectView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="2VR-he-PMF" firstAttribute="top" secondItem="Upx-pN-cZS" secondAttribute="bottom" id="8W2-gK-LrU"/>
|
||||
<constraint firstAttribute="trailing" secondItem="t3G-Xl-Py3" secondAttribute="trailing" id="BQm-tm-M9Y"/>
|
||||
<constraint firstAttribute="trailing" secondItem="BTf-mZ-pVi" secondAttribute="trailing" id="JsO-WV-IPw"/>
|
||||
<constraint firstItem="2VR-he-PMF" firstAttribute="top" secondItem="t3G-Xl-Py3" secondAttribute="bottom" id="Km2-jS-OMy"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Upx-pN-cZS" secondAttribute="trailing" id="PH2-3f-qvK"/>
|
||||
<constraint firstItem="t3G-Xl-Py3" firstAttribute="top" secondItem="NYe-l8-jSy" secondAttribute="top" id="Pkn-IN-rIR"/>
|
||||
<constraint firstItem="2VR-he-PMF" firstAttribute="top" secondItem="BTf-mZ-pVi" secondAttribute="bottom" id="Se6-cn-A1N"/>
|
||||
<constraint firstItem="BTf-mZ-pVi" firstAttribute="top" secondItem="NYe-l8-jSy" secondAttribute="topMargin" id="XDR-Tz-YCv"/>
|
||||
<constraint firstItem="Upx-pN-cZS" firstAttribute="top" secondItem="NYe-l8-jSy" secondAttribute="top" id="cJx-jw-3g2"/>
|
||||
<constraint firstItem="t3G-Xl-Py3" firstAttribute="leading" secondItem="NYe-l8-jSy" secondAttribute="leading" id="ep2-LW-5zZ"/>
|
||||
<constraint firstItem="Upx-pN-cZS" firstAttribute="leading" secondItem="NYe-l8-jSy" secondAttribute="leading" id="gSn-qK-jOM"/>
|
||||
<constraint firstItem="BTf-mZ-pVi" firstAttribute="leading" secondItem="NYe-l8-jSy" secondAttribute="leading" id="nNM-74-jgo"/>
|
||||
<constraint firstItem="Jf9-Zr-SU1" firstAttribute="top" secondItem="T5g-dU-mk3" secondAttribute="bottom" id="xj3-As-as0"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<navigationItem key="navigationItem" title="Paused" id="hbg-6F-GRq">
|
||||
<barButtonItem key="leftBarButtonItem" title="Main Menu" style="done" id="zv1-Ig-77x">
|
||||
<color key="tintColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<connections>
|
||||
<segue destination="mTB-5a-Mdf" kind="unwind" unwindAction="unwindFromEmulationViewController:" id="8H0-x9-1QN"/>
|
||||
</connections>
|
||||
</barButtonItem>
|
||||
<barButtonItem key="rightBarButtonItem" title="Resume" style="done" id="ye0-Nk-K1X">
|
||||
<connections>
|
||||
<segue destination="mTB-5a-Mdf" kind="unwind" identifier="unwindPauseSegue" unwindAction="unwindFromPauseViewController:" id="OIW-2I-L70"/>
|
||||
</connections>
|
||||
</barButtonItem>
|
||||
</navigationItem>
|
||||
<connections>
|
||||
<outlet property="collectionView" destination="Jf9-Zr-SU1" id="TIj-CV-wIi"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="LbR-MM-KOb" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
<exit id="mTB-5a-Mdf" userLabel="Exit" sceneMemberID="exit"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="3024" y="1717"/>
|
||||
</scene>
|
||||
<!--Page View Controller-->
|
||||
<scene sceneID="35q-Io-64T">
|
||||
<objects>
|
||||
@ -308,23 +197,13 @@
|
||||
</objects>
|
||||
<point key="canvasLocation" x="400" y="1002"/>
|
||||
</scene>
|
||||
<!--Navigation Controller-->
|
||||
<scene sceneID="Xcw-k0-Icf">
|
||||
<!--PauseMenu-->
|
||||
<scene sceneID="97k-By-dJD">
|
||||
<objects>
|
||||
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="YH4-Dy-8Mz" sceneMemberID="viewController">
|
||||
<toolbarItems/>
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" barStyle="black" id="wGs-6t-cPo">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</navigationBar>
|
||||
<nil name="viewControllers"/>
|
||||
<connections>
|
||||
<segue destination="fjf-Kd-NY2" kind="relationship" relationship="rootViewController" id="Oi6-bM-ZSf"/>
|
||||
</connections>
|
||||
</navigationController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="GG6-6X-waQ" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
<viewControllerPlaceholder storyboardName="PauseMenu" id="Yrw-9v-Pcr" sceneMemberID="viewController"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="BDU-Ql-OgK" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="2361" y="1717"/>
|
||||
<point key="canvasLocation" x="2361" y="1440"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
|
||||
143
Delta/Base.lproj/PauseMenu.storyboard
Normal file
143
Delta/Base.lproj/PauseMenu.storyboard
Normal file
@ -0,0 +1,143 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="Dt0-nV-isV">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Pause View Controller-->
|
||||
<scene sceneID="Wst-Dv-TjM">
|
||||
<objects>
|
||||
<viewController id="Dt0-nV-isV" customClass="PauseViewController" customModule="Delta" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="nE7-eK-lGa"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="gF0-0U-kR7"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="oOH-ea-jcb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<visualEffectView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="p2M-dE-BJs" userLabel="Blur View">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="eyD-0d-RHe" userLabel="Blur Content View">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<visualEffectView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Rcd-Nl-fKP" userLabel="Vibrancy View">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="3hz-aG-NZy" userLabel="Vibrancy Content View">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<containerView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rqN-NB-jbb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<connections>
|
||||
<segue destination="sWv-Ky-VGs" kind="embed" identifier="embedNavigationController" id="1Ja-XW-uoT"/>
|
||||
</connections>
|
||||
</containerView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="rqN-NB-jbb" firstAttribute="leading" secondItem="3hz-aG-NZy" secondAttribute="leading" id="OOk-do-LIf"/>
|
||||
<constraint firstAttribute="trailing" secondItem="rqN-NB-jbb" secondAttribute="trailing" id="hcS-M2-FYQ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="rqN-NB-jbb" secondAttribute="bottom" id="iMd-TA-TXf"/>
|
||||
<constraint firstItem="rqN-NB-jbb" firstAttribute="top" secondItem="3hz-aG-NZy" secondAttribute="top" id="yOz-Ra-ndK"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<vibrancyEffect>
|
||||
<blurEffect style="dark"/>
|
||||
</vibrancyEffect>
|
||||
</visualEffectView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="Rcd-Nl-fKP" secondAttribute="bottom" id="054-eA-dPp"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Rcd-Nl-fKP" secondAttribute="trailing" id="RCo-1V-Ryf"/>
|
||||
<constraint firstItem="Rcd-Nl-fKP" firstAttribute="leading" secondItem="eyD-0d-RHe" secondAttribute="leading" id="WHs-Ir-0EG"/>
|
||||
<constraint firstItem="Rcd-Nl-fKP" firstAttribute="top" secondItem="eyD-0d-RHe" secondAttribute="top" id="zXg-uo-6GK"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<blurEffect style="dark"/>
|
||||
</visualEffectView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="p2M-dE-BJs" firstAttribute="top" secondItem="oOH-ea-jcb" secondAttribute="top" id="8tp-qg-fgz"/>
|
||||
<constraint firstAttribute="trailing" secondItem="p2M-dE-BJs" secondAttribute="trailing" id="Idx-Ok-WhM"/>
|
||||
<constraint firstItem="p2M-dE-BJs" firstAttribute="leading" secondItem="oOH-ea-jcb" secondAttribute="leading" id="Ppi-05-jHX"/>
|
||||
<constraint firstItem="gF0-0U-kR7" firstAttribute="top" secondItem="p2M-dE-BJs" secondAttribute="bottom" id="eFj-ha-zJQ"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<segue destination="kQK-P0-mVu" kind="unwind" identifier="unwindFromPauseMenu" unwindAction="unwindFromPauseViewController:" id="2DE-Nv-qaq"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="PWj-WH-rlB" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
<exit id="kQK-P0-mVu" userLabel="Exit" sceneMemberID="exit"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="1026" y="657"/>
|
||||
</scene>
|
||||
<!--Navigation Controller-->
|
||||
<scene sceneID="Kva-gK-ERA">
|
||||
<objects>
|
||||
<navigationController id="sWv-Ky-VGs" sceneMemberID="viewController">
|
||||
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" barStyle="black" prompted="NO"/>
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" barStyle="black" id="Snh-Z0-9kC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</navigationBar>
|
||||
<connections>
|
||||
<segue destination="0jA-NY-mvB" kind="relationship" relationship="rootViewController" id="Mhb-Fd-RdX"/>
|
||||
</connections>
|
||||
</navigationController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="AEb-v1-7Bw" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="1702" y="657"/>
|
||||
</scene>
|
||||
<!--Paused-->
|
||||
<scene sceneID="1md-hu-g0J">
|
||||
<objects>
|
||||
<collectionViewController id="0jA-NY-mvB" customClass="PauseMenuViewController" customModule="Delta" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<collectionView key="view" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" delaysContentTouches="NO" dataMode="prototypes" id="scc-uc-vaJ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="20" minimumInteritemSpacing="10" id="yXv-zl-idO" customClass="GridCollectionViewLayout" customModule="Delta" customModuleProvider="target">
|
||||
<size key="itemSize" width="60" height="80"/>
|
||||
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||
<inset key="sectionInset" minX="0.0" minY="20" maxX="0.0" maxY="20"/>
|
||||
</collectionViewFlowLayout>
|
||||
<cells>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="Cell" id="6XS-Ne-nGZ" customClass="GridCollectionViewCell" customModule="Delta" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="64" width="60" height="80"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="60" height="80"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</collectionViewCell>
|
||||
</cells>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="0jA-NY-mvB" id="iBd-yc-mFj"/>
|
||||
<outlet property="delegate" destination="0jA-NY-mvB" id="Zhk-cY-zpe"/>
|
||||
</connections>
|
||||
</collectionView>
|
||||
<navigationItem key="navigationItem" title="Paused" id="rY7-Wx-NaD">
|
||||
<barButtonItem key="leftBarButtonItem" title="Main Menu" style="done" id="2yt-vB-uMF">
|
||||
<color key="tintColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<connections>
|
||||
<segue destination="WU3-gG-BA5" kind="unwind" unwindAction="unwindFromEmulationViewController:" id="SdW-CX-n27"/>
|
||||
</connections>
|
||||
</barButtonItem>
|
||||
<barButtonItem key="rightBarButtonItem" title="Resume" style="done" id="Wfq-I3-437">
|
||||
<connections>
|
||||
<segue destination="WU3-gG-BA5" kind="unwind" unwindAction="unwindFromPauseViewController:" id="RHb-pF-trg"/>
|
||||
</connections>
|
||||
</barButtonItem>
|
||||
</navigationItem>
|
||||
</collectionViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="5Fb-9R-sRk" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
<exit id="WU3-gG-BA5" userLabel="Exit" sceneMemberID="exit"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="2385" y="657"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
@ -140,27 +140,25 @@ class EmulationViewController: UIViewController
|
||||
|
||||
if segue.identifier == "pauseSegue"
|
||||
{
|
||||
if let destinationViewController = segue.destinationViewController as? UINavigationController, pauseViewController = destinationViewController.topViewController as? PauseViewController
|
||||
{
|
||||
pauseViewController.pauseText = self.game.name
|
||||
let pauseViewController = segue.destinationViewController as! PauseViewController
|
||||
pauseViewController.pauseText = self.game.name
|
||||
|
||||
let dismissAction: (PauseItem -> Void) = { item in
|
||||
pauseViewController.dismiss()
|
||||
}
|
||||
|
||||
let saveStateItem = PauseItem(image: UIImage(named: "SmallPause")!, text: NSLocalizedString("Save State", comment: ""), action: dismissAction)
|
||||
let loadStateItem = PauseItem(image: UIImage(named: "SmallPause")!, text: NSLocalizedString("Load State", comment: ""), action: dismissAction)
|
||||
let cheatCodesItem = PauseItem(image: UIImage(named: "SmallPause")!, text: NSLocalizedString("Cheat Codes", comment: ""), action: dismissAction)
|
||||
let sustainButtonItem = PauseItem(image: UIImage(named: "SmallPause")!, text: NSLocalizedString("Sustain Button", comment: ""), action: dismissAction)
|
||||
|
||||
var fastForwardItem = PauseItem(image: UIImage(named: "FastForward")!, text: NSLocalizedString("Fast Forward", comment: ""), action: { [weak self] item in
|
||||
self?.emulatorCore.fastForwarding = item.selected
|
||||
})
|
||||
fastForwardItem.selected = self.emulatorCore.fastForwarding
|
||||
|
||||
pauseViewController.items = [saveStateItem, loadStateItem, cheatCodesItem, fastForwardItem, sustainButtonItem]
|
||||
let dismissAction: (PauseItem -> Void) = { item in
|
||||
pauseViewController.dismiss()
|
||||
}
|
||||
|
||||
let saveStateItem = PauseItem(image: UIImage(named: "SmallPause")!, text: NSLocalizedString("Save State", comment: ""), action: dismissAction)
|
||||
let loadStateItem = PauseItem(image: UIImage(named: "SmallPause")!, text: NSLocalizedString("Load State", comment: ""), action: dismissAction)
|
||||
let cheatCodesItem = PauseItem(image: UIImage(named: "SmallPause")!, text: NSLocalizedString("Cheat Codes", comment: ""), action: dismissAction)
|
||||
let sustainButtonItem = PauseItem(image: UIImage(named: "SmallPause")!, text: NSLocalizedString("Sustain Button", comment: ""), action: dismissAction)
|
||||
|
||||
var fastForwardItem = PauseItem(image: UIImage(named: "FastForward")!, text: NSLocalizedString("Fast Forward", comment: ""), action: { [weak self] item in
|
||||
self?.emulatorCore.fastForwarding = item.selected
|
||||
})
|
||||
fastForwardItem.selected = self.emulatorCore.fastForwarding
|
||||
|
||||
pauseViewController.items = [saveStateItem, loadStateItem, cheatCodesItem, fastForwardItem, sustainButtonItem]
|
||||
|
||||
self._isPauseViewControllerPresented = true
|
||||
}
|
||||
}
|
||||
|
||||
30
Delta/Pause Menu/PauseItem.swift
Normal file
30
Delta/Pause Menu/PauseItem.swift
Normal file
@ -0,0 +1,30 @@
|
||||
//
|
||||
// PauseItem.swift
|
||||
// Delta
|
||||
//
|
||||
// Created by Riley Testut on 1/30/16.
|
||||
// Copyright © 2016 Riley Testut. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
struct PauseItem: Equatable
|
||||
{
|
||||
let image: UIImage
|
||||
let text: String
|
||||
let action: (PauseItem -> Void)
|
||||
|
||||
var selected = false
|
||||
|
||||
init(image: UIImage, text: String, action: (PauseItem -> Void))
|
||||
{
|
||||
self.image = image
|
||||
self.text = text
|
||||
self.action = action
|
||||
}
|
||||
}
|
||||
|
||||
func ==(lhs: PauseItem, rhs: PauseItem) -> Bool
|
||||
{
|
||||
return (lhs.image == rhs.image) && (lhs.text == rhs.text)
|
||||
}
|
||||
134
Delta/Pause Menu/PauseMenuViewController.swift
Normal file
134
Delta/Pause Menu/PauseMenuViewController.swift
Normal file
@ -0,0 +1,134 @@
|
||||
//
|
||||
// PauseMenuViewController.swift
|
||||
// Delta
|
||||
//
|
||||
// Created by Riley Testut on 12/21/15.
|
||||
// Copyright © 2015 Riley Testut. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import Roxas
|
||||
|
||||
class PauseMenuViewController: UICollectionViewController
|
||||
{
|
||||
var items = [PauseItem]() {
|
||||
didSet
|
||||
{
|
||||
guard oldValue != self.items else { return }
|
||||
|
||||
if self.items.count > 8
|
||||
{
|
||||
fatalError("PauseViewController only supports up to 8 items (for my sanity when laying out on a landscape iPhone 4s")
|
||||
}
|
||||
|
||||
self.collectionView?.reloadData()
|
||||
}
|
||||
}
|
||||
|
||||
override var preferredContentSize: CGSize {
|
||||
set { }
|
||||
get { return self.collectionView?.contentSize ?? CGSizeZero }
|
||||
}
|
||||
|
||||
private var prototypeCell = GridCollectionViewCell()
|
||||
|
||||
override func viewDidLoad()
|
||||
{
|
||||
super.viewDidLoad()
|
||||
|
||||
let collectionViewLayout = self.collectionViewLayout as! GridCollectionViewLayout
|
||||
collectionViewLayout.itemWidth = 90
|
||||
collectionViewLayout.usesEqualHorizontalSpacingDistributionForSingleRow = true
|
||||
|
||||
// Manually update prototype cell properties
|
||||
self.prototypeCell.contentView.widthAnchor.constraintEqualToConstant(collectionViewLayout.itemWidth).active = true
|
||||
}
|
||||
}
|
||||
|
||||
private extension PauseMenuViewController
|
||||
{
|
||||
func configureCollectionViewCell(cell: GridCollectionViewCell, forIndexPath indexPath: NSIndexPath)
|
||||
{
|
||||
let pauseItem = self.items[indexPath.item]
|
||||
|
||||
cell.maximumImageSize = CGSize(width: 60, height: 60)
|
||||
|
||||
cell.imageView.image = pauseItem.image
|
||||
cell.imageView.contentMode = .Center
|
||||
cell.imageView.layer.borderWidth = 2
|
||||
cell.imageView.layer.borderColor = UIColor.whiteColor().CGColor
|
||||
cell.imageView.layer.cornerRadius = 10
|
||||
|
||||
cell.textLabel.text = pauseItem.text
|
||||
cell.textLabel.textColor = UIColor.whiteColor()
|
||||
|
||||
if pauseItem.selected
|
||||
{
|
||||
cell.imageView.tintColor = UIColor.blackColor()
|
||||
cell.imageView.backgroundColor = UIColor.whiteColor()
|
||||
}
|
||||
else
|
||||
{
|
||||
cell.imageView.tintColor = UIColor.whiteColor()
|
||||
cell.imageView.backgroundColor = UIColor.clearColor()
|
||||
}
|
||||
}
|
||||
|
||||
func toggleSelectedStateForPauseItemAtIndexPath(indexPath: NSIndexPath)
|
||||
{
|
||||
var pauseItem = self.items[indexPath.item]
|
||||
pauseItem.selected = !pauseItem.selected
|
||||
self.items[indexPath.item] = pauseItem
|
||||
|
||||
let cell = self.collectionView!.cellForItemAtIndexPath(indexPath) as! GridCollectionViewCell
|
||||
self.configureCollectionViewCell(cell, forIndexPath: indexPath)
|
||||
}
|
||||
}
|
||||
|
||||
extension PauseMenuViewController
|
||||
{
|
||||
override func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int
|
||||
{
|
||||
return self.items.count
|
||||
}
|
||||
|
||||
override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell
|
||||
{
|
||||
let cell = collectionView.dequeueReusableCellWithReuseIdentifier(RSTGenericCellIdentifier, forIndexPath: indexPath) as! GridCollectionViewCell
|
||||
self.configureCollectionViewCell(cell, forIndexPath: indexPath)
|
||||
return cell
|
||||
}
|
||||
}
|
||||
|
||||
extension PauseMenuViewController: UICollectionViewDelegateFlowLayout
|
||||
{
|
||||
func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize
|
||||
{
|
||||
self.configureCollectionViewCell(self.prototypeCell, forIndexPath: indexPath)
|
||||
|
||||
let size = self.prototypeCell.contentView.systemLayoutSizeFittingSize(UILayoutFittingCompressedSize)
|
||||
return size
|
||||
}
|
||||
}
|
||||
|
||||
extension PauseMenuViewController
|
||||
{
|
||||
override func collectionView(collectionView: UICollectionView, didHighlightItemAtIndexPath indexPath: NSIndexPath)
|
||||
{
|
||||
self.toggleSelectedStateForPauseItemAtIndexPath(indexPath)
|
||||
}
|
||||
|
||||
override func collectionView(collectionView: UICollectionView, didUnhighlightItemAtIndexPath indexPath: NSIndexPath)
|
||||
{
|
||||
self.toggleSelectedStateForPauseItemAtIndexPath(indexPath)
|
||||
}
|
||||
|
||||
override func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath)
|
||||
{
|
||||
self.toggleSelectedStateForPauseItemAtIndexPath(indexPath)
|
||||
|
||||
let pauseItem = self.items[indexPath.item]
|
||||
pauseItem.action(pauseItem)
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,176 +2,84 @@
|
||||
// PauseViewController.swift
|
||||
// Delta
|
||||
//
|
||||
// Created by Riley Testut on 12/21/15.
|
||||
// Copyright © 2015 Riley Testut. All rights reserved.
|
||||
// Created by Riley Testut on 1/30/16.
|
||||
// Copyright © 2016 Riley Testut. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
struct PauseItem: Equatable
|
||||
{
|
||||
let image: UIImage
|
||||
let text: String
|
||||
let action: (PauseItem -> Void)
|
||||
|
||||
var selected = false
|
||||
|
||||
init(image: UIImage, text: String, action: (PauseItem -> Void))
|
||||
{
|
||||
self.image = image
|
||||
self.text = text
|
||||
self.action = action
|
||||
}
|
||||
}
|
||||
|
||||
func ==(lhs: PauseItem, rhs: PauseItem) -> Bool
|
||||
{
|
||||
return (lhs.image == rhs.image) && (lhs.text == rhs.text)
|
||||
}
|
||||
|
||||
class PauseViewController: UIViewController, PauseInfoProvidable
|
||||
{
|
||||
var items = [PauseItem]() {
|
||||
didSet
|
||||
{
|
||||
guard oldValue != self.items else { return }
|
||||
/// Pause Items
|
||||
var items = [PauseItem]()
|
||||
|
||||
if self.items.count > 8
|
||||
/// <PauseInfoProvidable>
|
||||
var pauseText: String? = nil
|
||||
|
||||
/// UIViewController
|
||||
override var preferredContentSize: CGSize {
|
||||
set { }
|
||||
get
|
||||
{
|
||||
var preferredContentSize = self.pauseNavigationController.topViewController?.preferredContentSize ?? CGSizeZero
|
||||
if preferredContentSize.height > 0
|
||||
{
|
||||
fatalError("PauseViewController only supports up to 8 items (for my sanity when laying out on a landscape iPhone 4s")
|
||||
preferredContentSize.height += self.pauseNavigationController.navigationBar.bounds.height
|
||||
}
|
||||
|
||||
self.collectionView?.reloadData()
|
||||
return preferredContentSize
|
||||
}
|
||||
}
|
||||
|
||||
var pauseText: String? = nil
|
||||
private var pauseNavigationController: UINavigationController!
|
||||
}
|
||||
|
||||
override var preferredContentSize: CGSize {
|
||||
set { }
|
||||
get { return self.collectionView.contentSize }
|
||||
extension PauseViewController
|
||||
{
|
||||
override func viewDidLoad()
|
||||
{
|
||||
super.viewDidLoad()
|
||||
}
|
||||
|
||||
@IBOutlet private(set) var collectionView: UICollectionView!
|
||||
private var collectionViewLayout: GridCollectionViewLayout {
|
||||
return self.collectionView.collectionViewLayout as! GridCollectionViewLayout
|
||||
override func didReceiveMemoryWarning()
|
||||
{
|
||||
super.didReceiveMemoryWarning()
|
||||
}
|
||||
|
||||
private var prototypeCell = GridCollectionViewCell()
|
||||
|
||||
override func preferredStatusBarStyle() -> UIStatusBarStyle
|
||||
{
|
||||
return .LightContent
|
||||
}
|
||||
|
||||
override func viewDidLoad()
|
||||
override func viewDidLayoutSubviews()
|
||||
{
|
||||
super.viewDidLoad()
|
||||
super.viewDidLayoutSubviews()
|
||||
|
||||
self.collectionView.registerClass(GridCollectionViewCell.self, forCellWithReuseIdentifier: "Cell")
|
||||
// Ensure navigation bar is always positioned correctly despite being outside the navigation controller's view
|
||||
self.pauseNavigationController.navigationBar.frame = CGRect(x: 0, y: 0, width: self.view.bounds.width, height: self.pauseNavigationController.navigationBar.bounds.height)
|
||||
}
|
||||
|
||||
self.collectionViewLayout.itemWidth = 90
|
||||
self.collectionViewLayout.usesEqualHorizontalSpacingDistributionForSingleRow = true
|
||||
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?)
|
||||
{
|
||||
if segue.identifier == "embedNavigationController"
|
||||
{
|
||||
self.pauseNavigationController = segue.destinationViewController as! UINavigationController
|
||||
self.pauseNavigationController.navigationBar.tintColor = UIColor.deltaLightPurpleColor()
|
||||
self.pauseNavigationController.view.backgroundColor = UIColor.clearColor()
|
||||
|
||||
self.navigationItem.rightBarButtonItem?.tintColor = UIColor.deltaLightPurpleColor()
|
||||
let pauseMenuViewController = self.pauseNavigationController.topViewController as! PauseMenuViewController
|
||||
pauseMenuViewController.items = self.items
|
||||
|
||||
// Manually update prototype cell properties
|
||||
self.prototypeCell.contentView.widthAnchor.constraintEqualToConstant(self.collectionViewLayout.itemWidth).active = true
|
||||
// Keep navigation bar outside the UIVisualEffectView's
|
||||
self.view.addSubview(self.pauseNavigationController.navigationBar)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal extension PauseViewController
|
||||
extension PauseViewController
|
||||
{
|
||||
func dismiss()
|
||||
{
|
||||
self.performSegueWithIdentifier("unwindPauseSegue", sender: self)
|
||||
self.performSegueWithIdentifier("unwindFromPauseMenu", sender: self)
|
||||
}
|
||||
}
|
||||
|
||||
private extension PauseViewController
|
||||
{
|
||||
func configureCollectionViewCell(cell: GridCollectionViewCell, forIndexPath indexPath: NSIndexPath)
|
||||
{
|
||||
let pauseItem = self.items[indexPath.item]
|
||||
|
||||
cell.maximumImageSize = CGSize(width: 60, height: 60)
|
||||
|
||||
cell.imageView.image = pauseItem.image
|
||||
cell.imageView.contentMode = .Center
|
||||
cell.imageView.layer.borderWidth = 2
|
||||
cell.imageView.layer.borderColor = UIColor.whiteColor().CGColor
|
||||
cell.imageView.layer.cornerRadius = 10
|
||||
|
||||
cell.textLabel.text = pauseItem.text
|
||||
cell.textLabel.textColor = UIColor.whiteColor()
|
||||
|
||||
if pauseItem.selected
|
||||
{
|
||||
cell.imageView.tintColor = UIColor.blackColor()
|
||||
cell.imageView.backgroundColor = UIColor.whiteColor()
|
||||
}
|
||||
else
|
||||
{
|
||||
cell.imageView.tintColor = UIColor.whiteColor()
|
||||
cell.imageView.backgroundColor = UIColor.clearColor()
|
||||
}
|
||||
}
|
||||
|
||||
func toggleSelectedStateForPauseItemAtIndexPath(indexPath: NSIndexPath)
|
||||
{
|
||||
var pauseItem = self.items[indexPath.item]
|
||||
pauseItem.selected = !pauseItem.selected
|
||||
self.items[indexPath.item] = pauseItem
|
||||
|
||||
let cell = self.collectionView.cellForItemAtIndexPath(indexPath) as! GridCollectionViewCell
|
||||
self.configureCollectionViewCell(cell, forIndexPath: indexPath)
|
||||
}
|
||||
}
|
||||
|
||||
extension PauseViewController: UICollectionViewDataSource
|
||||
{
|
||||
func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int
|
||||
{
|
||||
return self.items.count
|
||||
}
|
||||
|
||||
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell
|
||||
{
|
||||
let cell = collectionView.dequeueReusableCellWithReuseIdentifier("Cell", forIndexPath: indexPath) as! GridCollectionViewCell
|
||||
self.configureCollectionViewCell(cell, forIndexPath: indexPath)
|
||||
return cell
|
||||
}
|
||||
}
|
||||
|
||||
extension PauseViewController: UICollectionViewDelegateFlowLayout
|
||||
{
|
||||
func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize
|
||||
{
|
||||
self.configureCollectionViewCell(self.prototypeCell, forIndexPath: indexPath)
|
||||
|
||||
let size = self.prototypeCell.contentView.systemLayoutSizeFittingSize(UILayoutFittingCompressedSize)
|
||||
return size
|
||||
}
|
||||
}
|
||||
|
||||
extension PauseViewController: UICollectionViewDelegate
|
||||
{
|
||||
func collectionView(collectionView: UICollectionView, didHighlightItemAtIndexPath indexPath: NSIndexPath)
|
||||
{
|
||||
self.toggleSelectedStateForPauseItemAtIndexPath(indexPath)
|
||||
}
|
||||
|
||||
func collectionView(collectionView: UICollectionView, didUnhighlightItemAtIndexPath indexPath: NSIndexPath)
|
||||
{
|
||||
self.toggleSelectedStateForPauseItemAtIndexPath(indexPath)
|
||||
}
|
||||
|
||||
func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath)
|
||||
{
|
||||
self.toggleSelectedStateForPauseItemAtIndexPath(indexPath)
|
||||
|
||||
let pauseItem = self.items[indexPath.item]
|
||||
pauseItem.action(pauseItem)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -39,15 +39,10 @@ class PausePresentationController: UIPresentationController
|
||||
{
|
||||
guard let containerView = self.containerView else { return super.frameOfPresentedViewInContainerView() }
|
||||
|
||||
let contentHeight: CGFloat
|
||||
|
||||
if let navigationController = self.presentedViewController as? UINavigationController, topViewController = navigationController.topViewController
|
||||
var contentHeight = self.presentedViewController.preferredContentSize.height
|
||||
if contentHeight == 0
|
||||
{
|
||||
contentHeight = topViewController.preferredContentSize.height + navigationController.navigationBar.bounds.height
|
||||
}
|
||||
else
|
||||
{
|
||||
contentHeight = self.presentedViewController.preferredContentSize.height
|
||||
contentHeight = containerView.bounds.height - UIApplication.sharedApplication().statusBarFrame.height
|
||||
}
|
||||
|
||||
let frame = CGRect(x: 0, y: containerView.bounds.height - contentHeight, width: containerView.bounds.width, height: containerView.bounds.height)
|
||||
@ -150,6 +145,7 @@ class PausePresentationController: UIPresentationController
|
||||
|
||||
// Ensure width is correct
|
||||
self.presentedView()?.bounds.size.width = self.containerView!.bounds.width
|
||||
self.presentedView()?.setNeedsLayout()
|
||||
self.presentedView()?.layoutIfNeeded()
|
||||
|
||||
self.presentedView()?.frame = self.frameOfPresentedViewInContainerView()
|
||||
@ -56,7 +56,7 @@ extension PauseStoryboardSegue: UIViewControllerAnimatedTransitioning
|
||||
|
||||
func animateTransition(transitionContext: UIViewControllerContextTransitioning)
|
||||
{
|
||||
let destinationViewController = transitionContext.viewControllerForKey(UITransitionContextToViewControllerKey) as! UINavigationController
|
||||
let destinationViewController = transitionContext.viewControllerForKey(UITransitionContextToViewControllerKey)!
|
||||
|
||||
destinationViewController.view.frame = transitionContext.finalFrameForViewController(destinationViewController)
|
||||
destinationViewController.view.frame.origin.y = transitionContext.containerView()!.bounds.height
|
||||
2
External/Roxas
vendored
2
External/Roxas
vendored
@ -1 +1 @@
|
||||
Subproject commit 325d2c786bcb9cc61389257023399282e1d8071d
|
||||
Subproject commit 41ed3e9fcc247258a83e103f8816dbc07652c75a
|
||||
Loading…
Reference in New Issue
Block a user