add OSC visual feedback & corresponding menu option.
adjust menu option layout for iPhone
This commit is contained in:
1 parent
ec8095ea9d
commit
d90bf747fc
15 files changed
+391
-82
No files matched your search
@@ -47,7 +47,6 @@ const double NAV_BAR_HEIGHT = 50;
|
||||
[self.tableView registerNib:[UINib nibWithNibName:@"ProfileTableViewCell" bundle:nil]
|
||||
forCellReuseIdentifier:@"Cell"]; // Register the custom cell nib file with the table view
|
||||
self.tableView.alpha = 0.5;
|
||||
|
||||
self.tableView.backgroundColor = [[UIColor colorWithRed:0.5 green:0.7 blue:1.0 alpha:1.0] colorWithAlphaComponent:0.5]; // set background color & transparency
|
||||
}
|
||||
|
||||
|
||||
@@ -668,6 +668,7 @@ static NSMutableSet* hostList;
|
||||
_streamConfig.playAudioOnPC = streamSettings.playAudioOnPC;
|
||||
_streamConfig.useFramePacing = streamSettings.useFramePacing;
|
||||
_streamConfig.swapABXYButtons = streamSettings.swapABXYButtons;
|
||||
_streamConfig.oscVisualFeedback = streamSettings.oscVisualFeedback; // new streamConfig segment
|
||||
|
||||
// multiController must be set before calling getConnectedGamepadMask
|
||||
_streamConfig.multiController = streamSettings.multiController;
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
@property (strong, nonatomic) IBOutlet UISegmentedControl *touchModeSelector;
|
||||
@property (strong, nonatomic) IBOutlet UILabel *onscreenControllerLabel;
|
||||
@property (strong, nonatomic) IBOutlet UISegmentedControl *onscreenControlSelector;
|
||||
@property (strong, nonatomic) IBOutlet UISegmentedControl *oscVisualFeedbackSelector;
|
||||
@property (strong, nonatomic) IBOutlet UISegmentedControl *optimizeSettingsSelector;
|
||||
@property (strong, nonatomic) IBOutlet UISegmentedControl *multiControllerSelector;
|
||||
@property (strong, nonatomic) IBOutlet UISegmentedControl *swapABXYButtonsSelector;
|
||||
|
||||
@@ -430,14 +430,15 @@ BOOL isCustomResolution(CGSize res) {
|
||||
[self.keyboardToggleFingerNumSlider addTarget:self action:@selector(keyboardToggleFingerNumSliderMoved) forControlEvents:(UIControlEventValueChanged)]; // Update label display when slider is being moved.
|
||||
[self keyboardToggleFingerNumSliderMoved];
|
||||
|
||||
// this setting will be affected touchMode, must be loaded before them.
|
||||
// this setting will be affected by touchMode, must be loaded before them.
|
||||
NSInteger onscreenControlsLevel = [currentSettings.onscreenControls integerValue];
|
||||
[self.onscreenControlSelector setSelectedSegmentIndex:onscreenControlsLevel];
|
||||
[self.onscreenControlSelector addTarget:self action:@selector(onscreenControlChanged) forControlEvents:UIControlEventValueChanged];
|
||||
[self onscreenControlChanged];
|
||||
|
||||
[self.oscVisualFeedbackSelector setSelectedSegmentIndex:currentSettings.oscVisualFeedback ? 1 : 0]; // load old setting of oscVisualFeedback
|
||||
|
||||
// [self.touchModeSelector setSelectedSegmentIndex:currentSettings.absoluteTouchMode ? 1 : 0];
|
||||
// this part will enable/disable oscSelector & the visual feedback selector
|
||||
[self.touchModeSelector setSelectedSegmentIndex:currentSettings.touchMode.intValue]; //Load old touchMode setting
|
||||
[self.touchModeSelector addTarget:self action:@selector(touchModeChanged) forControlEvents:UIControlEventValueChanged];
|
||||
[self touchModeChanged];
|
||||
@@ -597,6 +598,7 @@ BOOL isCustomResolution(CGSize res) {
|
||||
bool isNativeTouch = [self.touchModeSelector selectedSegmentIndex] == PURE_NATIVE_TOUCH || [self.touchModeSelector selectedSegmentIndex] == REGULAR_NATIVE_TOUCH;
|
||||
|
||||
[self.onscreenControlSelector setEnabled:oscSelectorEnabled];
|
||||
[self.oscVisualFeedbackSelector setEnabled:oscSelectorEnabled]; // this selector stay aligned with oscSelector
|
||||
|
||||
[self widget:self.pointerVelocityModeDividerSlider setEnabled:isNativeTouch]; // pointer velocity scaling works only in native touch mode.
|
||||
[self widget:self.touchPointerVelocityFactorSlider setEnabled:isNativeTouch]; // pointer velocity scaling works only in native touch mode.
|
||||
@@ -893,6 +895,7 @@ BOOL isCustomResolution(CGSize res) {
|
||||
CGFloat pointerVelocityModeDivider = (CGFloat)(uint8_t)self.pointerVelocityModeDividerSlider.value/100;
|
||||
CGFloat touchPointerVelocityFactor =(CGFloat)(uint16_t)[self map_velocFactorDisplay_fromSliderValue:self.touchPointerVelocityFactorSlider.value]/100;
|
||||
CGFloat mousePointerVelocityFactor =(CGFloat)(uint16_t)self.mousePointerVelocityFactorSlider.value/100;
|
||||
BOOL oscVisualFeedback = [self.oscVisualFeedbackSelector selectedSegmentIndex] == 1;
|
||||
BOOL liftStreamViewForKeyboard = [self.liftStreamViewForKeyboardSelector selectedSegmentIndex] == 1;
|
||||
BOOL showKeyboardToolbar = [self.showKeyboardToolbarSelector selectedSegmentIndex] == 1;
|
||||
BOOL optimizeGames = [self.optimizeSettingsSelector selectedSegmentIndex] == 1;
|
||||
@@ -919,6 +922,7 @@ BOOL isCustomResolution(CGSize res) {
|
||||
pointerVelocityModeDivider:pointerVelocityModeDivider
|
||||
touchPointerVelocityFactor:touchPointerVelocityFactor
|
||||
mousePointerVelocityFactor:mousePointerVelocityFactor
|
||||
oscVisualFeedback:oscVisualFeedback
|
||||
liftStreamViewForKeyboard:liftStreamViewForKeyboard
|
||||
showKeyboardToolbar:showKeyboardToolbar
|
||||
optimizeGames:optimizeGames
|
||||
|
||||
Reference in new issue
Block a user