(iOS) Settings menu refactoring

This commit is contained in:
meancoot 2013-05-05 11:21:07 -04:00
parent 0205fd10ae
commit 239dc7c480
6 changed files with 409 additions and 144 deletions

View File

@ -2,10 +2,10 @@
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1552</int>
<string key="IBDocument.SystemVersion">12C60</string>
<string key="IBDocument.SystemVersion">12D78</string>
<string key="IBDocument.InterfaceBuilderVersion">3084</string>
<string key="IBDocument.AppKitVersion">1187.34</string>
<string key="IBDocument.HIToolboxVersion">625.00</string>
<string key="IBDocument.AppKitVersion">1187.37</string>
<string key="IBDocument.HIToolboxVersion">626.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">2083</string>
@ -42,7 +42,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{160, 237}, {120, 44}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSNextKeyView"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
@ -77,6 +77,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 20}, {260, 44}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1033465661"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
@ -99,6 +100,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 237}, {120, 44}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="61755535"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
@ -121,6 +123,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 186}, {120, 44}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="58186559"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
@ -143,6 +146,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{160, 186}, {120, 44}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="721040644"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
@ -165,6 +169,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 135}, {260, 44}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="694263183"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
@ -236,8 +241,32 @@
<object class="IBUIButton" id="1033465661">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{20, 71}, {260, 44}}</string>
<string key="NSFrame">{{20, 71}, {120, 44}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="374409903"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
<int key="IBUIButtonType">1</int>
<string key="IBUINormalTitle">System Config</string>
<reference key="IBUIHighlightedTitleColor" ref="428922964"/>
<object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
</object>
<reference key="IBUINormalTitleShadowColor" ref="899103122"/>
<reference key="IBUIFontDescription" ref="230061939"/>
<reference key="IBUIFont" ref="495303882"/>
</object>
<object class="IBUIButton" id="374409903">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{160, 71}, {120, 44}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="562513162"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
@ -245,7 +274,7 @@
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
<int key="IBUIButtonType">1</int>
<string key="IBUINormalTitle">Settings</string>
<string key="IBUINormalTitle">Core Config</string>
<reference key="IBUIHighlightedTitleColor" ref="428922964"/>
<object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
@ -258,6 +287,7 @@
</array>
<string key="NSFrame">{{0, 20}, {300, 300}}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="38801877"/>
<object class="NSColor" key="IBUIBackgroundColor">
<int key="NSColorSpace">3</int>
@ -336,12 +366,21 @@
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">showSettings</string>
<string key="label">showSystemSettings</string>
<reference key="source" ref="1033465661"/>
<reference key="destination" ref="372490531"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">148</int>
<int key="connectionID">166</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">showSettings</string>
<reference key="source" ref="374409903"/>
<reference key="destination" ref="372490531"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">154</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
@ -484,6 +523,22 @@
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="1010840730">
<reference key="firstItem" ref="694263183"/>
<int key="firstAttribute">6</int>
<int key="relation">0</int>
<reference key="secondItem" ref="1033465661"/>
<int key="secondAttribute">6</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
<double key="value">0.0</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
<int key="scoringType">6</int>
<float key="scoringTypeFloat">24</float>
<int key="contentType">2</int>
</object>
<object class="IBNSLayoutConstraint" id="837542760">
<reference key="firstItem" ref="694263183"/>
<int key="firstAttribute">3</int>
@ -532,6 +587,54 @@
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="347074274">
<reference key="firstItem" ref="374409903"/>
<int key="firstAttribute">11</int>
<int key="relation">0</int>
<reference key="secondItem" ref="1033465661"/>
<int key="secondAttribute">11</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
<double key="value">0.0</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
<int key="scoringType">6</int>
<float key="scoringTypeFloat">24</float>
<int key="contentType">2</int>
</object>
<object class="IBNSLayoutConstraint" id="402510427">
<reference key="firstItem" ref="191373211"/>
<int key="firstAttribute">6</int>
<int key="relation">0</int>
<reference key="secondItem" ref="374409903"/>
<int key="secondAttribute">6</int>
<float key="multiplier">1</float>
<object class="IBNSLayoutSymbolicConstant" key="constant">
<double key="value">20</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
<int key="scoringType">8</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="555771264">
<reference key="firstItem" ref="374409903"/>
<int key="firstAttribute">5</int>
<int key="relation">0</int>
<reference key="secondItem" ref="58186559"/>
<int key="secondAttribute">5</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
<double key="value">0.0</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
<int key="scoringType">6</int>
<float key="scoringTypeFloat">24</float>
<int key="contentType">2</int>
</object>
<object class="IBNSLayoutConstraint" id="201787259">
<reference key="firstItem" ref="191373211"/>
<int key="firstAttribute">6</int>
@ -580,22 +683,6 @@
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="402510427">
<reference key="firstItem" ref="191373211"/>
<int key="firstAttribute">6</int>
<int key="relation">0</int>
<reference key="secondItem" ref="1033465661"/>
<int key="secondAttribute">6</int>
<float key="multiplier">1</float>
<object class="IBNSLayoutSymbolicConstant" key="constant">
<double key="value">20</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="191373211"/>
<int key="scoringType">8</int>
<float key="scoringTypeFloat">29</float>
<int key="contentType">3</int>
</object>
<object class="IBNSLayoutConstraint" id="828923997">
<reference key="firstItem" ref="1033465661"/>
<int key="firstAttribute">3</int>
@ -666,6 +753,7 @@
<reference ref="58186559"/>
<reference ref="562513162"/>
<reference ref="61755535"/>
<reference ref="374409903"/>
<reference ref="1033465661"/>
</array>
<reference key="parent" ref="0"/>
@ -702,24 +790,7 @@
<object class="IBObjectRecord">
<int key="objectID">86</int>
<reference key="object" ref="694263183"/>
<array class="NSMutableArray" key="children">
<object class="IBNSLayoutConstraint" id="229625608">
<reference key="firstItem" ref="694263183"/>
<int key="firstAttribute">7</int>
<int key="relation">0</int>
<nil key="secondItem"/>
<int key="secondAttribute">0</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
<double key="value">120</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="694263183"/>
<int key="scoringType">3</int>
<float key="scoringTypeFloat">9</float>
<int key="contentType">1</int>
</object>
</array>
<array class="NSMutableArray" key="children"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
@ -752,26 +823,11 @@
<reference key="object" ref="770441708"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">115</int>
<reference key="object" ref="217059225"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">116</int>
<reference key="object" ref="120087908"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">118</int>
<reference key="object" ref="214855274"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">119</int>
<reference key="object" ref="229625608"/>
<reference key="parent" ref="694263183"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">121</int>
<reference key="object" ref="1015088714"/>
@ -780,24 +836,7 @@
<object class="IBObjectRecord">
<int key="objectID">122</int>
<reference key="object" ref="58186559"/>
<array class="NSMutableArray" key="children">
<object class="IBNSLayoutConstraint" id="685350466">
<reference key="firstItem" ref="58186559"/>
<int key="firstAttribute">7</int>
<int key="relation">0</int>
<nil key="secondItem"/>
<int key="secondAttribute">0</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
<double key="value">120</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="58186559"/>
<int key="scoringType">3</int>
<float key="scoringTypeFloat">9</float>
<int key="contentType">1</int>
</object>
</array>
<array class="NSMutableArray" key="children"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
@ -815,11 +854,6 @@
<reference key="object" ref="700933706"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">130</int>
<reference key="object" ref="685350466"/>
<reference key="parent" ref="58186559"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">131</int>
<reference key="object" ref="562513162"/>
@ -843,7 +877,24 @@
<object class="IBObjectRecord">
<int key="objectID">140</int>
<reference key="object" ref="1033465661"/>
<array class="NSMutableArray" key="children"/>
<array class="NSMutableArray" key="children">
<object class="IBNSLayoutConstraint" id="229625608">
<reference key="firstItem" ref="1033465661"/>
<int key="firstAttribute">7</int>
<int key="relation">0</int>
<nil key="secondItem"/>
<int key="secondAttribute">0</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
<double key="value">120</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="1033465661"/>
<int key="scoringType">3</int>
<float key="scoringTypeFloat">9</float>
<int key="contentType">1</int>
</object>
</array>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
@ -852,13 +903,71 @@
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">143</int>
<int key="objectID">146</int>
<reference key="object" ref="65927411"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">149</int>
<reference key="object" ref="1010840730"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">151</int>
<reference key="object" ref="229625608"/>
<reference key="parent" ref="1033465661"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">152</int>
<reference key="object" ref="374409903"/>
<array class="NSMutableArray" key="children">
<object class="IBNSLayoutConstraint" id="541484253">
<reference key="firstItem" ref="374409903"/>
<int key="firstAttribute">7</int>
<int key="relation">0</int>
<nil key="secondItem"/>
<int key="secondAttribute">0</int>
<float key="multiplier">1</float>
<object class="IBLayoutConstant" key="constant">
<double key="value">120</double>
</object>
<float key="priority">1000</float>
<reference key="containingView" ref="374409903"/>
<int key="scoringType">3</int>
<float key="scoringTypeFloat">9</float>
<int key="contentType">1</int>
</object>
</array>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">153</int>
<reference key="object" ref="541484253"/>
<reference key="parent" ref="374409903"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">157</int>
<reference key="object" ref="555771264"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">158</int>
<reference key="object" ref="402510427"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">146</int>
<reference key="object" ref="65927411"/>
<int key="objectID">160</int>
<reference key="object" ref="347074274"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">115</int>
<reference key="object" ref="217059225"/>
<reference key="parent" ref="191373211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">116</int>
<reference key="object" ref="120087908"/>
<reference key="parent" ref="191373211"/>
</object>
</array>
@ -874,13 +983,16 @@
<reference ref="509206074"/>
<reference ref="38515434"/>
<reference ref="828923997"/>
<reference ref="402510427"/>
<reference ref="65927411"/>
<reference ref="804573855"/>
<reference ref="201787259"/>
<reference ref="555771264"/>
<reference ref="402510427"/>
<reference ref="347074274"/>
<reference ref="85952235"/>
<reference ref="1015088714"/>
<reference ref="837542760"/>
<reference ref="1010840730"/>
<reference ref="770441708"/>
<reference ref="217059225"/>
<reference ref="120087908"/>
@ -894,19 +1006,14 @@
<string key="115.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="116.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="118.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="119.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="12.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<boolean value="NO" key="12.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="121.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="122.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<array class="NSMutableArray" key="122.IBViewMetadataConstraints">
<reference ref="685350466"/>
</array>
<boolean value="NO" key="122.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="125.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="127.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="129.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="130.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="131.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<boolean value="NO" key="131.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<integer value="9" key="131.IUISegmentedControlInspectorSelectedSegmentMetadataKey"/>
@ -914,18 +1021,28 @@
<string key="133.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="135.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="140.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<array key="140.IBViewMetadataConstraints">
<reference ref="229625608"/>
</array>
<boolean value="NO" key="140.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="142.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="143.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="146.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="149.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="151.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="152.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<array key="152.IBViewMetadataConstraints">
<reference ref="541484253"/>
</array>
<boolean value="NO" key="152.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="153.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="157.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="158.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="160.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="17.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<boolean value="NO" key="17.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="30.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<boolean value="NO" key="30.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="86.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<array key="86.IBViewMetadataConstraints">
<reference ref="229625608"/>
</array>
<boolean value="NO" key="86.IBViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="88.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="89.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@ -937,9 +1054,72 @@
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">148</int>
<int key="maxID">166</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">NSLayoutConstraint</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/NSLayoutConstraint.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">RetroArch_iOS</string>
<string key="superclassName">UINavigationController</string>
<dictionary class="NSMutableDictionary" key="actions">
<string key="chooseState:">id</string>
<string key="closeGamePressed:">id</string>
<string key="closePauseMenu:">id</string>
<string key="loadState:">id</string>
<string key="resetGame:">id</string>
<string key="saveState:">id</string>
<string key="showPauseMenu:">id</string>
<string key="showSettings">id</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="actionInfosByName">
<object class="IBActionInfo" key="chooseState:">
<string key="name">chooseState:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="closeGamePressed:">
<string key="name">closeGamePressed:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="closePauseMenu:">
<string key="name">closePauseMenu:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="loadState:">
<string key="name">loadState:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="resetGame:">
<string key="name">resetGame:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="saveState:">
<string key="name">saveState:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="showPauseMenu:">
<string key="name">showPauseMenu:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="showSettings">
<string key="name">showSettings</string>
<string key="candidateClassName">id</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/RetroArch_iOS.h</string>
</object>
</object>
</array>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes"/>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>

View File

@ -20,12 +20,12 @@
+ (void)displayErrorMessage:(NSString*)message;
+ (RetroArch_iOS*)get;
- (void)runGame:(NSString*)path;
- (void)runGame:(NSString*)path withModule:(RAModuleInfo*)module;
- (void)refreshConfig;
- (void)refreshSystemConfig;
- (IBAction)showSettings;
@property (strong, nonatomic) RAModuleInfo* moduleInfo;
@property (strong, nonatomic) NSString* systemConfigPath;
@property (strong, nonatomic) NSString* system_directory;

View File

@ -15,6 +15,7 @@
#import "RAMOduleInfo.h"
#import "browser.h"
#import "settings.h"
@implementation RAModuleList
{
@ -79,14 +80,12 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[RetroArch_iOS get].moduleInfo = [self moduleInfoForIndexPath:indexPath];
[[RetroArch_iOS get] runGame:_game];
[RetroArch_iOS.get runGame:_game withModule:[self moduleInfoForIndexPath:indexPath]];
}
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
{
[RetroArch_iOS get].moduleInfo = [self moduleInfoForIndexPath:indexPath];
[[RetroArch_iOS get] showSettings];
[RetroArch_iOS.get pushViewController:[[RASettingsList alloc] initWithModule:[self moduleInfoForIndexPath:indexPath]] animated:YES];
}
- (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

View File

@ -269,6 +269,8 @@ static void event_reload_config(void* userdata)
bool _isGameTop;
bool _isPaused;
bool _isRunning;
RAModuleInfo* _module;
}
+ (void)displayErrorMessage:(NSString*)message
@ -290,6 +292,7 @@ static void event_reload_config(void* userdata)
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
self.system_directory = [NSString stringWithFormat:@"%@/.RetroArch", kDOCSFOLDER];
self.systemConfigPath = [NSString stringWithFormat:@"%@/.RetroArch/frontend.cfg", kDOCSFOLDER];
mkdir([self.system_directory UTF8String], 0755);
// Setup window
@ -333,21 +336,21 @@ static void event_reload_config(void* userdata)
}
#pragma mark EMULATION
- (void)runGame:(NSString*)path
- (void)runGame:(NSString*)path withModule:(RAModuleInfo*)module
{
if (_isRunning)
return;
assert(self.moduleInfo);
_module = module;
[RASettingsList refreshConfigFile];
[RASettingsList refreshModuleConfig:module];
[self pushViewController:RAGameView.get animated:NO];
_isRunning = true;
const char* const sd = [[RetroArch_iOS get].system_directory UTF8String];
const char* const cf = (ra_ios_is_file(self.moduleInfo.configPath)) ? [self.moduleInfo.configPath UTF8String] : 0;
const char* const libretro = [self.moduleInfo.path UTF8String];
const char* const cf = (ra_ios_is_file(_module.configPath)) ? [_module.configPath UTF8String] : 0;
const char* const libretro = [_module.path UTF8String];
struct rarch_main_wrap* load_data = malloc(sizeof(struct rarch_main_wrap));
load_data->libretro_path = strdup(libretro);
@ -362,16 +365,8 @@ static void event_reload_config(void* userdata)
return;
}
pthread_detach(_retroThread);
// Read load time settings
// TODO: Do this better
config_file_t* conf = config_file_new([self.moduleInfo.configPath UTF8String]);
bool autoStartBluetooth = false;
if (conf && config_get_bool(conf, "ios_auto_bluetooth", &autoStartBluetooth) && autoStartBluetooth)
[self startBluetooth];
if (conf)
config_get_bool(conf, "ios_use_icade", &use_icade);
config_file_free(conf);
[self refreshSystemConfig];
}
- (void)rarchExited:(BOOL)successful
@ -392,6 +387,8 @@ static void event_reload_config(void* userdata)
[self popToViewController:[RAGameView get] animated:NO];
[self popViewControllerAnimated:NO];
}
_module = nil;
}
- (void)refreshConfig
@ -406,6 +403,22 @@ static void event_reload_config(void* userdata)
}
}
- (void)refreshSystemConfig
{
// Read load time settings
// TODO: Do this better
config_file_t* conf = config_file_new([self.systemConfigPath UTF8String]);
bool autoStartBluetooth = false;
if (conf && config_get_bool(conf, "ios_auto_bluetooth", &autoStartBluetooth) && autoStartBluetooth)
[self startBluetooth];
if (conf)
config_get_bool(conf, "ios_use_icade", &use_icade);
config_file_free(conf);
}
#pragma mark PAUSE MENU
- (IBAction)showPauseMenu:(id)sender
{
@ -460,7 +473,13 @@ static void event_reload_config(void* userdata)
- (IBAction)showSettings
{
[self pushViewController:[RASettingsList new] animated:YES];
if (_module)
[self pushViewController:[[RASettingsList alloc] initWithModule:_module] animated:YES];
}
- (IBAction)showSystemSettings
{
[self pushViewController:[RASystemSettingsList new] animated:YES];
}
#pragma mark Bluetooth Helpers

View File

@ -48,10 +48,14 @@ enum SettingTypes
@interface RASettingsSubList : UITableViewController
- (id)initWithSettings:(NSArray*)values title:(NSString*)title;
- (void)handleCustomAction:(NSString*)action;
- (void)handleCustomAction:(NSString*)action withUserData:(id)data;
- (void)writeSettings:(NSArray*)settingList toConfig:(config_file_t*)config;
@end
@interface RASettingsList : RASettingsSubList
+ (void)refreshConfigFile;
+ (void)refreshModuleConfig:(RAModuleInfo*)module;
- (id)initWithModule:(RAModuleInfo*)module;
@end
@interface RASystemSettingsList : RASettingsSubList
@end

View File

@ -127,30 +127,38 @@ static RASettingData* aspect_setting(config_file_t* config, NSString* label)
return result;
}
static RASettingData* custom_action(NSString* action)
static RASettingData* custom_action(NSString* action, id data)
{
return [[RASettingData alloc] initWithType:CustomAction label:action name:nil];
RASettingData* result = [[RASettingData alloc] initWithType:CustomAction label:action name:nil];
if (data != nil)
objc_setAssociatedObject(result, "USERDATA", data, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
return result;
}
@implementation RASettingsList
+ (void)refreshConfigFile
{
(void)[[RASettingsList alloc] init];
RAModuleInfo* _module;
}
- (id)init
+ (void)refreshModuleConfig:(RAModuleInfo*)module;
{
config_file_t* config = config_file_new([[RetroArch_iOS get].moduleInfo.configPath UTF8String]);
(void)[[RASettingsList alloc] initWithModule:module];
}
- (id)initWithModule:(RAModuleInfo*)module
{
_module = module;
config_file_t* config = config_file_new([_module.configPath UTF8String]);
NSString* overlay_path = [[[NSBundle mainBundle] bundlePath] stringByAppendingString:@"/overlays/"];
NSString* shader_path = [[[NSBundle mainBundle] bundlePath] stringByAppendingString:@"/shaders/"];
NSArray* settings = [NSArray arrayWithObjects:
[NSArray arrayWithObjects:@"Frontend",
custom_action(@"Module Info"),
custom_action(@"Diagnostic Log"),
boolean_setting(config, @"ios_auto_bluetooth", @"Auto Enable Bluetooth", @"false"),
boolean_setting(config, @"ios_use_icade", @"Native BT is iCade", @"false"),
[NSArray arrayWithObjects:@"Core",
custom_action(@"Core Info", nil),
nil],
[NSArray arrayWithObjects:@"Video",
@ -236,32 +244,87 @@ static RASettingData* custom_action(NSString* action)
nil
];
self = [super initWithSettings:settings title:@"RetroArch Settings"];
self = [super initWithSettings:settings title:_module.displayName];
return self;
}
- (void)dealloc
{
config_file_t* config = config_file_new([[RetroArch_iOS get].moduleInfo.configPath UTF8String]);
config_file_t* config = config_file_new([_module.configPath UTF8String]);
if (!config)
config = config_file_new(0);
config_set_string(config, "system_directory", [[RetroArch_iOS get].system_directory UTF8String]);
[self writeSettings:nil toConfig:config];
if (config)
config_file_write(config, [[RetroArch_iOS get].moduleInfo.configPath UTF8String]);
if (config)
config_file_write(config, [_module.configPath UTF8String]);
config_file_free(config);
[[RetroArch_iOS get] refreshConfig];
}
- (void)handleCustomAction:(NSString*)action
- (void)handleCustomAction:(NSString*)action withUserData:(id)data
{
if ([@"Module Info" isEqualToString:action])
[[RetroArch_iOS get] pushViewController:[[RAModuleInfoList alloc] initWithModuleInfo:[RetroArch_iOS get].moduleInfo] animated:YES];
else if ([@"Diagnostic Log" isEqualToString:action])
if ([@"Core Info" isEqualToString:action])
[[RetroArch_iOS get] pushViewController:[[RAModuleInfoList alloc] initWithModuleInfo:_module] animated:YES];
}
@end
@implementation RASystemSettingsList
- (id)init
{
config_file_t* config = config_file_new([[RetroArch_iOS get].systemConfigPath UTF8String]);
NSMutableArray* modules = [NSMutableArray array];
[modules addObject:@"Cores"];
NSArray* module_data = [RAModuleInfo getModules];
for (int i = 0; i != module_data.count; i ++)
{
RAModuleInfo* info = (RAModuleInfo*)module_data[i];
[modules addObject:custom_action(info.displayName, info)];
}
NSArray* settings = [NSArray arrayWithObjects:
[NSArray arrayWithObjects:@"Frontend",
custom_action(@"Diagnostic Log", nil),
nil],
[NSArray arrayWithObjects:@"Bluetooth",
boolean_setting(config, @"ios_use_icade", @"Native BT is iCade", @"false"),
boolean_setting(config, @"ios_auto_bluetooth", @"Auto Enable BTstack", @"false"),
nil],
modules,
nil
];
self = [super initWithSettings:settings title:@"RetroArch Settings"];
return self;
}
- (void)dealloc
{
config_file_t* config = config_file_new([[RetroArch_iOS get].systemConfigPath UTF8String]);
if (!config)
config = config_file_new(0);
[self writeSettings:nil toConfig:config];
if (config)
config_file_write(config, [[RetroArch_iOS get].systemConfigPath UTF8String]);
config_file_free(config);
[[RetroArch_iOS get] refreshSystemConfig];
}
- (void)handleCustomAction:(NSString*)action withUserData:(id)data
{
if ([@"Diagnostic Log" isEqualToString:action])
[[RetroArch_iOS get] pushViewController:[RALogView new] animated:YES];
else if (data)
[[RetroArch_iOS get] pushViewController:[[RASettingsList alloc] initWithModule:(RAModuleInfo*)data] animated:YES];
}
@end
@ -280,7 +343,7 @@ static RASettingData* custom_action(NSString* action)
return self;
}
- (void)handleCustomAction:(NSString*)action
- (void)handleCustomAction:(NSString*)action withUserData:(id)data
{
}
@ -364,7 +427,7 @@ static RASettingData* custom_action(NSString* action)
break;
case CustomAction:
[self handleCustomAction:setting.label];
[self handleCustomAction:setting.label withUserData:objc_getAssociatedObject(setting, "USERDATA")];
break;
default: