settings menu resize
This commit is contained in:
1 parent
23b68b2d15
commit
51a62ce1d8
16 files changed
+116
-59
No files matched your search
@@ -61,7 +61,6 @@ static StreamView* streamView;
|
||||
fixedResetCoordY = streamViewHeight * 0.4;
|
||||
pointerVelocityFactor = settings.touchPointerVelocityFactor.floatValue;
|
||||
NSLog(@"stream wdith %f, stream height %f", streamViewWidth, streamViewHeight);
|
||||
NSLog(@"pointerVelocityFactor: %.2f", pointerVelocityFactor);
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -145,10 +145,6 @@ static float L3_Y;
|
||||
return touchAddrsCapturedByOnScreenControls;
|
||||
}
|
||||
|
||||
+ (void) testMethod{
|
||||
NSLog(@"swift calling test");
|
||||
}
|
||||
|
||||
- (void) sendRightStickTouchPadEvent:(CGFloat) stickX : (CGFloat) stickY{
|
||||
[_controllerSupport updateRightStick:_controller x: stickX y: stickY]; // stick value populated to the controllerSupport here
|
||||
[_controllerSupport updateFinished:_controller];
|
||||
@@ -370,13 +366,13 @@ static float L3_Y;
|
||||
// _activeCustomOscButtonPositionDict will be updated every time when the osc profile is reloaded
|
||||
OSCProfile *oscProfile = [profilesManager getSelectedProfile]; //returns the currently selected OSCProfile
|
||||
[_activeCustomOscButtonPositionDict removeAllObjects]; //reset the Dict.
|
||||
NSLog(@"_activeCustomOscButtonPositionDict update: STARTOVER");
|
||||
// NSLog(@"_activeCustomOscButtonPositionDict update: STARTOVER");
|
||||
for (NSData *buttonStateEncoded in oscProfile.buttonStates) {
|
||||
OnScreenButtonState* buttonState = [profilesManager unarchiveButtonStateEncoded:buttonStateEncoded];
|
||||
buttonState.position = [self denormalizeWidgetPosition:buttonState.position];
|
||||
if(!buttonState.isHidden && [validPositionButtonNames containsObject:buttonState.name] && (buttonState.buttonType == LegacyOscButton || [profilesManager getIndexOfSelectedProfile] == 0 ) ){
|
||||
[_activeCustomOscButtonPositionDict setObject:[NSValue valueWithCGPoint:buttonState.position] forKey:buttonState.name]; // we got a buttonname -> position dict here
|
||||
NSLog(@"_activeCustomOscButtonPositionDict update, button name:%@, position: %f, %f", buttonState.name, buttonState.position.x, buttonState.position.y);
|
||||
// NSLog(@"_activeCustomOscButtonPositionDict update, button name:%@, position: %f, %f", buttonState.name, buttonState.position.x, buttonState.position.y);
|
||||
}
|
||||
|
||||
// retrieve size factors & other necessary configurations for complex control
|
||||
@@ -397,7 +393,7 @@ static float L3_Y;
|
||||
if(_dPadSizeFactor == 0) _dPadSizeFactor = 1.0; // dealing with invalid sizefactor
|
||||
}
|
||||
}
|
||||
NSLog(@"_activeCustomOscButtonPositionDict update, active button number: %lu", (unsigned long)[_activeCustomOscButtonPositionDict count]);
|
||||
//NSLog(@"_activeCustomOscButtonPositionDict update, active button number: %lu", (unsigned long)[_activeCustomOscButtonPositionDict count]);
|
||||
}
|
||||
else{
|
||||
// deal with simple & full mode configurations
|
||||
@@ -405,7 +401,7 @@ static float L3_Y;
|
||||
_leftStickOpacity = _rightStickOpacity = DEFAULT_STICK_OPACITY;
|
||||
}
|
||||
|
||||
NSLog(@"rightStickOpacity: %f", _rightStickOpacity);
|
||||
//NSLog(@"rightStickOpacity: %f", _rightStickOpacity);
|
||||
|
||||
// belows are orginal codes:
|
||||
switch (self._level) {
|
||||
@@ -849,7 +845,7 @@ static float L3_Y;
|
||||
[buttonLayer.name isEqualToString:@"rightButton"] ||
|
||||
[buttonLayer.name isEqualToString:@"downButton"] ||
|
||||
[buttonLayer.name isEqualToString:@"leftButton"]){
|
||||
NSLog(@"layerName: %@, alpha: %f", buttonLayer.name, buttonStateDecoded.backgroundAlpha);
|
||||
// NSLog(@"layerName: %@, alpha: %f", buttonLayer.name, buttonStateDecoded.backgroundAlpha);
|
||||
[self adjustControllerLayerOpacityWith:buttonLayer and:buttonStateDecoded.backgroundAlpha];
|
||||
}
|
||||
if([buttonLayer.name isEqualToString:@"leftStickBackground"]){
|
||||
|
||||
@@ -43,10 +43,6 @@ static const float QUICK_TAP_TIME_INTERVAL = 0.2;
|
||||
StreamView* streamView;
|
||||
}
|
||||
|
||||
+ (void) testMethod{
|
||||
NSLog(@"swift calling test 666");
|
||||
}
|
||||
|
||||
- (id)initWithView:(StreamView*)view andSettings:(TemporarySettings*)settings {
|
||||
self = [self init];
|
||||
self->streamView = view;
|
||||
|
||||
@@ -221,13 +221,11 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
[self becomeFirstResponder];
|
||||
}
|
||||
|
||||
// this method also deals with lifting streamview for local keyboard
|
||||
- (void)keyboardWillShow:(NSNotification *)notification{
|
||||
if(settings.liftStreamViewForKeyboard && !isInputingText){
|
||||
NSDictionary *userInfo = notification.userInfo;
|
||||
// Get the keyboard size from the notification
|
||||
CGRect keyboardFrame = [userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
|
||||
// NSLog(@"keyboard height %f, lowest point height %f", keyboardFrame.size.height, keyboardToggleRecognizer.lowestTouchPointHeight);
|
||||
if(keyboardFrame.size.height < CGRectGetHeight([[UIScreen mainScreen] bounds]) * 0.25) return; // return in case of abnormal keyboard height
|
||||
HeightViewLiftedTo = keyboardFrame.size.height - keyboardToggleRecognizer.lowestTouchPointHeight + CGRectGetHeight([[UIScreen mainScreen] bounds]) * 0.1; // lift the StreamView to the height of lowest touch point of multi-finger tap gesture, while reserving the view of 1/10 screen height for remote typing.
|
||||
if(HeightViewLiftedTo < 0) HeightViewLiftedTo = 0; // set HeightViewLiftedTo to 0 if it is high enough and not going to be covered by keyboard.
|
||||
@@ -389,7 +387,7 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
|
||||
- (void) reloadOnScreenWidgetViews{
|
||||
|
||||
NSLog(@"reload on screen keyboard buttons here");
|
||||
// NSLog(@"reload on screen keyboard buttons here");
|
||||
|
||||
// remove all keyboard widget views first
|
||||
[self clearOnScreenKeyboardButtons];
|
||||
|
||||
Reference in new issue
Block a user