diff --git a/ios/RetroArch/PauseIndicatorView.xib b/ios/RetroArch/PauseIndicatorView.xib index b01688c55e..78973a1ccb 100644 --- a/ios/RetroArch/PauseIndicatorView.xib +++ b/ios/RetroArch/PauseIndicatorView.xib @@ -41,8 +41,6 @@ 292 {768, 1005} - - _NS:9 NO IBIPadFramework @@ -75,7 +73,6 @@ {{0, 20}, {768, 1004}} - {250, 250} @@ -97,12 +94,12 @@ - pauseGamePressed: + showPauseMenu: 7 - 57 + 71 @@ -247,39 +244,9 @@ - 70 - - - - - NSLayoutConstraint - NSObject - - IBProjectSource - ./Classes/NSLayoutConstraint.h - - - - RetroArch_iOS - UIResponder - - pauseGamePressed: - id - - - pauseGamePressed: - - pauseGamePressed: - id - - - - IBProjectSource - ./Classes/RetroArch_iOS.h - - - + 71 + 0 IBIPadFramework YES diff --git a/ios/RetroArch/PauseView.xib b/ios/RetroArch/PauseView.xib index c98ae28134..f81d6519b1 100644 --- a/ios/RetroArch/PauseView.xib +++ b/ios/RetroArch/PauseView.xib @@ -14,6 +14,7 @@ IBNSLayoutConstraint IBProxyObject IBUIButton + IBUISegmentedControl IBUIView @@ -39,16 +40,16 @@ 292 - {{20, 20}, {728, 44}} + {{160, 237}, {120, 44}} - + _NS:9 NO IBIPadFramework 0 0 1 - Return to Loader + Exit 3 MQA @@ -74,8 +75,10 @@ 292 - {{20, 71}, {728, 44}} + {{20, 20}, {260, 44}} + + _NS:9 NO IBIPadFramework @@ -92,10 +95,154 @@ + + + 292 + {{20, 237}, {120, 44}} + + + + _NS:9 + NO + IBIPadFramework + 0 + 0 + 1 + Reset + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + + + + + 292 + {{20, 186}, {120, 44}} + + + + _NS:9 + NO + IBIPadFramework + 0 + 0 + 1 + Save State + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + + + + + 292 + {{160, 186}, {120, 44}} + + + + _NS:9 + NO + IBIPadFramework + 0 + 0 + 1 + Load State + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + + + + + 292 + {{20, 135}, {260, 44}} + + + + _NS:9 + NO + 1 + IBIPadFramework + 10 + 0 + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + {0, 0} + {0, 0} + {0, 0} + {0, 0} + {0, 0} + {0, 0} + {0, 0} + {0, 0} + {0, 0} + {0, 0} + + + + + + + + + + + + + + - {{0, 20}, {768, 1004}} + {{0, 20}, {300, 300}} - + + 3 MQA @@ -108,6 +255,10 @@ 2 + + IBUISimulatedFreeformSizeMetricsSentinel + Freeform + IBIPadFramework @@ -131,6 +282,42 @@ 25 + + + resetGame: + + + 7 + + 138 + + + + saveState: + + + 7 + + 137 + + + + loadState: + + + 7 + + 136 + + + + chooseState: + + + 13 + + 139 + @@ -144,7 +331,215 @@ 1 + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 4 + 0 + + 4 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 11 + 0 + + 11 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 4 + 0 + + 4 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 4 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 4 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 6 + 0 + + 6 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + 6 0 @@ -160,56 +555,8 @@ 29 3 - + - 3 - 0 - - 4 - 1 - - 8 - - 1000 - - 6 - 24 - 3 - - - - 5 - 0 - - 5 - 1 - - 20 - - 1000 - - 8 - 29 - 3 - - - - 6 - 0 - - 6 - 1 - - 20 - - 1000 - - 8 - 29 - 3 - - - 5 0 @@ -225,7 +572,7 @@ 3 - + 3 0 @@ -240,8 +587,12 @@ 29 3 - + + + + + @@ -259,41 +610,160 @@ 12 - - - - 13 - - - - - 14 - - - - - 16 - + 17 + - 20 + 30 + + + + + + 86 + + + + + 7 + 0 + + 0 + 1 + + 120 + + 1000 + + 3 + 9 + 1 + + + + + + 88 + + + + + 89 + + + + + 94 + + + + + 97 + + + + + 98 + + + + + 113 - 21 + 115 - 22 - + 116 + + + + + 118 + + + + + 119 + + + + + 121 + + + + + 122 + + + + + 7 + 0 + + 0 + 1 + + 120 + + 1000 + + 3 + 9 + 1 + + + + + + 125 + + + + + 127 + + + + + 129 + + + + + 130 + + + + + 131 + + + + + 132 + + + + + 133 + + + + + 135 + @@ -304,32 +774,88 @@ UIResponder com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - + - - + + + + + + + + + + + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 25 + 139 + + + + + NSLayoutConstraint + NSObject + + IBProjectSource + ./Classes/NSLayoutConstraint.h + + + + RetroArch_iOS + UIResponder + + IBProjectSource + ./Classes/RetroArch_iOS.h + + + - 0 IBIPadFramework YES diff --git a/ios/RetroArch/RetroArch_iOS.m b/ios/RetroArch/RetroArch_iOS.m index 24ea59ca2f..2d3282a4e4 100644 --- a/ios/RetroArch/RetroArch_iOS.m +++ b/ios/RetroArch/RetroArch_iOS.m @@ -289,6 +289,48 @@ } #pragma mark PAUSE MENU +- (IBAction)showPauseMenu:(id)sender +{ + if (_isRunning && !_isPaused && _gameAndAbove == 1) + { + _isPaused = true; + + UISegmentedControl* stateSelect = (UISegmentedControl*)[_pauseView viewWithTag:1]; + stateSelect.selectedSegmentIndex = (g_extern.state_slot < 10) ? g_extern.state_slot : -1; + + [UIView animateWithDuration:0.2 + animations:^ + { + _pauseIndicatorView.alpha = ALMOST_INVISIBLE; + _pauseView.alpha = 1.0f; + } + completion:^(BOOL finished){}]; + } +} + +- (IBAction)resetGame:(id)sender +{ + if (_isRunning) rarch_game_reset(); + [self closePauseMenu:sender]; +} + +- (IBAction)loadState:(id)sender +{ + if (_isRunning) rarch_load_state(); + [self closePauseMenu:sender]; +} + +- (IBAction)saveState:(id)sender +{ + if (_isRunning) rarch_save_state(); + [self closePauseMenu:sender]; +} + +- (IBAction)chooseState:(id)sender +{ + g_extern.state_slot = ((UISegmentedControl*)sender).selectedSegmentIndex; +} + - (IBAction)closePauseMenu:(id)sender { if (_isPaused) @@ -312,22 +354,6 @@ [self closeGame]; } -- (IBAction)pauseGamePressed:(id)sender -{ - if (_isRunning && !_isPaused && _gameAndAbove == 1) - { - _isPaused = true; - - [UIView animateWithDuration:0.2 - animations:^ - { - _pauseIndicatorView.alpha = ALMOST_INVISIBLE; - _pauseView.alpha = 1.0f; - } - completion:^(BOOL finished){}]; - } -} - - (IBAction)showSettings { [self pushViewController:[RASettingsList new] isGame:NO];