feat: on screen widget touch track point

This commit is contained in:
True Zhuanjia
2026-02-11 21:43:33 +08:00
parent 44123c74d9
commit 8d54ed9316
15 changed files with 995 additions and 798 deletions
File diff suppressed because it is too large Load Diff
+42 -20
View File
@@ -1121,7 +1121,7 @@
</constraints>
</stackView>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="cVe-Uk-gXv" userLabel="codec Stack">
<rect key="frame" x="16" y="1554" width="380" height="56.5"/>
<rect key="frame" x="0.0" y="1790" width="380" height="56.5"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Preferred Codec" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3Hh-2q-gas" userLabel="Preferred Codec">
<rect key="frame" x="0.0" y="0.0" width="380" height="20.5"/>
@@ -1147,7 +1147,7 @@
</constraints>
</stackView>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="kFw-d7-BTn" userLabel="HDRStack">
<rect key="frame" x="18" y="1618" width="185" height="31"/>
<rect key="frame" x="3" y="1880" width="185" height="31"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="HDR" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7nX-ra-hKS">
<rect key="frame" x="0.0" y="0.0" width="35" height="31"/>
@@ -1490,7 +1490,7 @@
</constraints>
</stackView>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="1Q7-WA-wrj" userLabel="externalDisplayMode Stack">
<rect key="frame" x="15" y="2216" width="380" height="56.5"/>
<rect key="frame" x="0.0" y="2478" width="380" height="56.5"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="External Display Mode" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lwy-Nu-hQj">
<rect key="frame" x="0.0" y="0.0" width="380" height="20.5"/>
@@ -1514,7 +1514,7 @@
</constraints>
</stackView>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="IKt-3O-raJ" userLabel="localMousePointerMode Stack">
<rect key="frame" x="15" y="2291" width="380" height="56.5"/>
<rect key="frame" x="0.0" y="2553" width="380" height="56.5"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Local Mouse Pointer" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mdA-jF-9Mf">
<rect key="frame" x="0.0" y="0.0" width="380" height="20.5"/>
@@ -1539,7 +1539,7 @@
</constraints>
</stackView>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="iS2-99-oox" userLabel="reverseMouseWheelDirection Stack">
<rect key="frame" x="15" y="1784" width="380" height="56.5"/>
<rect key="frame" x="0.0" y="2046" width="380" height="56.5"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Physical Mouse Wheel Scroll" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="C9B-Rx-YCP">
<rect key="frame" x="0.0" y="0.0" width="380" height="20.5"/>
@@ -1563,7 +1563,7 @@
</constraints>
</stackView>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="Htp-vm-hsa" userLabel="CitrixX1MouseStack">
<rect key="frame" x="20" y="1973" width="280" height="31"/>
<rect key="frame" x="5" y="2235" width="280" height="31"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Citrix X1 Mouse" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.65000000000000002" adjustsLetterSpacingToFitWidth="YES" translatesAutoresizingMaskIntoConstraints="NO" id="HQS-Vu-wQO">
<rect key="frame" x="0.0" y="0.0" width="130" height="31"/>
@@ -1586,7 +1586,7 @@
</constraints>
</stackView>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="dby-k3-aiH" userLabel="statsOverlay Stack">
<rect key="frame" x="15" y="2063" width="380" height="56.5"/>
<rect key="frame" x="0.0" y="2325" width="380" height="56.5"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Statistics Overlay" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Pdb-Bs-kMJ" userLabel="Statistics Overlay">
<rect key="frame" x="0.0" y="0.0" width="380" height="20.5"/>
@@ -1635,7 +1635,7 @@
</constraints>
</stackView>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="FKE-J4-bZB" userLabel="unlockDisplayOrientation Stack">
<rect key="frame" x="16" y="2140" width="380" height="56.5"/>
<rect key="frame" x="1" y="2402" width="380" height="56.5"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="90° Display Rotation" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tO4-eD-VHF" userLabel="Lock Display Orientation">
<rect key="frame" x="0.0" y="0.0" width="380" height="20.5"/>
@@ -1659,7 +1659,7 @@
</constraints>
</stackView>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="hnG-J3-IuI" userLabel="yuv444Stack">
<rect key="frame" x="15" y="1673" width="229" height="31"/>
<rect key="frame" x="0.0" y="1935" width="229" height="31"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="YUV 4:4:4" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5JB-m0-nUF" userLabel="yuv444Label">
<rect key="frame" x="0.0" y="0.0" width="79" height="31"/>
@@ -1679,7 +1679,7 @@
</constraints>
</stackView>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="Col-Dm-lwT" userLabel="optimizeGameSettingStack">
<rect key="frame" x="20" y="2012" width="334.5" height="31"/>
<rect key="frame" x="5" y="2274" width="334.5" height="31"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Optimize Game Settings" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.64999997615814209" adjustsLetterSpacingToFitWidth="YES" adjustsFontForContentSizeCategory="YES" translatesAutoresizingMaskIntoConstraints="NO" id="9dX-RB-Fpa" userLabel="Optimize Game Settings">
<rect key="frame" x="0.0" y="0.0" width="184.5" height="31"/>
@@ -1699,7 +1699,7 @@
</constraints>
</stackView>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="aud-Zf-37T" userLabel="audioOnPCStack">
<rect key="frame" x="20" y="1934" width="279.5" height="31"/>
<rect key="frame" x="5" y="2196" width="279.5" height="31"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Play Audio on PC" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.64999997615814209" adjustsLetterSpacingToFitWidth="YES" adjustsFontForContentSizeCategory="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5NE-u6-yIU" userLabel="Optimize Game Settings">
<rect key="frame" x="0.0" y="0.0" width="129.5" height="31"/>
@@ -2023,7 +2023,7 @@
</constraints>
</stackView>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="CKa-yk-GSi" userLabel="redirectMicStack">
<rect key="frame" x="20" y="1895" width="361" height="31"/>
<rect key="frame" x="5" y="2157" width="361" height="31"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Redirect Mic (Experimental)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.64999997615814209" adjustsLetterSpacingToFitWidth="YES" adjustsFontForContentSizeCategory="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nz2-5g-YSQ" userLabel="uiLabel">
<rect key="frame" x="0.0" y="0.0" width="211" height="31"/>
@@ -2143,7 +2143,7 @@
</constraints>
</stackView>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="Hdw-ci-dgR">
<rect key="frame" x="20" y="1856" width="379" height="31"/>
<rect key="frame" x="5" y="2118" width="379" height="31"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Remember Menu Fold/Expand" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.64999997615814209" adjustsLetterSpacingToFitWidth="YES" adjustsFontForContentSizeCategory="YES" translatesAutoresizingMaskIntoConstraints="NO" id="9Kq-ys-dnF" userLabel="uiLabel">
<rect key="frame" x="0.0" y="0.0" width="229" height="31"/>
@@ -2163,7 +2163,7 @@
</constraints>
</stackView>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="NFm-mv-3qh" userLabel="mapGyroToStack">
<rect key="frame" x="15" y="2398" width="380" height="56.5"/>
<rect key="frame" x="0.0" y="2660" width="380" height="56.5"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Map Built-in Gyro to" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GX4-zV-pQ8" userLabel="Show Local Keyboard Toolbar">
<rect key="frame" x="0.0" y="0.0" width="380" height="20.5"/>
@@ -2188,7 +2188,7 @@
</constraints>
</stackView>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="xMx-7R-pmH" userLabel="gyroToStickStack">
<rect key="frame" x="18" y="2476" width="336" height="67"/>
<rect key="frame" x="3" y="2738" width="336" height="67"/>
<subviews>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="68R-uR-4PI" userLabel="substack1">
<rect key="frame" x="0.0" y="0.0" width="336" height="31"/>
@@ -2236,7 +2236,7 @@
</constraints>
</stackView>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="13.800000000000001" id="1z6-G8-X45" userLabel="yawPitchSensitivityStack">
<rect key="frame" x="20" y="2557" width="380" height="125"/>
<rect key="frame" x="5" y="2819" width="380" height="125"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="pyS-Cc-IC3" userLabel="yawSensitivityStack">
@@ -2282,7 +2282,7 @@
</subviews>
</stackView>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="5Zq-ch-iZ4" userLabel="rollSensitivityStack">
<rect key="frame" x="20" y="2696" width="380" height="55.5"/>
<rect key="frame" x="5" y="2958" width="380" height="55.5"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="Roll Sensitivity" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dxk-33-Nbx" userLabel="uiLabel">
<rect key="frame" x="0.0" y="0.0" width="380" height="16.5"/>
@@ -2302,7 +2302,7 @@
</constraints>
</stackView>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="Orr-Nz-gJS" userLabel="gyroMinStickOffsetStack">
<rect key="frame" x="20" y="2782" width="380" height="55.5"/>
<rect key="frame" x="5" y="3044" width="380" height="55.5"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="Minimum Offset (Gyro→Stick)" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="52u-T9-1Hv" userLabel="uiLabel">
<rect key="frame" x="0.0" y="0.0" width="380" height="16.5"/>
@@ -2745,7 +2745,7 @@
</constraints>
</stackView>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="gkU-Rq-gB0">
<rect key="frame" x="20" y="2862" width="346" height="31"/>
<rect key="frame" x="5" y="3124" width="346" height="31"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Synth Physical Stick Input" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.64999997615814209" adjustsLetterSpacingToFitWidth="YES" adjustsFontForContentSizeCategory="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Bx3-CM-wet" userLabel="uiLabel">
<rect key="frame" x="0.0" y="0.0" width="196" height="31"/>
@@ -2765,7 +2765,7 @@
</constraints>
</stackView>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="97k-tp-tqF">
<rect key="frame" x="20" y="2919" width="306" height="31"/>
<rect key="frame" x="5" y="3181" width="306" height="31"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Reverse Hold Button" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.64999997615814209" adjustsLetterSpacingToFitWidth="YES" adjustsFontForContentSizeCategory="YES" translatesAutoresizingMaskIntoConstraints="NO" id="m3M-yS-Wt6" userLabel="uiLabel">
<rect key="frame" x="0.0" y="0.0" width="156" height="31"/>
@@ -2884,6 +2884,26 @@
<constraint firstAttribute="height" constant="31" id="abg-h5-3Ml"/>
</constraints>
</stackView>
<stackView verifyAmbiguity="off" opaque="NO" contentMode="scaleToFill" ambiguous="YES" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="fqe-49-wG1">
<rect key="frame" x="15" y="1554" width="309.5" height="31"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Touch Point Tracking" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.64999997615814209" adjustsLetterSpacingToFitWidth="YES" adjustsFontForContentSizeCategory="YES" translatesAutoresizingMaskIntoConstraints="NO" id="BQ1-w6-Opg" userLabel="uiLabel">
<rect key="frame" x="0.0" y="0.0" width="159.5" height="31"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Kuk-hT-qqK">
<rect key="frame" x="179.5" y="0.0" width="132" height="31"/>
<constraints>
<constraint firstAttribute="width" constant="130" id="ChT-v3-Efs"/>
</constraints>
</switch>
</subviews>
<constraints>
<constraint firstAttribute="height" constant="31" id="1SY-3l-Q83"/>
</constraints>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
@@ -3054,6 +3074,8 @@
<outlet property="touchMoveEventIntervalStack" destination="zxb-vp-LNg" id="Nem-Bf-isy"/>
<outlet property="touchPointerVelocityFactorSlider" destination="MSY-s4-iCj" id="O1h-K2-fTT"/>
<outlet property="touchPointerVelocityFactorUILabel" destination="ECJ-bg-fRJ" id="9dF-Th-ARj"/>
<outlet property="trackTouchPointStack" destination="fqe-49-wG1" id="KV4-Z6-Z9d"/>
<outlet property="trackTouchPointSwitch" destination="Kuk-hT-qqK" id="k8Y-ej-TRP"/>
<outlet property="unlockDisplayOrientationSelector" destination="0gh-fD-6V5" id="Zwv-rN-soS"/>
<outlet property="unlockDisplayOrientationStack" destination="FKE-J4-bZB" id="Loj-SR-3XK"/>
<outlet property="useBuiltinMicStack" destination="lbL-2m-AO2" id="ZDm-aL-1cC"/>
+1
View File
@@ -110,6 +110,7 @@ typedef NS_ENUM(NSInteger, PencilTickMode) {
optimizeGames:(BOOL)optimizeGames
multiController:(BOOL)multiController
buttonVisualFeedback:(BOOL)buttonVisualFeedback
touchPointTracking:(BOOL)touchPointTracking
swapABXYButtons:(BOOL)swapABXYButtons
audioOnPC:(BOOL)audioOnPC
redirectMic:(BOOL)redirectMic
+3 -1
View File
@@ -81,7 +81,8 @@
showKeyboardToolbar:(BOOL)showKeyboardToolbar
optimizeGames:(BOOL)optimizeGames
multiController:(BOOL)multiController
buttonVisualFeedback:(BOOL)buttonVisualFeedback
buttonVisualFeedback:(BOOL)buttonVisualFeedback
touchPointTracking:(BOOL)touchPointTracking
swapABXYButtons:(BOOL)swapABXYButtons
audioOnPC:(BOOL)audioOnPC
redirectMic:(BOOL)redirectMic
@@ -160,6 +161,7 @@
settingsToSave.optimizeGames = optimizeGames;
settingsToSave.multiController = multiController;
settingsToSave.buttonVisualFeedback = buttonVisualFeedback;
settingsToSave.touchPointTracking = touchPointTracking;
settingsToSave.swapABXYButtons = swapABXYButtons;
settingsToSave.playAudioOnPC = audioOnPC;
settingsToSave.redirectMic = redirectMic;
+1
View File
@@ -60,6 +60,7 @@
@property (nonatomic, retain) NSNumber * asyncNativeTouchPriority;
@property (nonatomic) BOOL multiController;
@property (nonatomic) BOOL buttonVisualFeedback;
@property (nonatomic) BOOL touchPointTracking;
@property (nonatomic) BOOL swapABXYButtons;
@property (nonatomic) BOOL playAudioOnPC;
@property (nonatomic) BOOL redirectMic;
+1
View File
@@ -101,6 +101,7 @@
self.optimizeGames = settings.optimizeGames;
self.multiController = settings.multiController;
self.buttonVisualFeedback = settings.buttonVisualFeedback;
self.touchPointTracking = settings.touchPointTracking;
self.swapABXYButtons = settings.swapABXYButtons;
self.onscreenControls = settings.onscreenControls;
self.gyroMode = settings.gyroMode;
+47
View File
@@ -468,6 +468,10 @@ import SVGKit
self.hasComponent = self.isStickWheel
self.hasL3R3Indicator = !self.isStickWheel && !self.isDirectionPad && self.widgetType == WidgetTypeEnum.touchPad
self.hasTrackPoint = (CommandManager.vectorTouchPads.contains(self.touchPadString)
|| (self.widgetType == WidgetTypeEnum.button
&& (buttonMode == .slideAndHold || buttonMode == .slideToToggle)))
}
// ======================================================================================================
@@ -866,6 +870,7 @@ import SVGKit
if CommandManager.stickTouchPads.contains(touchPadString) {setupL3R3Indicator()}
if CommandManager.verticalTouchPads.contains(touchPadString) {setupL3R3Indicator()}
if CommandManager.mousePadWithButtonActions.contains(self.touchPadString) {setupL3R3Indicator()}
if self.hasTrackPoint {setupTrackPoint()}
if self.hasStickIndicator {
if self.crossMarkLayer.superlayer == nil {self.crossMarkLayer = createCrossMark()}
if self.lrudIndicatorBall.superlayer == nil {self.lrudIndicatorBall = createStickBall()}
@@ -905,6 +910,21 @@ import SVGKit
CATransaction.commit()
}
@objc var hasTrackPoint: Bool = false
@objc static var trackPointEnabled: Bool = false
private var trackPoint:CAShapeLayer = CAShapeLayer()
@objc public func setupTrackPoint() {
CATransaction.begin()
CATransaction.setDisableActions(true)
// 1. 创建圆形路径
trackPoint.removeFromSuperlayer()
trackPoint = GraphicUtils.makeTouchTrackpoint(in: self)
CATransaction.commit()
}
private func showl3r3Indicator(){
if OnScreenWidgetView.buttonVisualFeedbackEnabled {
CATransaction.begin()
@@ -1740,6 +1760,7 @@ import SVGKit
self.firstTouchMoved = false
self.tickFlag = 0
super.touchesBegan(touches, with: event)
self.isMultipleTouchEnabled = self.widgetType == WidgetTypeEnum.button || CommandManager.mousePadWithButtonActions.contains(self.touchPadString);
if !OnScreenWidgetView.editMode && self.touchPadString == "TRACKBALL" {
@@ -1863,6 +1884,16 @@ import SVGKit
OnScreenWidgetView.updateStreamViewGuidelines(for: self)
}
}
if self.hasTrackPoint, self.widgetType == .touchPad, OnScreenWidgetView.trackPointEnabled {
CATransaction.begin()
CATransaction.setDisableActions(true)
if let touch = touches.first {
trackPoint.isHidden = false
trackPoint.position = touch.location(in: self)
}
CATransaction.commit()
}
}
// here is in edit mode:
else{
@@ -2068,6 +2099,18 @@ import SVGKit
}
}
}
if self.hasTrackPoint, OnScreenWidgetView.trackPointEnabled {
if let touch = touches.first {
CATransaction.begin()
CATransaction.setDisableActions(true)
if trackPoint.isHidden {
trackPoint.isHidden = false
}
trackPoint.position = touch.location(in: self)
CATransaction.commit()
}
}
}
// Move the widgetView based on touch movement in relocation mode
@@ -2609,6 +2652,10 @@ import SVGKit
}
}
if self.hasTrackPoint, OnScreenWidgetView.trackPointEnabled {
trackPoint.isHidden = true
}
CATransaction.commit()
if OnScreenWidgetView.editMode {
+3 -1
View File
@@ -543,7 +543,7 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
- (void) reloadOnScreenWidgetViews:(bool)reload{
NSLog(@"reloadOnScreenWidgets in streamview %f", CACurrentMediaTime());
dispatch_async(dispatch_get_main_queue(), ^{
if(!self->oscProfileMan) self->oscProfileMan = [OSCProfilesManager sharedManager:self->_streamFrameTopLayerView.bounds];
OSCProfile *oscProfile = [self->oscProfileMan getSelectedProfile]; //returns the currently selected OSCProfile
@@ -626,6 +626,8 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
buttonState.sequence = widgetView.sequence;
oscProfile.buttonStatesEncoded[i] = [NSKeyedArchiver archivedDataWithRootObject:buttonState requiringSecureCoding:YES error:nil];
}
[widgetView accessWidgetAttributes];
}
else if(buttonState.widgetType == LegacyOnScreenControls) hasLegacyWidget = true;
}
@@ -104,6 +104,7 @@
<attribute name="touchMode" optional="YES" attributeType="Integer 16" defaultValueString="1" usesScalarValueType="NO" syncable="YES"/>
<attribute name="touchMoveEventInterval" optional="YES" attributeType="Integer 16" defaultValueString="320" usesScalarValueType="NO" syncable="YES"/>
<attribute name="touchPointerVelocityFactor" optional="YES" attributeType="Float" defaultValueString="1" usesScalarValueType="NO" syncable="YES"/>
<attribute name="touchPointTracking" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
<attribute name="uniqueId" attributeType="String" syncable="YES"/>
<attribute name="unlockDisplayOrientation" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
<attribute name="useBuiltinMic" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
+28 -4
View File
@@ -11,7 +11,7 @@ import Foundation
import SVGKit
@objc public class GraphicUtils: NSObject {
@objc public class func makeSVGLayer(
@objc public static func makeSVGLayer(
from file: String,
in container: CALayer,
at normalizedPosition: CGPoint = .zero,
@@ -35,7 +35,7 @@ import SVGKit
)
}
public class func makeCenteredSVGLayer(
public static func makeCenteredSVGLayer(
from svg: SVGKImage,
in container: CALayer,
targetSize: CGSize
@@ -47,7 +47,7 @@ import SVGKit
)
}
@objc public class func _makeSVGLayer(
@objc public static func _makeSVGLayer(
from svg: SVGKImage,
in container: CALayer,
at normalizedPosition: CGPoint = .zero,
@@ -106,11 +106,35 @@ import SVGKit
return wrappedLayer
}
@objc public class func changeColor(layer: CALayer, color: UIColor) {
@objc public static func changeColor(layer: CALayer, color: UIColor) {
if let shape = layer as? CAShapeLayer {
shape.fillColor = color.cgColor
shape.strokeColor = color.cgColor
}
layer.sublayers?.forEach { changeColor(layer: $0, color: color) }
}
@objc public static func makeTouchTrackpoint(in view:UIView) -> CAShapeLayer {
var trackPoint = CAShapeLayer()
let path = UIBezierPath(
arcCenter: CGPoint(x: 0, y: 0),
radius: Utils.isIPhone() ? 12 : 15,
startAngle: 0,
endAngle: CGFloat.pi * 2,
clockwise: true
)
trackPoint = CAShapeLayer()
trackPoint.path = path.cgPath
trackPoint.fillColor = UIColor.white.withAlphaComponent(0.3).cgColor
trackPoint.strokeColor = UIColor.clear.cgColor
trackPoint.lineWidth = 0
view.layer.addSublayer(trackPoint)
trackPoint.position = view.center
trackPoint.isHidden = true
return trackPoint
}
}
@@ -252,6 +252,8 @@
@property (weak, nonatomic) IBOutlet UIStackView *sdrPerformanceWorkaroundStack;
@property (weak, nonatomic) IBOutlet UISwitch *sdrPerformanceWorkaroundSwitch;
@property (weak, nonatomic) IBOutlet UIStackView *trackTouchPointStack;
@property (weak, nonatomic) IBOutlet UISwitch *trackTouchPointSwitch;
@property (strong, nonatomic) IBOutlet UIStackView *testStack;
@@ -822,6 +822,7 @@ BOOL isCustomResolution(int resolutionSelected) {
[self addSetting:self.mousePointerVelocityStack ofId:@"mousePointerVelocityStack" withInfoTag:NO withDynamicLabel:YES to:touchControlSection];
[self addSetting:self.onScreenWidgetStack ofId:@"onScreenWidgetStack" withInfoTag:YES withDynamicLabel:YES to:touchControlSection];
[self addSetting:self.buttonVisualFeedbackStack ofId:@"buttonVisualFeedbackStack" withInfoTag:NO withDynamicLabel:NO to:touchControlSection];
[self addSetting:self.trackTouchPointStack ofId:@"trackTouchPointStack" withInfoTag:NO withDynamicLabel:NO to:touchControlSection];
[touchControlSection addToParentStack:_parentStack];
// [touchAndControlSection setExpanded:NO];
@@ -1920,6 +1921,10 @@ BOOL isCustomResolution(int resolutionSelected) {
[self.multiControllerSwitch setOn:self->tempSettings.multiController];
[self.swapAbxySwitch setOn:self->tempSettings.swapABXYButtons];
[self.buttonVisualFeedbackSwitch setOn:self->tempSettings.buttonVisualFeedback];
[self.trackTouchPointSwitch setOn:self->tempSettings.touchPointTracking];
[self.trackTouchPointSwitch addTarget:self action:@selector(trackTouchPointSwitchFlipped:) forControlEvents:(UIControlEventValueChanged)]; // Update label display when slider is being moved.
[self.delayLeftClickSwitch setOn:self->tempSettings.delayLeftClick];
[self.hapticEngineSelector setSelectedSegmentIndex:self->tempSettings.hapticEngine.intValue];
@@ -2997,6 +3002,10 @@ BOOL isCustomResolution(int resolutionSelected) {
[self handleOswGestureChange];
}
- (void)trackTouchPointSwitchFlipped:(UISwitch *)sender{
OnScreenWidgetView.trackPointEnabled = sender.isOn;
}
- (BOOL)manuallyChangedFPS {
NSString *key = @"manuallyChangedFPS";
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
@@ -3571,6 +3580,7 @@ BOOL isCustomResolution(int resolutionSelected) {
BOOL multiController = self.multiControllerSwitch.isOn;
BOOL swapABXYButtons = self.swapAbxySwitch.isOn;
BOOL buttonVisualFeedback = self.buttonVisualFeedbackSwitch.isOn;
BOOL touchPointTracking = self.trackTouchPointSwitch.isOn;
NSInteger gyroMode = self.gyroModeSelector.selectedSegmentIndex;
NSInteger emulatedControllerType = [self segmentIndexToControllerType:self.emulatedControllerTypeSelector.selectedSegmentIndex]; //self.emulatedControllerTypeSelector.selectedSegmentIndex;
BOOL audioOnPC = self.audioOnPcSwitch.isOn;
@@ -3648,6 +3658,7 @@ BOOL isCustomResolution(int resolutionSelected) {
optimizeGames:optimizeGames
multiController:multiController
buttonVisualFeedback:buttonVisualFeedback
touchPointTracking:touchPointTracking
swapABXYButtons:swapABXYButtons
audioOnPC:audioOnPC
redirectMic:redirectMic
@@ -392,6 +392,7 @@
bool onScreenWidgetSwitched = previousOnScreenWidgetEnabled != [_streamView isOnScreenWidgetEnabled];
bool needReload = onScreenWidgetSwitched && !previousOnScreenWidgetEnabled;
OnScreenWidgetView.trackPointEnabled = _settings.touchPointTracking;
[_streamView reloadOnScreenWidgetViews:_viewJustLoaded||reloadOnscreenWidgets||needReload]; //reload keyboard buttons here. the keyboard widget view will be added to the streamframe view instead streamview, the highest layer, which saves a lot of reengineering
if(onScreenWidgetSwitched && previousOnScreenWidgetEnabled) [_streamView clearOnScreenWidgets];
+30
View File
@@ -343,6 +343,36 @@
}
}
},
"5q5-ug-Fg4.text" : {
"comment" : "Class = \"UILabel\"; text = \"Touch Point Tracking\"; ObjectID = \"5q5-ug-Fg4\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Touch Point Tracking"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "触点跟踪"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "觸點追蹤"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "觸點追蹤"
}
}
}
},
"6Cy-aH-DXp.text" : {
"comment" : "Class = \"UILabel\"; text = \"Curve Exponent\"; ObjectID = \"6Cy-aH-DXp\";",
"extractionState" : "extracted_with_value",
+30
View File
@@ -1483,6 +1483,36 @@
}
}
},
"BQ1-w6-Opg.text" : {
"comment" : "Class = \"UILabel\"; text = \"Touch Point Tracking\"; ObjectID = \"BQ1-w6-Opg\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Touch Point Tracking"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "触点跟踪"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "觸點追蹤"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "觸點追蹤"
}
}
}
},
"bsU-vw-dTl.text" : {
"comment" : "Class = \"UILabel\"; text = \"Slide Distance Threshold\"; ObjectID = \"bsU-vw-dTl\";",
"extractionState" : "extracted_with_value",