downsized widget panel for iphone
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="EVd-wq-ego">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23727" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="EVd-wq-ego">
|
||||
<device id="ipad11_0rounded" orientation="portrait" layout="fullscreen" appearance="light"/>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/>
|
||||
<capability name="Image references" minToolsVersion="12.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
@@ -12,7 +12,7 @@
|
||||
<objects>
|
||||
<viewController id="wb7-af-jn8" customClass="MainFrameViewController" sceneMemberID="viewController">
|
||||
<collectionView key="view" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" indicatorStyle="black" dataMode="prototypes" id="TZj-Lc-M9d" customClass="AppCollectionView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="834" height="1120"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="834" height="1136"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="20" minimumInteritemSpacing="20" id="f7l-kG-hJc">
|
||||
@@ -899,7 +899,7 @@
|
||||
<viewControllerLayoutGuide type="bottom" id="YRO-Lg-RCg"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="hGs-BR-t4b">
|
||||
<rect key="frame" x="0.0" y="0.0" width="834" height="1194"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="834" height="1210"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
@@ -938,7 +938,7 @@
|
||||
<viewControllerLayoutGuide type="bottom" id="vu8-3s-HlY"/>
|
||||
</layoutGuides>
|
||||
<view key="view" multipleTouchEnabled="YES" contentMode="scaleToFill" id="SMn-1j-R3I">
|
||||
<rect key="frame" x="0.0" y="0.0" width="834" height="1194"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="834" height="1210"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" red="0.3333357871" green="0.33332890269999998" blue="0.33333355190000002" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
|
||||
</view>
|
||||
@@ -960,7 +960,7 @@
|
||||
<viewControllerLayoutGuide type="bottom" id="YZj-An-sqS"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="le1-tU-NEp">
|
||||
<rect key="frame" x="0.0" y="0.0" width="834" height="1194"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="834" height="1210"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" animating="YES" style="whiteLarge" translatesAutoresizingMaskIntoConstraints="NO" id="N0D-dj-EuF">
|
||||
@@ -1163,7 +1163,7 @@
|
||||
<constraint firstItem="YLK-IE-ajS" firstAttribute="centerX" secondItem="fZU-G0-fgM" secondAttribute="centerX" id="xm7-a0-8G7"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="z5Q-bW-WQ8" userLabel="widgetPanelStack">
|
||||
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="z5Q-bW-WQ8" userLabel="widgetPanelStack" customClass="WidgetPanelStackView">
|
||||
<rect key="frame" x="325" y="156" width="650" height="237"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Profile:" textAlignment="center" lineBreakMode="tailTruncation" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iel-xl-xd9">
|
||||
|
||||
@@ -269,7 +269,7 @@
|
||||
<constraint firstAttribute="width" constant="750" id="6BK-sG-WTH"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
<view alpha="0.89999997615814209" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Zll-IP-PFt" userLabel="Chevron View">
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Zll-IP-PFt" userLabel="Chevron View">
|
||||
<rect key="frame" x="624" y="50" width="52" height="25"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ChevronCompactUp" translatesAutoresizingMaskIntoConstraints="NO" id="76O-3K-aa8">
|
||||
@@ -320,26 +320,26 @@
|
||||
<constraint firstItem="Zll-IP-PFt" firstAttribute="centerX" secondItem="Jnu-63-bcf" secondAttribute="centerX" id="yvK-OU-Gl6"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="BVp-3O-vZ7" userLabel="widgetPanelStack">
|
||||
<rect key="frame" x="325" y="226" width="650" height="237"/>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="7" translatesAutoresizingMaskIntoConstraints="NO" id="BVp-3O-vZ7" userLabel="widgetPanelStack" customClass="WidgetPanelStackView">
|
||||
<rect key="frame" x="325" y="226" width="550" height="190"/>
|
||||
<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="650" height="37"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="550" height="28"/>
|
||||
<color key="backgroundColor" red="0.18823529410000001" green="0.69019607839999997" blue="0.78039215689999997" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="tintColor" red="0.81533776120000001" green="0.85979419950000002" blue="0.91372549020000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="37" id="4Ej-Nm-Urf"/>
|
||||
<constraint firstAttribute="height" constant="28" id="4Ej-Nm-Urf"/>
|
||||
<constraint firstAttribute="width" constant="650" id="r1C-Ih-J6Q"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="20"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xoH-wS-SS1" userLabel="widgetSizeStack">
|
||||
<rect key="frame" x="0.0" y="47" width="650" height="30"/>
|
||||
<rect key="frame" x="0.0" y="35" width="550" height="20"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="test" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kva-gQ-CZh" userLabel="widgetSizeLabel">
|
||||
<rect key="frame" x="0.0" y="0.0" width="160" height="30"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="160" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="160" id="AU1-B5-zIN"/>
|
||||
</constraints>
|
||||
@@ -348,17 +348,20 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<slider clearsContextBeforeDrawing="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="1" minValue="0.60000002384185791" maxValue="6" translatesAutoresizingMaskIntoConstraints="NO" id="Eke-rc-DVp" userLabel="Size Slider">
|
||||
<rect key="frame" x="158" y="0.0" width="494" height="31"/>
|
||||
<rect key="frame" x="158" y="0.0" width="394" height="21"/>
|
||||
<color key="tintColor" red="0.18823529410000001" green="0.69019607839999997" blue="0.78039215689999997" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="maximumTrackTintColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</slider>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="yy2-cY-cbD"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4Vo-Zh-48b" userLabel="widgetHeightStack">
|
||||
<rect key="frame" x="0.0" y="87" width="650" height="30"/>
|
||||
<rect key="frame" x="0.0" y="62" width="550" height="20"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="test" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Idx-O1-5dn" userLabel="widgetHeightLabel">
|
||||
<rect key="frame" x="0.0" y="0.0" width="160" height="30"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="160" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="160" id="HZV-hv-obw"/>
|
||||
</constraints>
|
||||
@@ -367,17 +370,20 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<slider clearsContextBeforeDrawing="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="1" minValue="0.60000002384185791" maxValue="6" translatesAutoresizingMaskIntoConstraints="NO" id="ssl-ip-Ckz" userLabel="Height Slider">
|
||||
<rect key="frame" x="158" y="0.0" width="494" height="31"/>
|
||||
<rect key="frame" x="158" y="0.0" width="394" height="21"/>
|
||||
<color key="tintColor" red="0.18823529410000001" green="0.69019607839999997" blue="0.78039215689999997" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="maximumTrackTintColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</slider>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="6UM-Pm-4Ej"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="50p-sC-ObU" userLabel="borderWidthAlphaStack">
|
||||
<rect key="frame" x="0.0" y="127" width="650" height="30"/>
|
||||
<rect key="frame" x="0.0" y="89" width="550" height="20"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="test" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qPQ-U2-aSg" userLabel="widgetAlphaLabel">
|
||||
<rect key="frame" x="0.0" y="0.0" width="160" height="30"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="160" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="160" id="F3F-cO-OPA"/>
|
||||
</constraints>
|
||||
@@ -386,15 +392,15 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<slider clearsContextBeforeDrawing="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.83300000429153442" minValue="0.0010000000474974513" maxValue="0.99900001287460327" translatesAutoresizingMaskIntoConstraints="NO" id="8Dt-CC-xry" userLabel="Alpha Slider">
|
||||
<rect key="frame" x="163" y="0.0" width="169" height="31"/>
|
||||
<rect key="frame" x="163" y="0.0" width="144" height="21"/>
|
||||
<color key="tintColor" red="0.18823529410000001" green="0.69019607839999997" blue="0.78039215689999997" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="165" id="6X9-AU-vgE"/>
|
||||
<constraint firstAttribute="width" constant="140" id="6X9-AU-vgE"/>
|
||||
</constraints>
|
||||
<color key="maximumTrackTintColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</slider>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="test" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eiL-iX-G3Z" userLabel="widgetBorderLabel">
|
||||
<rect key="frame" x="335" y="0.0" width="150" height="30"/>
|
||||
<rect key="frame" x="310" y="0.0" width="150" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="150" id="Dyc-3P-v0o"/>
|
||||
</constraints>
|
||||
@@ -403,17 +409,20 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<slider clearsContextBeforeDrawing="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" minValue="0.0" maxValue="8" translatesAutoresizingMaskIntoConstraints="NO" id="m00-jb-sl5" userLabel="Widget Border Width Slider">
|
||||
<rect key="frame" x="488" y="0.0" width="164" height="31"/>
|
||||
<rect key="frame" x="463" y="0.0" width="89" height="21"/>
|
||||
<color key="tintColor" red="0.18823529410000001" green="0.69019607839999997" blue="0.78039215689999997" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="maximumTrackTintColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</slider>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="kge-ua-7K0"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
<stackView contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="Ejp-Jq-phL" userLabel="stickIndicatorOffsetStack">
|
||||
<rect key="frame" x="0.0" y="167" width="650" height="30"/>
|
||||
<rect key="frame" x="0.0" y="116" width="550" height="20"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="test" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fcy-zp-LGa" userLabel="stickIndicatorOffsetLabel">
|
||||
<rect key="frame" x="0.0" y="0.0" width="160" height="30"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="160" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="160" id="2JU-sF-hdJ"/>
|
||||
</constraints>
|
||||
@@ -422,17 +431,20 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<slider clearsContextBeforeDrawing="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="120" minValue="0.0" maxValue="350" translatesAutoresizingMaskIntoConstraints="NO" id="DCr-vG-gM7">
|
||||
<rect key="frame" x="163" y="0.0" width="489" height="31"/>
|
||||
<rect key="frame" x="163" y="0.0" width="389" height="21"/>
|
||||
<color key="tintColor" red="0.18823529410000001" green="0.69019607839999997" blue="0.78039215689999997" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="maximumTrackTintColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</slider>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="V72-IS-Ggi"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fem-TG-vr3" userLabel="sensitivityFactorStack">
|
||||
<rect key="frame" x="0.0" y="207" width="650" height="30"/>
|
||||
<rect key="frame" x="0.0" y="143" width="550" height="20"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="test" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dJh-Ck-ugh" userLabel="sensitivityFactorLabel">
|
||||
<rect key="frame" x="0.0" y="0.0" width="160" height="30"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="160" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="160" id="jOI-vE-DiQ"/>
|
||||
</constraints>
|
||||
@@ -441,15 +453,46 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<slider clearsContextBeforeDrawing="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="1" minValue="0.0" maxValue="8" translatesAutoresizingMaskIntoConstraints="NO" id="Vqk-gH-0xO">
|
||||
<rect key="frame" x="158" y="0.0" width="494" height="31"/>
|
||||
<rect key="frame" x="158" y="0.0" width="394" height="21"/>
|
||||
<color key="tintColor" red="0.18823529410000001" green="0.69019607839999997" blue="0.78039215689999997" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="maximumTrackTintColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</slider>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="ZTP-tC-Uia"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gsG-6n-BAb" userLabel="vibrationStyleStack">
|
||||
<rect key="frame" x="0.0" y="170" width="550" height="20"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Vibration Style" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="u3w-Se-xzH" userLabel="sensitivityFactorLabel">
|
||||
<rect key="frame" x="0.0" y="0.0" width="160" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="160" id="jAW-3B-uPL"/>
|
||||
</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" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="QRV-je-HEZ">
|
||||
<rect key="frame" x="160" y="0.0" width="390" height="21"/>
|
||||
<segments>
|
||||
<segment title="light"/>
|
||||
<segment title="medium"/>
|
||||
<segment title="heavy"/>
|
||||
<segment title="soft"/>
|
||||
<segment title="rigid"/>
|
||||
<segment title="off"/>
|
||||
</segments>
|
||||
</segmentedControl>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="5gJ-L7-twt"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="650" id="sxO-bg-eLv"/>
|
||||
<constraint firstAttribute="width" constant="550" id="fNg-fG-rV5"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
</subviews>
|
||||
@@ -477,6 +520,8 @@
|
||||
<outlet property="toolbarTopConstraintiPhone" destination="wNr-7F-S0i" id="iXe-d3-R7i"/>
|
||||
<outlet property="trashCanButton" destination="dhG-Fo-0GK" id="dv6-TN-2Bj"/>
|
||||
<outlet property="undoButton" destination="Pdg-l4-BvF" id="emD-GI-v2v"/>
|
||||
<outlet property="vibrationStyleSelector" destination="QRV-je-HEZ" id="cEF-HG-B4h"/>
|
||||
<outlet property="vibrationStyleStack" destination="gsG-6n-BAb" id="etn-BF-xqj"/>
|
||||
<outlet property="widgetAlphaLabel" destination="qPQ-U2-aSg" id="Lpd-cw-orP"/>
|
||||
<outlet property="widgetAlphaSlider" destination="8Dt-CC-xry" id="7xH-nT-OPm"/>
|
||||
<outlet property="widgetBorderWidthLabel" destination="eiL-iX-G3Z" id="K6d-T5-dzm"/>
|
||||
@@ -492,7 +537,7 @@
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="ORo-HP-JDj" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="904" y="1378"/>
|
||||
<point key="canvasLocation" x="667" y="1325"/>
|
||||
</scene>
|
||||
<!--Profiles Table View Controller-->
|
||||
<scene sceneID="C7c-yg-gQK">
|
||||
@@ -1410,13 +1455,13 @@
|
||||
<image name="trash.fill" catalog="system" width="117" height="128"/>
|
||||
<image name="tray.full.fill" catalog="system" width="128" height="88"/>
|
||||
<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="systemBrownColor">
|
||||
<color red="0.63529411759999999" green="0.51764705879999995" blue="0.36862745099999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color red="0.63529411764705879" green="0.51764705882352946" blue="0.36862745098039218" 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.18823529411764706" green="0.69019607843137254" blue="0.7803921568627451" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -241,7 +241,7 @@ static CGRect streamViewBounds;
|
||||
|
||||
|
||||
- (bool) updateSelectedProfile:(NSMutableArray *) oscButtonLayers {
|
||||
NSMutableArray* buttonStatesEncoded = [self convertOnScreenControllerAndButtonsToButtonStates:oscButtonLayers];
|
||||
NSMutableArray* buttonStatesEncoded = [self convertOnScreenControllerAndWidgetsToButtonStates:oscButtonLayers];
|
||||
if([self getIndexOfSelectedProfile]==0) return false;
|
||||
OSCProfile *newProfile = [[OSCProfile alloc] initWithName:[self getSelectedProfile].name
|
||||
buttonStates:buttonStatesEncoded isSelected:YES]; // create a new 'OSCProfile'. Set the array of encoded button states created above to the 'buttonStates' property of the new profile, along with a 'name'. Set 'isSelected' argument to YES which will set this saved profile as the one that will show up in the game stream view
|
||||
@@ -258,7 +258,7 @@ static CGRect streamViewBounds;
|
||||
|
||||
|
||||
- (void) saveProfileWithName:(NSString*)name andButtonLayers:(NSMutableArray *)oscButtonLayers {
|
||||
NSMutableArray* buttonStatesEncoded = [self convertOnScreenControllerAndButtonsToButtonStates:oscButtonLayers];
|
||||
NSMutableArray* buttonStatesEncoded = [self convertOnScreenControllerAndWidgetsToButtonStates:oscButtonLayers];
|
||||
OSCProfile *newProfile = [[OSCProfile alloc] initWithName:name
|
||||
buttonStates:buttonStatesEncoded isSelected:YES]; // create a new 'OSCProfile'. Set the array of encoded button states created above to the 'buttonStates' property of the new profile, along with a 'name'. Set 'isSelected' argument to YES which will set this saved profile as the one that will show up in the game stream view
|
||||
/* set all saved OSCProfiles 'isSelected' property to NO since the new profile you're adding will be set as the selected profile */
|
||||
@@ -308,7 +308,7 @@ static CGRect streamViewBounds;
|
||||
return position;
|
||||
}
|
||||
|
||||
- (NSMutableArray* ) convertOnScreenControllerAndButtonsToButtonStates:(NSMutableArray *) oscButtonLayers {
|
||||
- (NSMutableArray* ) convertOnScreenControllerAndWidgetsToButtonStates:(NSMutableArray *) oscButtonLayers {
|
||||
/* iterate through each OSC button the user sees on screen, create an 'OnScreenButtonState' object from each button, encode each object, and then add each object to an array */
|
||||
/*
|
||||
NSSet *validPositionButtonNames = [NSSet setWithObjects:
|
||||
@@ -357,6 +357,7 @@ static CGRect streamViewBounds;
|
||||
buttonState.heightFactor = widgetView.heightFactor;
|
||||
buttonState.backgroundAlpha = widgetView.backgroundAlpha;
|
||||
buttonState.borderWidth = widgetView.borderWidth;
|
||||
buttonState.vibrationStyle = widgetView.vibrationStyle;
|
||||
buttonState.sensitivityFactor = widgetView.sensitivityFactor;
|
||||
buttonState.stickIndicatorOffset = widgetView.stickIndicatorOffset;
|
||||
buttonState.widgetShape = widgetView.shape;
|
||||
|
||||
@@ -37,6 +37,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@property (nonatomic, assign) CGFloat oscLayerSizeFactor; // for OnScreenController CALayer
|
||||
@property (nonatomic, assign) CGFloat backgroundAlpha; // for OnScreenController CALayer
|
||||
@property (nonatomic, assign) uint8_t vibrationStyle; // for OnScreenController CALayer
|
||||
|
||||
// @property (nonatomic, assign) BOOL hasValidPosition;
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
[encoder encodeObject:self.name forKey:@"name"];
|
||||
[encoder encodeObject:self.alias forKey:@"alias"];
|
||||
[encoder encodeInt:self.buttonType forKey:@"buttonType"];
|
||||
[encoder encodeInt:self.vibrationStyle forKey:@"vibrationStyle"];
|
||||
[encoder encodeCGPoint:self.position forKey:@"position"];
|
||||
[encoder encodeBool:self.isHidden forKey:@"isHidden"];
|
||||
[encoder encodeFloat:self.widthFactor forKey:@"widthFactor"];
|
||||
@@ -51,6 +52,7 @@
|
||||
self.name = [decoder decodeObjectForKey:@"name"];
|
||||
self.alias = [decoder decodeObjectForKey:@"alias"];
|
||||
self.buttonType = [decoder decodeIntForKey:@"buttonType"];
|
||||
self.vibrationStyle = [decoder decodeIntForKey:@"vibrationStyle"];
|
||||
self.position = [decoder decodeCGPointForKey:@"position"];
|
||||
self.isHidden = [decoder decodeBoolForKey:@"isHidden"];
|
||||
self.widthFactor = [decoder decodeFloatForKey:@"widthFactor"];
|
||||
|
||||
@@ -41,6 +41,7 @@ import UIKit
|
||||
@objc public var heightFactor: CGFloat = 1.0
|
||||
@objc public var borderWidth: CGFloat = 0.0
|
||||
@objc public var backgroundAlpha: CGFloat = 0.5
|
||||
@objc public var vibrationStyle: Int = 6
|
||||
@objc public var latestTouchLocation: CGPoint
|
||||
@objc public var selfViewOnTheRight: Bool = false
|
||||
@objc public var shape: String = "default"
|
||||
@@ -50,10 +51,9 @@ import UIKit
|
||||
|
||||
|
||||
private let appWindow: UIView
|
||||
|
||||
|
||||
|
||||
|
||||
private var vibrationGenerator = UIImpactFeedbackGenerator(style: .light)
|
||||
private var vibrationOn: Bool = false
|
||||
|
||||
// for all touchPad or buttons hybrid with touchPads
|
||||
@objc public var hasStickIndicator: Bool = false
|
||||
@@ -124,6 +124,7 @@ import UIKit
|
||||
@objc public let buttonDownVisualEffectLayer = CAShapeLayer()
|
||||
private var buttonDownVisualEffectWidth: CGFloat
|
||||
|
||||
|
||||
@objc init(cmdString: String, buttonLabel: String, shape:String) {
|
||||
|
||||
self.cmdString = cmdString
|
||||
@@ -226,9 +227,25 @@ import UIKit
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
|
||||
// ======================================================================================================
|
||||
|
||||
@objc public func setVibration(style: Int) {
|
||||
if #available(iOS 13.0, *) {
|
||||
vibrationOn = style < UIImpactFeedbackGenerator.FeedbackStyle.rigid.rawValue + 1
|
||||
} else {
|
||||
vibrationOn = style < UIImpactFeedbackGenerator.FeedbackStyle.heavy.rawValue + 1
|
||||
};
|
||||
vibrationStyle = style;
|
||||
if #available(iOS 13.0, *) {
|
||||
print("rigid value \(UIImpactFeedbackGenerator.FeedbackStyle.rigid.rawValue)")
|
||||
} else {
|
||||
// Fallback on earlier versions
|
||||
};
|
||||
if vibrationOn {
|
||||
vibrationGenerator = UIImpactFeedbackGenerator(style: UIImpactFeedbackGenerator.FeedbackStyle(rawValue: style) ?? UIImpactFeedbackGenerator.FeedbackStyle.light)
|
||||
}
|
||||
}
|
||||
|
||||
@objc public func setLocation(position: CGPoint) {
|
||||
/*
|
||||
NSLayoutConstraint.activate([
|
||||
@@ -437,6 +454,12 @@ import UIKit
|
||||
self.layer.superlayer?.addSublayer(indicatorBorder)
|
||||
indicatorBorder.position = CGPointMake(CGRectGetMinX(self.frame)+touchBeganLocation.x, CGRectGetMinY(self.frame)+touchBeganLocation.y)
|
||||
|
||||
if vibrationOn {
|
||||
vibrationGenerator.prepare()
|
||||
vibrationGenerator.impactOccurred()
|
||||
print("vibrationInstance: \(vibrationGenerator)")
|
||||
}
|
||||
|
||||
return indicatorBorder
|
||||
}
|
||||
|
||||
@@ -787,7 +810,7 @@ import UIKit
|
||||
}
|
||||
|
||||
//==== wholeButtonPress visual effect=============================================
|
||||
private func buttonDownVisualEffect() {
|
||||
private func buttonDownEffect() {
|
||||
// setupBorderLayer()
|
||||
CATransaction.begin()
|
||||
CATransaction.setDisableActions(true)
|
||||
@@ -795,6 +818,11 @@ import UIKit
|
||||
buttonDownVisualEffectLayer.position = CGPointMake(CGRectGetMidX(self.frame), CGRectGetMidY(self.frame)) // update position every time we press down the button
|
||||
buttonDownVisualEffectLayer.borderWidth = self.buttonDownVisualEffectWidth // this will show the visual effect
|
||||
buttonDownVisualEffectLayer.borderColor = moonlightPurple
|
||||
if vibrationOn {
|
||||
vibrationGenerator.prepare()
|
||||
vibrationGenerator.impactOccurred()
|
||||
print("vibrationInstance: \(vibrationGenerator)")
|
||||
}
|
||||
CATransaction.commit()
|
||||
}
|
||||
|
||||
@@ -1019,7 +1047,7 @@ import UIKit
|
||||
|
||||
// this will also deal with button events
|
||||
if self.widgetType == WidgetTypeEnum.button && !self.comboButtonStrings.isEmpty {
|
||||
self.buttonDownVisualEffect()
|
||||
self.buttonDownEffect()
|
||||
self.sendComboButtonsDownEvent(comboStrings: self.comboButtonStrings)
|
||||
}
|
||||
|
||||
@@ -1034,7 +1062,7 @@ import UIKit
|
||||
}
|
||||
// here is in edit mode:
|
||||
else{
|
||||
self.buttonDownVisualEffect()
|
||||
self.buttonDownEffect()
|
||||
NotificationCenter.default.post(name: Notification.Name("OnScreenWidgetViewSelected"),object: self) // inform layout tool controller to fetch button size factors. self will be passed as the object of the notification
|
||||
}
|
||||
}
|
||||
|
||||
@@ -411,6 +411,7 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
widgetView.widthFactor = buttonState.widthFactor;
|
||||
widgetView.heightFactor = buttonState.heightFactor;
|
||||
widgetView.borderWidth = buttonState.borderWidth;
|
||||
[widgetView setVibrationWithStyle:buttonState.vibrationStyle];
|
||||
widgetView.sensitivityFactor = buttonState.sensitivityFactor;
|
||||
widgetView.stickIndicatorOffset = buttonState.stickIndicatorOffset;
|
||||
widgetView.minStickOffset = buttonState.minStickOffset;
|
||||
|
||||
@@ -75,6 +75,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (weak, nonatomic) IBOutlet UISlider *sensitivitySlider;
|
||||
@property (weak, nonatomic) IBOutlet UIStackView *sensitivityStack;
|
||||
|
||||
@property (strong, nonatomic) IBOutlet UISegmentedControl *vibrationStyleSelector;
|
||||
@property (strong, nonatomic) IBOutlet UIStackView *vibrationStyleStack;
|
||||
|
||||
|
||||
|
||||
|
||||
+80
-37
@@ -104,6 +104,7 @@
|
||||
widgetView.widthFactor = buttonState.widthFactor;
|
||||
widgetView.heightFactor = buttonState.heightFactor;
|
||||
widgetView.borderWidth = buttonState.borderWidth;
|
||||
[widgetView setVibrationWithStyle:buttonState.vibrationStyle];
|
||||
widgetView.sensitivityFactor = buttonState.sensitivityFactor;
|
||||
widgetView.stickIndicatorOffset = buttonState.stickIndicatorOffset;
|
||||
widgetView.minStickOffset = buttonState.minStickOffset;
|
||||
@@ -614,6 +615,7 @@
|
||||
CGRect newFrame = view.frame;
|
||||
newFrame.size = fittingSize;
|
||||
view.frame = newFrame;
|
||||
if([self isIPhone]) [self updateClippedMaskForView:view];
|
||||
}
|
||||
|
||||
- (void)widgetViewTapped: (NSNotification *)notification{
|
||||
@@ -663,6 +665,10 @@
|
||||
[self.widgetHeightLabel setText:[LocalizationHelper localizedStringForKey:@"Height: %.2f", self->selectedWidgetView.heightFactor]];
|
||||
[self.widgetAlphaLabel setText:[LocalizationHelper localizedStringForKey:@"Alpha: %.2f", self->selectedWidgetView.backgroundAlpha]];
|
||||
[self.widgetBorderWidthLabel setText:[LocalizationHelper localizedStringForKey:@"Border Width: %.2f", self->selectedWidgetView.borderWidth]];
|
||||
if([self isIPhone]){
|
||||
self.vibrationStyleSelector.selectedSegmentIndex = self->selectedWidgetView.vibrationStyle;
|
||||
//[self->selectedWidgetView setva]
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setControllerCALayerSliderValues: (NSNotification *)notification{
|
||||
@@ -692,62 +698,68 @@
|
||||
[self.widgetAlphaLabel setText:[LocalizationHelper localizedStringForKey:@"Alpha: %.2f", alpha]];
|
||||
}
|
||||
|
||||
- (void)widgetSizeSliderMoved{
|
||||
[self.widgetSizeLabel setText:[LocalizationHelper localizedStringForKey:@"Size: %.2f", self.widgetSizeSlider.value]];
|
||||
[self.widgetHeightLabel setText:[LocalizationHelper localizedStringForKey:@"Height: %.2f", self.widgetSizeSlider.value]]; // resizing the whole button
|
||||
[self.widgetHeightSlider setValue: self.widgetSizeSlider.value];
|
||||
- (void)widgetSizeSliderMoved:(UISlider* )sender{
|
||||
[self.widgetSizeLabel setText:[LocalizationHelper localizedStringForKey:@"Size: %.2f", sender.value]];
|
||||
[self.widgetHeightLabel setText:[LocalizationHelper localizedStringForKey:@"Height: %.2f", sender.value]]; // resizing the whole button
|
||||
[self.widgetHeightSlider setValue: sender.value];
|
||||
|
||||
if(self->selectedWidgetView != nil && self->widgetViewSelected){
|
||||
self->selectedWidgetView.translatesAutoresizingMaskIntoConstraints = true; // this is mandatory to prevent unexpected key view location change
|
||||
// when adjusting width, the widgetView height will be syncronized
|
||||
self->selectedWidgetView.widthFactor = self->selectedWidgetView.heightFactor = self.widgetSizeSlider.value;
|
||||
self->selectedWidgetView.widthFactor = self->selectedWidgetView.heightFactor = sender.value;
|
||||
[self->selectedWidgetView resizeWidgetView];
|
||||
}
|
||||
if(self->selectedControllerLayer != nil && self->controllerLayerSelected){
|
||||
[self.layoutOSC resizeControllerLayerWith:self->selectedControllerLayer and:self.widgetSizeSlider.value];
|
||||
[self.layoutOSC resizeControllerLayerWith:self->selectedControllerLayer and:sender.value];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)widgetHeightSliderMoved{
|
||||
[self.widgetHeightLabel setText:[LocalizationHelper localizedStringForKey:@"Height: %.2f", self.widgetHeightSlider.value]];
|
||||
- (void)widgetHeightSliderMoved:(UISlider* )sender{
|
||||
[self.widgetHeightLabel setText:[LocalizationHelper localizedStringForKey:@"Height: %.2f", sender.value]];
|
||||
if(self->selectedWidgetView != nil && self->widgetViewSelected){
|
||||
self->selectedWidgetView.translatesAutoresizingMaskIntoConstraints = true; // this is mandatory to prevent unexpected key view location change
|
||||
if([self->selectedWidgetView.shape isEqualToString:@"round"]) return; // don't change height for round buttons, except for dPad buttons which are in rectangle shape
|
||||
self->selectedWidgetView.heightFactor = self.widgetHeightSlider.value;
|
||||
self->selectedWidgetView.heightFactor = sender.value;
|
||||
[self->selectedWidgetView resizeWidgetView];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)widgetAlphaSliderMoved{
|
||||
[self.widgetAlphaLabel setText:[LocalizationHelper localizedStringForKey:@"Alpha: %.2f", self.widgetAlphaSlider.value]];
|
||||
- (void)widgetAlphaSliderMoved:(UISlider* )sender{
|
||||
[self.widgetAlphaLabel setText:[LocalizationHelper localizedStringForKey:@"Alpha: %.2f", sender.value]];
|
||||
if(self->selectedWidgetView != nil && self->widgetViewSelected){
|
||||
[self->selectedWidgetView adjustTransparencyWithAlpha:self.widgetAlphaSlider.value];
|
||||
[self->selectedWidgetView adjustTransparencyWithAlpha:sender.value];
|
||||
}
|
||||
|
||||
if(self->selectedControllerLayer != nil && self->controllerLayerSelected){
|
||||
[self.layoutOSC adjustControllerLayerOpacityWith:self->selectedControllerLayer and:self.widgetAlphaSlider.value];
|
||||
[self.layoutOSC adjustControllerLayerOpacityWith:self->selectedControllerLayer and:sender.value];
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
- (void)widgetBorderWidthSliderMoved{
|
||||
[self.widgetBorderWidthLabel setText:[LocalizationHelper localizedStringForKey:@"Border Width: %.2f", self.widgetBorderWidthSlider.value]];
|
||||
- (void)widgetBorderWidthSliderMoved:(UISlider* )sender{
|
||||
[self.widgetBorderWidthLabel setText:[LocalizationHelper localizedStringForKey:@"Border Width: %.2f", sender.value]];
|
||||
if(self->selectedWidgetView != nil && self->widgetViewSelected){
|
||||
[self->selectedWidgetView adjustBorderWithWidth:self.widgetBorderWidthSlider.value];
|
||||
[self->selectedWidgetView adjustBorderWithWidth:sender.value];
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
- (void)sensitivitySliderMoved{
|
||||
[self.sensitivityLabel setText:[LocalizationHelper localizedStringForKey:@"Sensitivity: %.2f", self.sensitivitySlider.value]];
|
||||
if(self->selectedWidgetView != nil && self->widgetViewSelected) self->selectedWidgetView.sensitivityFactor = self.sensitivitySlider.value;
|
||||
- (void)vibrationStyleChanged:(UISegmentedControl* )sender{
|
||||
if(self->selectedWidgetView != nil && self->widgetViewSelected){
|
||||
[self->selectedWidgetView setVibrationWithStyle:sender.selectedSegmentIndex];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)sensitivitySliderMoved:(UISlider* )sender{
|
||||
[self.sensitivityLabel setText:[LocalizationHelper localizedStringForKey:@"Sensitivity: %.2f", sender.value]];
|
||||
if(self->selectedWidgetView != nil && self->widgetViewSelected) self->selectedWidgetView.sensitivityFactor = sender.value;
|
||||
return;
|
||||
}
|
||||
|
||||
- (void)stickIndicatorOffsetSliderMoved{
|
||||
[self.stickIndicatorOffsetLabel setText:[LocalizationHelper localizedStringForKey:@"Indicator Offset: %.0f", self.stickIndicatorOffsetSlider.value]];
|
||||
- (void)stickIndicatorOffsetSliderMoved:(UISlider* )sender{
|
||||
[self.stickIndicatorOffsetLabel setText:[LocalizationHelper localizedStringForKey:@"Indicator Offset: %.0f", sender.value]];
|
||||
if(self->selectedWidgetView != nil && self->widgetViewSelected){
|
||||
self->selectedWidgetView.stickIndicatorOffset = self.stickIndicatorOffsetSlider.value;
|
||||
self->selectedWidgetView.stickIndicatorOffset = sender.value;
|
||||
[self->selectedWidgetView updateStickIndicator];
|
||||
}
|
||||
return;
|
||||
@@ -790,17 +802,10 @@
|
||||
self.widgetPanelStack.layer.cornerRadius = 16;
|
||||
self.widgetPanelStack.clipsToBounds = YES;
|
||||
|
||||
/*
|
||||
[NSLayoutConstraint activateConstraints:@[
|
||||
[self.widgetPanelStack.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:0],
|
||||
[self.widgetPanelStack.topAnchor constraintEqualToAnchor:self.view.topAnchor constant:120],
|
||||
]];
|
||||
*/
|
||||
|
||||
self.widgetPanelStack.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5];
|
||||
|
||||
[self.currentProfileLabel setText:[LocalizationHelper localizedStringForKey:@"Profile: %@",[profilesManager getSelectedProfile].name]];
|
||||
self.currentProfileLabel.layer.cornerRadius = 12;
|
||||
self.currentProfileLabel.layer.cornerRadius = [self isIPhone] ? 9 : 12;
|
||||
self.currentProfileLabel.clipsToBounds = YES;
|
||||
|
||||
self.widgetSizeStack.userInteractionEnabled = YES;
|
||||
@@ -813,40 +818,77 @@
|
||||
}
|
||||
}
|
||||
|
||||
[self.widgetSizeSlider addTarget:self action:@selector(widgetSizeSliderMoved) forControlEvents:(UIControlEventValueChanged)];
|
||||
[self.widgetSizeSlider addTarget:self action:@selector(widgetSizeSliderMoved:) forControlEvents:(UIControlEventValueChanged)];
|
||||
self.widgetSizeLabel.text = [LocalizationHelper localizedStringForKey:@"Size"];
|
||||
self.widgetSizeStack.hidden = _quickSwitchEnabled;
|
||||
|
||||
[self.widgetHeightSlider addTarget:self action:@selector(widgetHeightSliderMoved) forControlEvents:(UIControlEventValueChanged)];
|
||||
[self.widgetHeightSlider addTarget:self action:@selector(widgetHeightSliderMoved:) forControlEvents:(UIControlEventValueChanged)];
|
||||
|
||||
self.widgetHeightLabel.text = [LocalizationHelper localizedStringForKey:@"Height"];
|
||||
self.widgetHeightStack.hidden = _quickSwitchEnabled;
|
||||
|
||||
[self.widgetAlphaSlider addTarget:self action:@selector(widgetAlphaSliderMoved) forControlEvents:(UIControlEventValueChanged)];
|
||||
[self.widgetAlphaSlider addTarget:self action:@selector(widgetAlphaSliderMoved:) forControlEvents:(UIControlEventValueChanged)];
|
||||
self.widgetAlphaLabel.text = [LocalizationHelper localizedStringForKey:@"Alpha"];
|
||||
|
||||
[self.widgetBorderWidthSlider addTarget:self action:@selector(widgetBorderWidthSliderMoved) forControlEvents:(UIControlEventValueChanged)];
|
||||
[self.widgetBorderWidthSlider addTarget:self action:@selector(widgetBorderWidthSliderMoved:) forControlEvents:(UIControlEventValueChanged)];
|
||||
self.widgetBorderWidthLabel.text = [LocalizationHelper localizedStringForKey:@"Border Width"];
|
||||
self.borderWidthAlphaStack.hidden = _quickSwitchEnabled;
|
||||
|
||||
[self.sensitivitySlider addTarget:self action:@selector(sensitivitySliderMoved) forControlEvents:(UIControlEventValueChanged)];
|
||||
[self.sensitivitySlider addTarget:self action:@selector(sensitivitySliderMoved:) forControlEvents:(UIControlEventValueChanged)];
|
||||
self.sensitivityLabel.text = [LocalizationHelper localizedStringForKey:@"Sensitivity"];
|
||||
self.sensitivityStack.hidden = YES;
|
||||
|
||||
// stick indicator offset slider
|
||||
//self.stickIndicatorOffsetSlider.hidden = YES;
|
||||
[self.stickIndicatorOffsetSlider addTarget:self action:@selector(stickIndicatorOffsetSliderMoved) forControlEvents:(UIControlEventValueChanged)];
|
||||
[self.stickIndicatorOffsetSlider addTarget:self action:@selector(stickIndicatorOffsetSliderMoved:) forControlEvents:(UIControlEventValueChanged)];
|
||||
self.stickIndicatorOffsetLabel.text = [LocalizationHelper localizedStringForKey:@"Indicator Offset"];
|
||||
self.stickIndicatorOffsetStack.hidden = YES;
|
||||
|
||||
|
||||
if([self isIPhone]){
|
||||
[self.vibrationStyleSelector addTarget:self action:@selector(vibrationStyleChanged:) forControlEvents:(UIControlEventValueChanged)];
|
||||
self.vibrationStyleStack.hidden = NO;
|
||||
}
|
||||
|
||||
[self.view bringSubviewToFront:self.toolbarRootView];
|
||||
[self.view insertSubview:self.widgetPanelStack belowSubview:self.toolbarRootView];
|
||||
self.widgetPanelStack.translatesAutoresizingMaskIntoConstraints = YES;
|
||||
|
||||
|
||||
CGRect frame = CGRectMake(0, 0, self.widgetPanelStack.frame.size.width, self.widgetPanelStack.frame.size.height);
|
||||
//frame.origin = CGPointMake(self.view.bounds.size.width/2, 100);
|
||||
frame.origin = CGPointMake(self.view.bounds.size.width/2-self.widgetPanelStack.frame.size.width/2, 100);
|
||||
self.widgetPanelStack.frame = frame;
|
||||
[self autoFitView:self.widgetPanelStack];
|
||||
|
||||
if([self isIPhone]) {
|
||||
for(UIView* view in _widgetPanelStack.arrangedSubviews){
|
||||
view.transform = CGAffineTransformMakeScale(0.83, 0.83);
|
||||
}
|
||||
self.widgetPanelStack.layoutMargins = UIEdgeInsetsMake(3, 2, 7, 2);
|
||||
|
||||
self.widgetPanelStack.clipsToBounds = YES;
|
||||
|
||||
CAShapeLayer *maskLayer = [CAShapeLayer layer];
|
||||
CGRect visibleRect = CGRectInset(self.widgetPanelStack.bounds, 40, 0); // 左右各裁掉
|
||||
UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:visibleRect cornerRadius:12];
|
||||
maskLayer.path = path.CGPath;
|
||||
|
||||
self.widgetPanelStack.layer.mask = maskLayer;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)updateClippedMaskForView:(UIView* )view{
|
||||
CAShapeLayer *maskLayer = [CAShapeLayer layer];
|
||||
view.layer.mask = nil;
|
||||
CGRect visibleRect = CGRectInset(view.bounds, 40, 0); // 左右各裁掉 20pt
|
||||
UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:visibleRect cornerRadius:12];
|
||||
maskLayer.path = path.CGPath;
|
||||
view.layer.mask = maskLayer;
|
||||
}
|
||||
|
||||
- (BOOL)isIPhone{
|
||||
return ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone);
|
||||
}
|
||||
|
||||
- (void)handleProfileTablViewDismiss{
|
||||
@@ -901,7 +943,7 @@
|
||||
_oscProfilesTableViewController = [storyboard instantiateViewControllerWithIdentifier:@"OSCProfilesTableViewController"];
|
||||
_oscProfilesTableViewController.streamViewBounds = self.view.bounds;
|
||||
|
||||
_oscProfilesTableViewController.needToUpdateOscLayoutTVC = ^() { // a block that will be called when the modally presented 'OSCProfilesTableViewController' VC is dismissed. By the time the 'OSCProfilesTableViewController' VC is dismissed the user would have potentially selected a different OSC ofile with a different layout and they want to see this layout on this 'LayoutOnScreenControlsViewController.' This block of code will load the profile and then hide/show and move each OSC button to their appropriate position
|
||||
_oscProfilesTableViewController.needToUpdateOscLayoutTVC = ^() { // a block that will be called when the modally presented 'OSCProfilesTableViewController' VC is dismissed. By the time the 'OSCProfilesTableViewController' VC is dismissed the user would have potentially selected a different OSC ofile with a different layout and they want to see this layout on this 'LayoutOnScreenControlsViewController.' This block of code will load the proffile and then hide/show and move each OSC button to their appropriate position
|
||||
[self.layoutOSC updateControls]; // creates and saves a 'Default' OSC profile or loads the one the user selected on the previous screen
|
||||
|
||||
[self addInnerAnalogSticksToOuterAnalogLayers];
|
||||
@@ -1014,6 +1056,7 @@
|
||||
|
||||
// removing keyboard buttons objs
|
||||
// UITouch *touch = [touches anyObject]; // Get the first touch in the set
|
||||
_widgetPanelStack.userInteractionEnabled = true;
|
||||
|
||||
if(selectedWidgetView) [self.view insertSubview:selectedWidgetView belowSubview:_widgetPanelStack];
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// WidgetPanelStackView.h
|
||||
// Voidex
|
||||
//
|
||||
// Created by True砖家 on 2025/6/19.
|
||||
// Copyright © True砖家 on Bilibili. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
|
||||
@interface WidgetPanelStackView : UIStackView
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// WidgetPanelStackView.h
|
||||
// Voidex
|
||||
//
|
||||
// Created by True砖家 on 2025/6/19.
|
||||
// Copyright © True砖家 on Bilibili. All rights reserved.
|
||||
//
|
||||
|
||||
|
||||
#import "WidgetPanelStackView.h"
|
||||
|
||||
@implementation WidgetPanelStackView
|
||||
|
||||
- (BOOL) pointInside:(CGPoint)point withEvent:(UIEvent *)event {
|
||||
if ([UIDevice currentDevice].userInterfaceIdiom != UIUserInterfaceIdiomPhone) return [super pointInside:point withEvent:event];
|
||||
BOOL touchedWithinMask;
|
||||
CAShapeLayer *mask = (CAShapeLayer *)self.layer.mask;
|
||||
if (mask && mask.path) {
|
||||
// 注意:mask 的坐标系是以 view.layer 为基准的
|
||||
touchedWithinMask = CGPathContainsPoint(mask.path, NULL, point, NO);
|
||||
}
|
||||
else touchedWithinMask = YES;
|
||||
return touchedWithinMask;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1831,6 +1831,186 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"QRV-je-HEZ.segmentTitles[0]" : {
|
||||
"comment" : "Class = \"UISegmentedControl\"; QRV-je-HEZ.segmentTitles[0] = \"light\"; ObjectID = \"QRV-je-HEZ\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "light"
|
||||
}
|
||||
},
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "轻微"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "轻微"
|
||||
}
|
||||
},
|
||||
"zh-HK" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "轻微"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"QRV-je-HEZ.segmentTitles[1]" : {
|
||||
"comment" : "Class = \"UISegmentedControl\"; QRV-je-HEZ.segmentTitles[1] = \"medium\"; ObjectID = \"QRV-je-HEZ\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "medium"
|
||||
}
|
||||
},
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "中等"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "中等"
|
||||
}
|
||||
},
|
||||
"zh-HK" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "中等"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"QRV-je-HEZ.segmentTitles[2]" : {
|
||||
"comment" : "Class = \"UISegmentedControl\"; QRV-je-HEZ.segmentTitles[2] = \"heavy\"; ObjectID = \"QRV-je-HEZ\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "heavy"
|
||||
}
|
||||
},
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "强烈"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "强烈"
|
||||
}
|
||||
},
|
||||
"zh-HK" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "强烈"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"QRV-je-HEZ.segmentTitles[3]" : {
|
||||
"comment" : "Class = \"UISegmentedControl\"; QRV-je-HEZ.segmentTitles[3] = \"soft\"; ObjectID = \"QRV-je-HEZ\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "soft"
|
||||
}
|
||||
},
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "柔和"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "柔和"
|
||||
}
|
||||
},
|
||||
"zh-HK" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "柔和"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"QRV-je-HEZ.segmentTitles[4]" : {
|
||||
"comment" : "Class = \"UISegmentedControl\"; QRV-je-HEZ.segmentTitles[4] = \"rigid\"; ObjectID = \"QRV-je-HEZ\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "rigid"
|
||||
}
|
||||
},
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "刚性"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "刚性"
|
||||
}
|
||||
},
|
||||
"zh-HK" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "刚性"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"QRV-je-HEZ.segmentTitles[5]" : {
|
||||
"comment" : "Class = \"UISegmentedControl\"; QRV-je-HEZ.segmentTitles[5] = \"off\"; ObjectID = \"QRV-je-HEZ\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "off"
|
||||
}
|
||||
},
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "关闭"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "关闭"
|
||||
}
|
||||
},
|
||||
"zh-HK" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "关闭"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"S7X-Kt-2jd.text" : {
|
||||
"comment" : "Class = \"UILabel\"; text = \"Show Local Keyboard Toolbar \"; ObjectID = \"S7X-Kt-2jd\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
@@ -2035,6 +2215,36 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"u3w-Se-xzH.text" : {
|
||||
"comment" : "Class = \"UILabel\"; text = \"Vibration Style\"; ObjectID = \"u3w-Se-xzH\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "Vibration Style"
|
||||
}
|
||||
},
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "振动模式"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "振动模式"
|
||||
}
|
||||
},
|
||||
"zh-HK" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "振动模式"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Uca-fD-4AC.segmentTitles[0]" : {
|
||||
"comment" : "Class = \"UISegmentedControl\"; Uca-fD-4AC.segmentTitles[0] = \"Align with System\"; ObjectID = \"Uca-fD-4AC\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
|
||||
Reference in New Issue
Block a user