- make dPad, select, start OSC button on-screen widgets rectangle

- on screen control & widget size factor up to 800%
- configurable borderWidth for on-screen widget views
stage manager version
This commit is contained in:
TrueZhuangjia committed 2025-02-10 00:52:56 +08:00
1 parent ca04c62ecd
commit 4d4ab333f4
13 files changed
+161 -39

No files matched your search

+3 -1
View File
@@ -401,13 +401,15 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
widgetView.translatesAutoresizingMaskIntoConstraints = NO; // weird but this is mandatory, or you will find no key views added to the right place
widgetView.widthFactor = buttonState.widthFactor;
widgetView.heightFactor = buttonState.heightFactor;
widgetView.borderWidth = buttonState.borderWidth;
widgetView.sensitivityFactor = buttonState.sensitivityFactor;
widgetView.stickIndicatorXOffset = buttonState.stickIndicatorXOffset;
// Add the widgetView to the view controller's view
[self->streamFrameTopLayerView addSubview:widgetView]; // add keyboard button to the stream frame view. must add it to the target view before setting location.
[widgetView setLocationWithXOffset:buttonState.position.x yOffset:buttonState.position.y];
[widgetView resizeWidgetView]; // resize must be called after relocation
[widgetView adjustButtonTransparencyWithAlpha:buttonState.backgroundAlpha];
[widgetView adjustTransparencyWithAlpha:buttonState.backgroundAlpha];
[widgetView adjustBorderWithWidth:buttonState.borderWidth];
}
}
}