improved displacement based stick pads

This commit is contained in:
True Zhuanjia
2026-05-08 21:05:03 +08:00
parent 26c1d068a8
commit d7aa5cc9fc
11 changed files with 922 additions and 393 deletions
+52 -17
View File
@@ -2680,7 +2680,7 @@
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="z5Q-bW-WQ8" userLabel="widgetPanelStack" customClass="WidgetPanelStackView">
<rect key="frame" x="325" y="156" width="650" height="1346"/>
<rect key="frame" x="325" y="156" width="650" height="1382"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Profile:" textAlignment="center" lineBreakMode="tailTruncation" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iel-xl-xd9">
<rect key="frame" x="0.0" y="0.0" width="650" height="37"/>
@@ -3166,8 +3166,41 @@
</label>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="myx-a8-eVV">
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9Kg-Tx-U0B">
<rect key="frame" x="0.0" y="931" width="650" height="31"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Anchor point" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Dg1-VH-R6r" userLabel="uiLabel">
<rect key="frame" x="0.0" y="0.0" width="130" height="31"/>
<constraints>
<constraint firstAttribute="width" constant="130" id="fn2-dO-8Tr"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<segmentedControl opaque="NO" alpha="0.76999998092651367" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="PSA-W8-aR5">
<rect key="frame" x="130" y="0.0" width="220" height="32"/>
<color key="backgroundColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<segments>
<segment title="center"/>
<segment title="touch point"/>
</segments>
<color key="tintColor" systemColor="systemGray3Color"/>
<color key="selectedSegmentTintColor" red="0.23087820410000001" green="0.4576539993" blue="0.51765710119999997" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
</segmentedControl>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SGI-KP-r0G" userLabel="uiLabel">
<rect key="frame" x="350" y="0.0" width="300" height="31"/>
<constraints>
<constraint firstAttribute="width" constant="300" id="aPd-2v-I4b"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="myx-a8-eVV">
<rect key="frame" x="0.0" y="967" width="650" height="31"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Animated" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="T3N-f5-q9Y" userLabel="uiLabel">
<rect key="frame" x="0.0" y="0.0" width="130" height="31"/>
@@ -3200,7 +3233,7 @@
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="KSh-xS-xfD">
<rect key="frame" x="0.0" y="967" width="650" height="34"/>
<rect key="frame" x="0.0" y="1003" width="650" height="34"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Alpha" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yF0-Tu-L8X">
<rect key="frame" x="0.0" y="0.0" width="160" height="34"/>
@@ -3222,7 +3255,7 @@
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Wxc-0O-tca">
<rect key="frame" x="0.0" y="1006" width="650" height="34"/>
<rect key="frame" x="0.0" y="1042" width="650" height="34"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Border width" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wTH-1Z-Fgh">
<rect key="frame" x="0.0" y="0.0" width="160" height="34"/>
@@ -3244,7 +3277,7 @@
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="O0O-pZ-URe" userLabel="Bulk Label Alpha Stack">
<rect key="frame" x="0.0" y="1045" width="650" height="34"/>
<rect key="frame" x="0.0" y="1081" width="650" height="34"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label alpha" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kSX-ci-kx5">
<rect key="frame" x="0.0" y="0.0" width="160" height="34"/>
@@ -3266,7 +3299,7 @@
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rfr-nL-OCc">
<rect key="frame" x="0.0" y="1084" width="650" height="34"/>
<rect key="frame" x="0.0" y="1120" width="650" height="34"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Border alpha" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sAF-Vy-ZzK">
<rect key="frame" x="0.0" y="0.0" width="160" height="34"/>
@@ -3288,7 +3321,7 @@
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="X7d-dV-lHa">
<rect key="frame" x="0.0" y="1123" width="650" height="34"/>
<rect key="frame" x="0.0" y="1159" width="650" height="34"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Highlight alpha" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1sF-08-aCr">
<rect key="frame" x="0.0" y="0.0" width="160" height="34"/>
@@ -3310,7 +3343,7 @@
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nBA-Ii-jNy">
<rect key="frame" x="0.0" y="1162" width="650" height="34"/>
<rect key="frame" x="0.0" y="1198" width="650" height="34"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Highlight size" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hKK-ro-C5E">
<rect key="frame" x="0.0" y="0.0" width="160" height="34"/>
@@ -3332,7 +3365,7 @@
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ASP-yY-swx">
<rect key="frame" x="0.0" y="1201" width="650" height="34"/>
<rect key="frame" x="0.0" y="1237" width="650" height="34"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Auto dock timer" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KKW-Q7-0tg">
<rect key="frame" x="0.0" y="0.0" width="160" height="34"/>
@@ -3354,7 +3387,7 @@
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3dC-9Z-wKV">
<rect key="frame" x="0.0" y="1240" width="650" height="34"/>
<rect key="frame" x="0.0" y="1276" width="650" height="34"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Docked alpha" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qFn-D7-7aD">
<rect key="frame" x="0.0" y="0.0" width="160" height="34"/>
@@ -3376,7 +3409,7 @@
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FEI-wQ-Q3w">
<rect key="frame" x="0.0" y="1279" width="650" height="31"/>
<rect key="frame" x="0.0" y="1315" width="650" height="31"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Collected widgets " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.20000000000000001" translatesAutoresizingMaskIntoConstraints="NO" id="WLg-7a-5wu" userLabel="uiLabel">
<rect key="frame" x="0.0" y="0.0" width="130" height="31"/>
@@ -3425,7 +3458,7 @@
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="K9t-Ky-bWg">
<rect key="frame" x="0.0" y="1315" width="650" height="31"/>
<rect key="frame" x="0.0" y="1351" width="650" height="31"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aBW-x7-cFd">
<rect key="frame" x="0.0" y="0.0" width="330" height="31"/>
@@ -3613,6 +3646,8 @@
<size key="freeformSize" width="1300" height="1500"/>
<connections>
<outlet property="addButton" destination="fKN-ja-TRi" id="R2n-QF-aSj"/>
<outlet property="anchorModeSelector" destination="PSA-W8-aR5" id="8Et-5Y-7oF"/>
<outlet property="anchorModeStack" destination="9Kg-Tx-U0B" id="0Np-Fw-grV"/>
<outlet property="animatedSelector" destination="jfo-6M-aEl" id="7TR-57-TNW"/>
<outlet property="animatedStack" destination="myx-a8-eVV" id="Yia-h0-vCn"/>
<outlet property="autoDockTimerLabel" destination="KKW-Q7-0tg" id="rBe-Kv-6R8"/>
@@ -3835,22 +3870,22 @@
<image name="tray.full.fill" catalog="system" width="128" height="88"/>
<image name="video.and.waveform" catalog="system" width="128" height="94"/>
<systemColor name="linkColor">
<color red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.0" green="0.47843137254901963" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemBrownColor">
<color red="0.63529411759999999" green="0.51764705879999995" blue="0.36862745099999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.67450980392156867" green="0.49803921568627452" blue="0.36862745098039218" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemGray3Color">
<color red="0.78039215689999997" green="0.78039215689999997" blue="0.80000000000000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.7803921568627451" green="0.7803921568627451" blue="0.80000000000000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemGray5Color">
<color red="0.8980392157" green="0.8980392157" blue="0.91764705879999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.89803921568627454" green="0.89803921568627454" blue="0.91764705882352937" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemTealColor">
<color red="0.18823529410000001" green="0.69019607839999997" blue="0.78039215689999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color red="0.0" green="0.76470588235294112" blue="0.81568627450980391" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>
+59 -21
View File
@@ -155,10 +155,10 @@
<rect key="frame" x="515" y="190" width="410" height="45"/>
<subviews>
<stackView opaque="NO" contentMode="scaleAspectFill" distribution="fillEqually" alignment="center" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="4he-pe-kYB">
<rect key="frame" x="0.0" y="-2.5" width="410" height="50"/>
<rect key="frame" x="0.0" y="-2.5" width="1300" height="50"/>
<subviews>
<button opaque="NO" tag="40" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="fill" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="nHH-6h-4D1" userLabel="Exit">
<rect key="frame" x="0.0" y="9.5" width="50" height="31"/>
<rect key="frame" x="0.0" y="9.5" width="177" height="31"/>
<constraints>
<constraint firstAttribute="width" constant="50" id="sBF-hd-nF8"/>
</constraints>
@@ -174,7 +174,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Pdg-l4-BvF" userLabel="Undo">
<rect key="frame" x="60" y="0.0" width="50" height="50"/>
<rect key="frame" x="187" y="0.0" width="177.5" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="7KW-Xe-OEK"/>
<constraint firstAttribute="width" constant="50" id="gHD-A0-AVS"/>
@@ -191,7 +191,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rXW-Ms-2cJ" userLabel="Load">
<rect key="frame" x="120" y="0.0" width="50" height="50"/>
<rect key="frame" x="374.5" y="0.0" width="177" height="50"/>
<constraints>
<constraint firstAttribute="width" constant="50" id="91g-27-mVH"/>
<constraint firstAttribute="height" constant="50" id="kRj-b6-Bx1"/>
@@ -207,7 +207,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="LPA-ea-YHC" userLabel="Save">
<rect key="frame" x="180" y="0.0" width="50" height="50"/>
<rect key="frame" x="561.5" y="0.0" width="177" height="50"/>
<constraints>
<constraint firstAttribute="width" constant="50" id="Lot-pn-o60"/>
<constraint firstAttribute="height" constant="50" id="uWO-So-qxr"/>
@@ -223,7 +223,7 @@
</connections>
</button>
<button opaque="NO" tag="20" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dhG-Fo-0GK" userLabel="Trash">
<rect key="frame" x="240" y="0.0" width="50" height="50"/>
<rect key="frame" x="748.5" y="0.0" width="177" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="0vV-wV-Efz"/>
<constraint firstAttribute="width" constant="50" id="j9W-Ja-bVn"/>
@@ -239,7 +239,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Up4-28-sgF" userLabel="Add">
<rect key="frame" x="300" y="0.0" width="50" height="50"/>
<rect key="frame" x="935.5" y="0.0" width="177.5" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="rWU-US-9dl"/>
<constraint firstAttribute="width" constant="50" id="wWj-wB-MRd"/>
@@ -254,7 +254,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4pE-po-Zn1" userLabel="Edit">
<rect key="frame" x="360" y="0.0" width="50" height="50"/>
<rect key="frame" x="1123" y="0.0" width="177" height="50"/>
<constraints>
<constraint firstAttribute="width" constant="50" id="oFn-jm-orG"/>
<constraint firstAttribute="height" constant="50" id="sls-Vh-uxz"/>
@@ -273,7 +273,7 @@
</subviews>
</stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Zll-IP-PFt" userLabel="Chevron View">
<rect key="frame" x="179" y="45" width="52" height="25"/>
<rect key="frame" x="624" y="45" width="52" height="25"/>
<subviews>
<imageView clipsSubviews="YES" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ChevronCompactUp" translatesAutoresizingMaskIntoConstraints="NO" id="76O-3K-aa8">
<rect key="frame" x="0.0" y="0.0" width="52" height="25"/>
@@ -302,7 +302,7 @@
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" misplaced="YES" axis="vertical" spacing="7" translatesAutoresizingMaskIntoConstraints="NO" id="BVp-3O-vZ7" userLabel="widgetPanelStack" customClass="WidgetPanelStackView">
<rect key="frame" x="445" y="226" width="550" height="1137"/>
<rect key="frame" x="445" y="226" width="550" height="1164"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Profile:" textAlignment="center" lineBreakMode="tailTruncation" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="f46-Pt-0Pv">
<rect key="frame" x="0.0" y="0.0" width="550" height="28"/>
@@ -876,8 +876,44 @@
<constraint firstAttribute="height" constant="20" id="Vgj-B6-LEU"/>
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Lb6-lO-56d">
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YKa-Gv-UsK">
<rect key="frame" x="0.0" y="847" width="550" height="20"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Anchor point" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nh7-NY-D4z" userLabel="uilabel">
<rect key="frame" x="0.0" y="0.0" width="120" height="20"/>
<constraints>
<constraint firstAttribute="width" constant="120" id="MMk-1S-Nz6"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<segmentedControl opaque="NO" alpha="0.76999998092651367" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" apportionsSegmentWidthsByContent="YES" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="wCf-6a-2ln">
<rect key="frame" x="120" y="0.0" width="170" height="21"/>
<color key="backgroundColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<segments>
<segment title="center"/>
<segment title="touch point"/>
</segments>
<color key="tintColor" systemColor="systemGray3Color"/>
<color key="selectedSegmentTintColor" red="0.23087820410000001" green="0.4576539993" blue="0.51765710119999997" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
</segmentedControl>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0uj-DT-rHT" userLabel="uiLabel">
<rect key="frame" x="290" y="0.0" width="260" height="20"/>
<constraints>
<constraint firstAttribute="width" constant="260" id="hhj-IW-pMU"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstAttribute="height" constant="20" id="xAf-bw-vVt"/>
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Lb6-lO-56d">
<rect key="frame" x="0.0" y="874" width="550" height="20"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Animated" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="o1c-Cn-WwN" userLabel="uilabel">
<rect key="frame" x="0.0" y="0.0" width="120" height="20"/>
@@ -913,7 +949,7 @@
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="t6L-J9-AMW">
<rect key="frame" x="0.0" y="874" width="550" height="20"/>
<rect key="frame" x="0.0" y="901" width="550" height="20"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Alpha" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MgK-KI-3y7">
<rect key="frame" x="0.0" y="0.0" width="160" height="20"/>
@@ -935,7 +971,7 @@
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="eem-2H-ekN">
<rect key="frame" x="0.0" y="901" width="550" height="20"/>
<rect key="frame" x="0.0" y="928" width="550" height="20"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Border width" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TFq-Un-O3H">
<rect key="frame" x="0.0" y="0.0" width="160" height="20"/>
@@ -957,7 +993,7 @@
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YB4-fc-lM6">
<rect key="frame" x="0.0" y="928" width="550" height="20"/>
<rect key="frame" x="0.0" y="955" width="550" height="20"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label alpha" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9Dr-3c-z61">
<rect key="frame" x="0.0" y="0.0" width="160" height="20"/>
@@ -979,7 +1015,7 @@
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8tb-mS-WEu">
<rect key="frame" x="0.0" y="955" width="550" height="20"/>
<rect key="frame" x="0.0" y="982" width="550" height="20"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Border alpha" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eRy-My-vvU">
<rect key="frame" x="0.0" y="0.0" width="160" height="20"/>
@@ -1001,7 +1037,7 @@
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cJk-PA-Lp0">
<rect key="frame" x="0.0" y="982" width="550" height="20"/>
<rect key="frame" x="0.0" y="1009" width="550" height="20"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Highlight alpha" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4Kd-Cc-aYN">
<rect key="frame" x="0.0" y="0.0" width="160" height="20"/>
@@ -1023,7 +1059,7 @@
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Sxm-3C-Jlo">
<rect key="frame" x="0.0" y="1009" width="550" height="20"/>
<rect key="frame" x="0.0" y="1036" width="550" height="20"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Highlight size" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hme-2d-8d6">
<rect key="frame" x="0.0" y="0.0" width="160" height="20"/>
@@ -1045,7 +1081,7 @@
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BBR-0E-XE9">
<rect key="frame" x="0.0" y="1036" width="550" height="20"/>
<rect key="frame" x="0.0" y="1063" width="550" height="20"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Auto dock timer" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="F8T-uC-SAR">
<rect key="frame" x="0.0" y="0.0" width="160" height="20"/>
@@ -1067,7 +1103,7 @@
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="n71-jv-Ziw">
<rect key="frame" x="0.0" y="1063" width="550" height="20"/>
<rect key="frame" x="0.0" y="1090" width="550" height="20"/>
<subviews>
<label verifyAmbiguity="off" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Docked alpha" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kxI-bn-pRU">
<rect key="frame" x="0.0" y="0.0" width="160" height="20"/>
@@ -1090,7 +1126,7 @@
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="weV-Li-Itz">
<rect key="frame" x="0.0" y="1090" width="550" height="20"/>
<rect key="frame" x="0.0" y="1117" width="550" height="20"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Collected Widgets " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.10000000000000001" translatesAutoresizingMaskIntoConstraints="NO" id="kek-77-Kmg" userLabel="uilabel">
<rect key="frame" x="0.0" y="0.0" width="120" height="20"/>
@@ -1139,7 +1175,7 @@
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IWg-XO-cff">
<rect key="frame" x="0.0" y="1117" width="550" height="20"/>
<rect key="frame" x="0.0" y="1144" width="550" height="20"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="MZj-th-E9Z">
<rect key="frame" x="0.0" y="0.0" width="284" height="20"/>
@@ -1288,6 +1324,8 @@
</view>
<size key="freeformSize" width="1300" height="1800"/>
<connections>
<outlet property="anchorModeSelector" destination="wCf-6a-2ln" id="607-Yp-hHq"/>
<outlet property="anchorModeStack" destination="YKa-Gv-UsK" id="i1U-3v-V1b"/>
<outlet property="animatedSelector" destination="4Zz-qG-bsx" id="c9f-xU-3wh"/>
<outlet property="animatedStack" destination="Lb6-lO-56d" id="QMO-UJ-fgf"/>
<outlet property="autoDockTimerLabel" destination="F8T-uC-SAR" id="C8g-rg-Wge"/>
@@ -462,7 +462,6 @@ static CGRect layoutViewBounds;
buttonState.bulkMoveEnabled = widgetView.bulkMoveEnabled;
buttonState.widthFactor = [self normalizeSizeWidthFactorWith:widgetView];
buttonState.heightFactor = [self normalizeSizeHeightFactorWith:widgetView];
buttonState.componentSizeFactor = [self normalizeComponentSizeFactorWith:widgetView];
buttonState.backgroundAlpha = widgetView.originalBackgroundAlpha;
buttonState.labelAlpha = widgetView.originalLabelAlpha;
buttonState.borderAlpha = widgetView.borderAlpha;
@@ -473,7 +472,6 @@ static CGRect layoutViewBounds;
buttonState.vibrationStyle = widgetView.vibrationStyle;
buttonState.mouseButtonAction = widgetView.mouseButtonAction;
buttonState.animatesTransition = widgetView.animatesTransition;
buttonState.sensitivityFactorX = widgetView.sensitivityFactorX;
buttonState.sensitivityFactorY = widgetView.sensitivityFactorY;
buttonState.slideThreshold = widgetView.slideThreshold;
buttonState.yawFactor = widgetView.yawFactor;
@@ -481,7 +479,6 @@ static CGRect layoutViewBounds;
buttonState.rollFactor = widgetView.rollFactor;
buttonState.decelerationRateX = widgetView.decelerationRateX;
buttonState.decelerationRateY = widgetView.decelerationRateY;
buttonState.stickIndicatorOffset = widgetView.stickIndicatorOffset;
buttonState.widgetShape = widgetView.shape;
buttonState.walkModeThreshold = widgetView.dWheelWalkModeThreshold;
buttonState.minStickOffset = widgetView.minStickOffset;
@@ -490,6 +487,11 @@ static CGRect layoutViewBounds;
buttonState.sprintKeyThreshold = widgetView.sprintKeyThreshold;
buttonState.walkKeyActionType = widgetView.walkKeyActionType;
buttonState.walkKeyThreshold = widgetView.walkKeyThreshold;
///
buttonState.sensitivityFactorX = widgetView.sensitivityFactorX;
buttonState.componentSizeFactor = [self normalizeComponentSizeFactorWith:widgetView];
buttonState.touchPointAnchored = widgetView.touchPointAnchored;
buttonState.stickIndicatorOffset = widgetView.stickIndicatorOffset;
NSData *buttonStateEncoded = [NSKeyedArchiver archivedDataWithRootObject:buttonState requiringSecureCoding:YES error:nil];
[buttonStatesEncoded addObject: buttonStateEncoded];
@@ -516,7 +518,8 @@ static CGRect layoutViewBounds;
}
- (CGFloat)normalizeComponentSizeFactorWith:(OnScreenWidgetView* )widget{
if(widget.isStickWheel) {
if(widget.isStickWheel
|| widget.isDisplacementBasedStickPad) {
return widget.denormalizedComponentSizeFactor*widget.baselineDiameter/[self getReferenceLen] * 10000;
}
return 1;
@@ -51,6 +51,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) CGFloat rollFactor; // for OnScreenWidgetView
@property (nonatomic, assign) CGFloat decelerationRateX; // for OnScreenWidgetView
@property (nonatomic, assign) CGFloat decelerationRateY; // for OnScreenWidgetView
@property (nonatomic, assign) bool touchPointAnchored;
@property (nonatomic, assign) CGFloat stickIndicatorOffset; // for OnScreenWidgetView
@property (nonatomic, assign) CGFloat walkModeThreshold; // for OnScreenWidgetView
@property (nonatomic, assign) CGFloat minStickOffset; // for OnScreenWidgetView
@@ -62,6 +62,7 @@
[encoder encodeFloat:self.rollFactor forKey:@"rollFactor"];
[encoder encodeFloat:self.decelerationRateX forKey:@"decelerationRateX"];
[encoder encodeFloat:self.decelerationRateY forKey:@"decelerationRateY"];
[encoder encodeBool:self.touchPointAnchored forKey:@"touchPointAnchored"];
[encoder encodeFloat:self.stickIndicatorOffset forKey:@"stickIndicatorOffset"];
[encoder encodeFloat:self.oscLayerSizeFactor forKey:@"oscLayerSizeFactor"];
[encoder encodeFloat:self.backgroundAlpha forKey:@"backgroundAlpha"];
@@ -112,6 +113,7 @@
self.rollFactor = [decoder containsValueForKey:@"rollFactor"] ? [decoder decodeFloatForKey:@"rollFactor"] : 1.0;
self.decelerationRateX = [decoder containsValueForKey:@"decelerationRateX"] ? [decoder decodeFloatForKey:@"decelerationRateX"] : 0.5;
self.decelerationRateY = [decoder containsValueForKey:@"decelerationRateY"] ? [decoder decodeFloatForKey:@"decelerationRateY"] : 0.5;
self.touchPointAnchored = [decoder containsValueForKey:@"touchPointAnchored"] ? [decoder decodeBoolForKey:@"touchPointAnchored"] : false;
self.stickIndicatorOffset = [decoder decodeFloatForKey:@"stickIndicatorOffset"];
self.oscLayerSizeFactor = [decoder decodeFloatForKey:@"oscLayerSizeFactor"];
self.backgroundAlpha = [decoder containsValueForKey:@"backgroundAlpha"] ? [decoder decodeFloatForKey:@"backgroundAlpha"] : 0.5;
File diff suppressed because it is too large Load Diff
+6 -1
View File
@@ -777,7 +777,12 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
[widgetView tweakHighlightAlphaWithAlpha:buttonState.highlightAlpha];
[widgetView setupAutoTapTimer];
[widgetView setupInertialScrollerWithFps:self->settings.framerate.intValue];
///
widgetView.sensitivityFactorX = buttonState.sensitivityFactorX;
widgetView.componentSizeFactor = buttonState.componentSizeFactor;
widgetView.touchPointAnchored = buttonState.touchPointAnchored;
widgetView.stickIndicatorOffset = buttonState.stickIndicatorOffset;
[widgetView setupAtrributedText];
if(widgetView.isFolder && widgetView.parentSequence<0 && widgetView.autoDockIdleDuration>0) [widgetView setAutoDockWithEnabled:true];
+6
View File
@@ -365,3 +365,9 @@ extension UIView {
return nil
}
}
extension CGPoint {
var isValid: Bool {
x.isFinite && y.isFinite
}
}
@@ -19,7 +19,7 @@ private extension LocalizationHelper {
}
@objcMembers
final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidgetView.OnScreenWidgetGuidelineUpdateDelegate, UITextFieldDelegate {
final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidgetView.OnScreenWidgetLayoutUpdateDelegate, UITextFieldDelegate {
private enum AlphaSliderMode: Int {
case widgetAlpha
case labelAlpha
@@ -71,6 +71,9 @@ final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidg
@IBOutlet weak var stickIndicatorOffsetLabel: UILabel!
@IBOutlet weak var stickIndicatorOffsetSlider: UISlider!
@IBOutlet weak var stickIndicatorOffsetStack: UIStackView!
@IBOutlet weak var anchorModeStack: UIStackView!
@IBOutlet weak var anchorModeSelector: UISegmentedControl!
@IBOutlet weak var sensitivityXLabel: UILabel!
@IBOutlet weak var sensitivityXSlider: UISlider!
@@ -397,18 +400,16 @@ final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidg
widgetView.folded = buttonState.folded
widgetView.revealMode = RevealMode(rawValue: Int(buttonState.revealMode)) ?? .coexist
widgetView.bulkMoveEnabled = buttonState.bulkMoveEnabled
widgetView.guidelineDelegate = self
widgetView.layoutUpdateDelegate = self
widgetView.translatesAutoresizingMaskIntoConstraints = false
widgetView.widthFactor = buttonState.widthFactor
widgetView.heightFactor = buttonState.heightFactor
widgetView.componentSizeFactor = buttonState.componentSizeFactor
widgetView.borderWidth = buttonState.borderWidth
widgetView.highlightSizeFactor = buttonState.highlightSizeFactor
widgetView.autoTapInterval = Int(buttonState.autoTapInterval)
widgetView.setVibration(style: Int(buttonState.vibrationStyle))
widgetView.mouseButtonAction = MouseButtonAction(rawValue: Int(buttonState.mouseButtonAction)) ?? .hovering
widgetView.animatesTransition = buttonState.animatesTransition
widgetView.sensitivityFactorX = buttonState.sensitivityFactorX
widgetView.sensitivityFactorY = buttonState.sensitivityFactorY
widgetView.slideThreshold = buttonState.slideThreshold
widgetView.yawFactor = buttonState.yawFactor
@@ -416,7 +417,6 @@ final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidg
widgetView.rollFactor = buttonState.rollFactor
widgetView.decelerationRateX = buttonState.decelerationRateX
widgetView.decelerationRateY = buttonState.decelerationRateY
widgetView.stickIndicatorOffset = buttonState.stickIndicatorOffset
widgetView.dWheelWalkModeThreshold = buttonState.walkModeThreshold
widgetView.minStickOffset = buttonState.minStickOffset
widgetView.buttonMode = ButtonMode(rawValue: Int(buttonState.buttonMode)) ?? .slideToToggle
@@ -435,6 +435,12 @@ final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidg
widgetView.tweakBorderAlpha(alpha: buttonState.borderAlpha)
widgetView.tweakHighlightAlpha(alpha: buttonState.highlightAlpha)
widgetView.adjustBorder(width: buttonState.borderWidth)
///
widgetView.sensitivityFactorX = buttonState.sensitivityFactorX
widgetView.componentSizeFactor = buttonState.componentSizeFactor
widgetView.touchPointAnchored = buttonState.touchPointAnchored
widgetView.stickIndicatorOffset = buttonState.stickIndicatorOffset
self.onScreenWidgetViews.add(widgetView)
guard let folder = folder else { continue }
@@ -714,8 +720,8 @@ final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidg
private func hideStickIndicators() {
for case let widget as OnScreenWidgetView in view.subviews {
widget.crossMarkLayer.isHidden = true
widget.lrudIndicatorBall.isHidden = true
widget.stickAnchorLayer.isHidden = true
widget.anchorBall.isHidden = true
}
}
@@ -743,7 +749,7 @@ final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidg
widget.buttonDownVisualEffectLayer.isHidden = !OnScreenWidgetView.isTweakingHighlight
widget.l3r3Indicator.isHidden = !widget.hasL3R3Indicator || !OnScreenWidgetView.isTweakingHighlight
let hidden = !widget.isDirectionPad && !OnScreenWidgetView.isTweakingHighlight
widget.lrudIndicatorBall.isHidden = hidden
widget.anchorBall.isHidden = hidden
widget.upIndicator.isHidden = hidden
widget.downIndicator.isHidden = hidden
widget.leftIndicator.isHidden = hidden
@@ -803,7 +809,7 @@ final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidg
}
private func refreshPanelForSelectedWidget(_ widgetView: OnScreenWidgetView) {
hideStickIndicators()
// hideStickIndicators()
clearSickInput()
enableCommonWidgetTools()
widgetViewSelected = true
@@ -923,8 +929,8 @@ final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidg
autoFitLabel(rollFactorLabel)
}
stickIndicatorOffsetStack.isHidden = !widgetView.hasStickIndicator
if widgetView.hasStickIndicator {
stickIndicatorOffsetStack.isHidden = !widgetView.hasStickIndicatorOffset
if widgetView.hasStickIndicatorOffset {
hideStickIndicators()
widgetView.touchBeganLocation = CGPoint(x: widgetView.frame.width / 2, y: widgetView.frame.height / 4)
widgetView.showStickIndicator()
@@ -933,6 +939,12 @@ final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidg
autoFitLabel(stickIndicatorOffsetLabel)
}
anchorModeStack.isHidden = !widgetView.hasAnchorMode
if !anchorModeStack.isHidden {
anchorModeSelector.selectedSegmentIndex = widgetView.touchPointAnchored ? 1 : 0
autoFitLabel(stickIndicatorOffsetLabel)
}
widgetSizeSlider.value = Float(widgetView.denormalizedWidthFactor)
widgetSizeLabel.text = LocalizationHelper.localizedString(forKey: "Size: %.2f", widgetView.denormalizedWidthFactor)
autoFitLabel(widgetSizeLabel)
@@ -1206,15 +1218,13 @@ final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidg
newWidget.autoDockSettledAlpha = widget.autoDockSettledAlpha
newWidget.revealMode = widget.revealMode
newWidget.bulkMoveEnabled = widget.bulkMoveEnabled
newWidget.guidelineDelegate = self
newWidget.layoutUpdateDelegate = self
newWidget.translatesAutoresizingMaskIntoConstraints = false
newWidget.widthFactor = widget.widthFactor
newWidget.heightFactor = widget.heightFactor
newWidget.componentSizeFactor = widget.componentSizeFactor
newWidget.borderWidth = widget.borderWidth
newWidget.highlightSizeFactor = widget.highlightSizeFactor
newWidget.autoTapInterval = widget.autoTapInterval
newWidget.sensitivityFactorX = widget.sensitivityFactorX
newWidget.sensitivityFactorY = widget.sensitivityFactorY
newWidget.slideThreshold = widget.slideThreshold
newWidget.yawFactor = widget.yawFactor
@@ -1222,7 +1232,6 @@ final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidg
newWidget.rollFactor = widget.rollFactor
newWidget.decelerationRateX = widget.decelerationRateX
newWidget.decelerationRateY = widget.decelerationRateY
newWidget.stickIndicatorOffset = widget.stickIndicatorOffset
newWidget.dWheelWalkModeThreshold = widget.dWheelWalkModeThreshold
newWidget.minStickOffset = widget.minStickOffset
newWidget.setVibration(style: Int(widget.vibrationStyle))
@@ -1237,6 +1246,10 @@ final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidg
guard newWidget.widgetType == widget.widgetType else { return }
view.insertSubview(newWidget, belowSubview: widgetPanelStack)
newWidget.accessWidgetAttributes()
newWidget.sensitivityFactorX = widget.sensitivityFactorX
newWidget.componentSizeFactor = widget.componentSizeFactor
newWidget.touchPointAnchored = widget.touchPointAnchored
newWidget.stickIndicatorOffset = widget.stickIndicatorOffset
if createNew {
newWidget.setLocation(position: CGPoint(x: 90, y: 130))
@@ -1276,12 +1289,14 @@ final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidg
widgetView.isHidden = true
widgetView.sequence = widgetView.getAvailableSequence()
OnScreenWidgetView.set(widget: widgetView, for: widgetView.sequence)
widgetView.guidelineDelegate = self
widgetView.layoutUpdateDelegate = self
widgetView.translatesAutoresizingMaskIntoConstraints = false
onScreenWidgetViews.add(widgetView)
widgetView.setLocation(position: CGPoint(x: 90, y: 130))
widgetView.isHidden = false
widgetView.resizeWidgetView()
let componentSizeFactor = widgetView.componentSizeFactor
widgetView.componentSizeFactor = componentSizeFactor
widgetView.setVibration(style: Int(UIImpactFeedbackGenerator.FeedbackStyle.light.rawValue))
}
@@ -1777,11 +1792,14 @@ final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidg
decelerationRateSlider.addTarget(self, action: #selector(decelerationRateSliderMoved(_:)), for: .valueChanged)
decelerationRateLabel.text = LocalizationHelper.localizedString(forKey: "Deceleration Rate")
decelerationRateStack.isHidden = true
stickIndicatorOffsetSlider.addTarget(self, action: #selector(stickIndicatorOffsetSliderMoved(_:)), for: .valueChanged)
stickIndicatorOffsetLabel.text = LocalizationHelper.localizedString(forKey: "Indicator offset")
stickIndicatorOffsetStack.isHidden = true
anchorModeSelector.addTarget(self, action: #selector(anchorModeChanged(_:)), for: .valueChanged)
anchorModeStack.isHidden = true
autoDockTimerSlider.addTarget(self, action: #selector(autoDockTimerSliderMoved(_:)), for: .valueChanged)
autoDockTimerLabel.text = LocalizationHelper.localizedString(forKey: "Auto dock")
autoDockTimerStack.isHidden = true;
@@ -1933,7 +1951,7 @@ final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidg
if let selectedWidgetView, widgetViewSelected {
selectedWidgetView.translatesAutoresizingMaskIntoConstraints = true
selectedWidgetView.componentSizeFactor = CGFloat(sender.value)
selectedWidgetView.resizeWidgetView()
// selectedWidgetView.resizeWidgetView()
}
}
@@ -2297,11 +2315,26 @@ final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidg
loadDecelerationRates()
}
@objc private func anchorModeChanged(_ sender: UISegmentedControl) {
if let selectedWidgetView {
selectedWidgetView.touchPointAnchored = sender.selectedSegmentIndex == 1
componentSizeStack.isHidden = sender.selectedSegmentIndex != 0
stickIndicatorOffsetStack.isHidden = sender.selectedSegmentIndex != 1
stickIndicatorOffsetSlider.value = Float(selectedWidgetView.stickIndicatorOffset)
self.stickIndicatorOffsetSliderMoved(stickIndicatorOffsetSlider)
autoFitStack(self.widgetPanelStack)
if selectedWidgetView.isDirectionPad {
sensitivityXSlider.value = sender.selectedSegmentIndex == 0 ? 0.0 : 6.5
sensitivityXSliderMoved(sensitivityXSlider)
}
}
}
@objc private func stickIndicatorOffsetSliderMoved(_ sender: UISlider) {
stickIndicatorOffsetLabel.text = LocalizationHelper.localizedString(forKey: "Indicator offset: %.0f", sender.value)
if let selectedWidgetView {
selectedWidgetView.stickIndicatorOffset = CGFloat(sender.value)
selectedWidgetView.updateStickIndicator()
}
}
+102
View File
@@ -2575,6 +2575,36 @@
}
}
},
"Dg1-VH-R6r.text" : {
"comment" : "Class = \"UILabel\"; text = \"Anchor point\"; ObjectID = \"Dg1-VH-R6r\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Anchor point"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "锚定模式"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "錨定模式"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "錨定模式"
}
}
}
},
"DhB-EF-mDt.text" : {
"comment" : "Class = \"UILabel\"; text = \"Hover Mode\"; ObjectID = \"DhB-EF-mDt\";",
"extractionState" : "extracted_with_value",
@@ -5402,6 +5432,66 @@
}
}
},
"PSA-W8-aR5.segmentTitles[0]" : {
"comment" : "Class = \"UISegmentedControl\"; PSA-W8-aR5.segmentTitles[0] = \"center\"; ObjectID = \"PSA-W8-aR5\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "center"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "中心"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "中心"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "中心"
}
}
}
},
"PSA-W8-aR5.segmentTitles[1]" : {
"comment" : "Class = \"UISegmentedControl\"; PSA-W8-aR5.segmentTitles[1] = \"touch point\"; ObjectID = \"PSA-W8-aR5\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "touch point"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "触点"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "觸點"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "觸點"
}
}
}
},
"Pwa-YK-6Q2.text" : {
"comment" : "Class = \"UILabel\"; text = \"Alpha\"; ObjectID = \"Pwa-YK-6Q2\";",
"extractionState" : "extracted_with_value",
@@ -5956,6 +6046,18 @@
}
}
},
"SGI-KP-r0G.text" : {
"comment" : "Class = \"UILabel\"; text = \" \"; ObjectID = \"SGI-KP-r0G\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : " "
}
}
}
},
"shy-hG-9wY.text" : {
"comment" : "Class = \"UILabel\"; text = \"Remember Menu Fold/Expand\"; ObjectID = \"shy-hG-9wY\";",
"extractionState" : "extracted_with_value",
+102
View File
@@ -151,6 +151,18 @@
}
}
},
"0uj-DT-rHT.text" : {
"comment" : "Class = \"UILabel\"; text = \" \"; ObjectID = \"0uj-DT-rHT\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : " "
}
}
}
},
"1hc-yp-cbj.text" : {
"comment" : "Class = \"UILabel\"; text = \"Scroll Sensitivity\"; ObjectID = \"1hc-yp-cbj\";",
"extractionState" : "extracted_with_value",
@@ -3979,6 +3991,36 @@
}
}
},
"nh7-NY-D4z.text" : {
"comment" : "Class = \"UILabel\"; text = \"Anchor point\"; ObjectID = \"nh7-NY-D4z\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Anchor point"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "锚定模式"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "錨定模式"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "錨定模式"
}
}
}
},
"nj6-9l-1j7.segmentTitles[0]" : {
"comment" : "Class = \"UISegmentedControl\"; nj6-9l-1j7.segmentTitles[0] = \"Auto\"; ObjectID = \"nj6-9l-1j7\";",
"extractionState" : "extracted_with_value",
@@ -6169,6 +6211,66 @@
}
}
},
"wCf-6a-2ln.segmentTitles[0]" : {
"comment" : "Class = \"UISegmentedControl\"; wCf-6a-2ln.segmentTitles[0] = \"center\"; ObjectID = \"wCf-6a-2ln\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "center"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "中心"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "中心"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "中心"
}
}
}
},
"wCf-6a-2ln.segmentTitles[1]" : {
"comment" : "Class = \"UISegmentedControl\"; wCf-6a-2ln.segmentTitles[1] = \"touch point\"; ObjectID = \"wCf-6a-2ln\";",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "touch point"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "触点"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "觸點"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "觸點"
}
}
}
},
"whI-oR-V8o.text" : {
"comment" : "Class = \"UILabel\"; text = \"Left Stick Minimum Offset\"; ObjectID = \"whI-oR-V8o\";",
"extractionState" : "extracted_with_value",